SerialPort Problem. Help!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to send a text message via my cell phone using the .net 2.0
SerialPort object. The command to send a text message requires a newline
"\n" and a ctrl-z command to be entered. I've tried entering the control-z
character "(char)0x1A" but that doesn't seem to work. I also set the
encoding on the serial port to unicode, but that doesn't seem to help. Any
ideas?
 
Eric said:
I'm trying to send a text message via my cell phone using the .net 2.0
SerialPort object. The command to send a text message requires a newline
"\n" and a ctrl-z command to be entered. I've tried entering the control-z
character "(char)0x1A" but that doesn't seem to work. I also set the
encoding on the serial port to unicode, but that doesn't seem to help. Any
ideas?

I believe you're looking for the end-of-file (EOF) character, which is
ASCII char 26, 1A in hexadecimal. Try sending that.

jeremiah
 
I am trying the EOF character, 0x1A. But does the SerialPort need to have
ASCII encoding to accept that character?
 
Back
Top