Possible encoding type to convert a byte array to be sent by SMS - encoding

I need to send a public key created by RSA by SMS to another phone.
I am converting the 148 byte public key to base64 to be sent by SMS. But it increases the 148 bytes to 200 bytes when converted.
As byte[] cannot be directly sent by SMS, what are the other possible methods of converting them successfully to strings or equivalent which can be sent through SMS? Other than compressing, is base64 the only possible method?

You can an SMS in 8bit mode - most GSM modems and gateways have this option, and some phones also expose this capability in their API.
This way you can send the entire key, and still have 12 bytes for extra data.
You'll need some software on the phone which will be able read the message and use it, though.
Another option: send it in two related separate SMSes; most(?) phones know how to send and combine separate SMSes to one logical message (to understand how it exactly works you'll have to dig into the SMS protocol specifications).

Adamk mentioned binary mode for sending SMS. Unfortunately this still leaves you with only 140 bytes for the payload, 8 bytes short!
If the target application is able to handle concatenated messages and it's acceptable that each key sent costs twice as much, then you should go with this solution.

Related

Can I send a sysex message using csound's midiout opcode? And how?

System Exclusive MIDI messages can be of an arbitrary length, can csound's midiout opcode accomodate for that? Is there a workaround?
Csound's midiout supports only channel messages.
To get SysEx messages, you would have to use some external tool to convert some custom controller messages into SysEx messages. (See Send MIDI SysEx message based on CC or PC message, which has no answer; I don't know if midish would help, or if you'd have to write your own software.)

Using messaging apps to transfer binary data

I was wondering if it's possible to transfer arbitrary binary data through messaging apps such as Telegram. I guess the question is if binary data can be transferred through text messages. I read somewhere that this is possible if Base64 binary-to-text encoding is used. Telegram is a platform which is not censored in the country I'm living in. So, if I can relqy binary data through telegram, it can be used to bypass censorship. Does telegram support Base64 encoding? What are your thoughts on this?
Well, I'm almost certain that the Base64 encoding can be used to carry binary data on telegram. However, there are limitations on the rate of messages sent on Telegram. Therefore, the idea to use Telegram as a proxy is not achievable since a significantly high number of messages needs to be sent.

Out of band socket data in Windows Store apps

I have been working on a telnet/SSH app for the Windows Store and the telnet app has been receiving OOB data on its socket but I can't see it inside the app. I know this because the desktop version of the app is receiving OOB data. I also confirmed that the receive buffer in the Windows Store version is missing the one OOB data byte. In Wireshark I have confirmed that the OOB data is being received by the computer so its just not being forwarded to my app. I know in WinSock you need to set a special parameter to receive OOB data inline but I cannot find any such option for a Windows Store app. Does anyone know of a way to get this OOB data?
Another option would be to tell the telnet server to stop sending the OOB data. Is there to tell it to stop sending it?
For reference, the OOB data is being sent when pressing Ctrl+C. The OOB data byte is 0xFF and is the first byte sent by the server.
Thanks.
It appears that this functionality is not implemented in WinRT. Marking as answered.
http://social.msdn.microsoft.com/Forums/en-US/05a26a4b-e0db-4fed-b5d0-b67a2d9e2b1c/out-of-band-data-using-windowsnetworkingsockets?forum=winappswithnativecode

How the size of an xmpp packet/message can be calculated/measured?

Is there a way to calculate/get the size of the xmpp packets/messages? I am trying to find out the size of the xmpp packets sent between my openfire server and two clients using smack and xmppframework. My overall aim is to optimize my network performance by experimenting with different payloads.
With Smack you could simply register a PacketListener and check the size of every packet received by counting the bytes as a result of the toXML() method, and use a PacketInterceptor for all outgoing packets.
I would think though that the better approach is to simply use some sort of packet sniffer like WireShark on the network. This is capable of filtering on the specific protocol. No need to get into any specifics with the actual endpoints at all then. Smack, XMPPFramework and Openfire all become irrelevant.
That really depends on what library/framework you're using. Most will allow you to convert a stanza object to an XML string, and then you simply count the length of that string.

Is there any way of sending DTMF tones during a call with linphone?

I'm trying to send a sequence of DTMF tones during a SIP call from linphone, compiled for the iPhone, in order to do some call management at a local exchange I've set up. I see from the code that the individual digits send DTMF (without audio on the line), but I can't seem to send a string of digits manually.
When I try, I just get a single digit sent. I could put in a delay and timer, but that just doesn't seem the way to go about it - and a long string of tones would take a long time to send with the necessary acknowledgements.
I've read that you can send DTMF as part of a SIP INFO message, but can't find the facility in linphone to construct a SIP INFO message.
Has anyone been able to do this or have any suggestions as to what I could try?
For me, changing the audio codec to speex # 32000 Hz solved the problem. I'm not sure exactly why it solved it, but beforehand DTMF signals were not being recoknized by the server, whereas now they are.
For reference, I'm using the recent Linphone 3.8.1 build.