SerialPort Problem. Help!

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?
 
J

jeremiah johnson

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
 
G

Guest

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top