5

i want to send a picture with GPRS module and through a TCP connection to a server. but my picture contains some "1a" (CTRL+Z) value in some bytes. As we know this is the terminator character for sending sms or data with AT commands. how can I send ctrl+z as a byte of data ?

Also when sending process reaches to character \0, it stops and returns an error. I mean GPRS module sends ERROR to serial port. Example:

FF D8 FF E0 00 10

FF and D8 and FF and E0 will send successfully but error occurred at 00. what is the problem? thanks.

s4eed
  • 7,173
  • 9
  • 67
  • 104
  • What TCP stack are you using? On what platform? How, specifically, are you trying to send the data? – Oliver Charlesworth Oct 26 '11 at 23:29
  • on Windows i use these AT commands AT+CSTT="MYAPN";AT+CIPSTART="TCP","MYIP","MYPORT";AT+CIPSEND . after that i write bytes of picture to the serial port like FF D8 E0 00 10 .... and at the end i write 1A. – s4eed Oct 26 '11 at 23:36
  • I could send text successfully but i couldn't send raw data. – s4eed Oct 26 '11 at 23:38

2 Answers2

3

I was working on a project to sen sms from pc using AT Commands. Here I was using following command for ctrl+z.

outputStream.write(26);
Lucifer
  • 29,392
  • 25
  • 90
  • 143
-1

Try sending 0x1A, or $1A if that doesn't work type $1A.

nATwAR
  • 1
  • 2