I am trying to send some hex data over TCP using SIM900A module. But the sequence of data has a byte with value of 0x1B which is the escape character. As a result the module terminates the command immediately.
Does anyone know by which I can overcome this problem?
I am trying to access the google maps (http://www.google.com/glm/mmap) api. It needs some data that should be some hex characters. Some sample data array of the format (0x12,0x15,0x1b.....) that needs to be posted. So I am using the following commands
So here I get the
> prompt from the module. So I send the following data afterwards
POST maps/glm HTTP1/0 Content-type: application/binary Content-length: 100
After this I send the hex data. So I am using linux echo to send the hex data. So I send as
echo -ne "/x12/x15/1b/......." > /dev/ttyUSB1
But in sim900 usually we send
0x1A(ctrl+z) to send the data to the server. But it also uses
(Esc) or 0x1B to exit sending the data. So this
0x1b I am sending causes a exit skipping the rest of data.