467,074 Members | 1,006 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,074 developers. It's quick & easy.

Sending ASCII Values to serialport in c#

256MB
Hi friends

I am working on serialport in c# ,i am using C#2005 i have successfully done the serial communication with GSM modem and able to send and receive data ,
the main problem ,the serial port class in C# is accepting only ASCII values upto 127 only, the values those greater than 127 ,is automatically converted to value 63(?) ,ihave searched alot in the net and finally found from MSDN that ,serialport class accepts only ASCII values upto 127 and if we want to send values greater than that ,they have given the option as send UTFformat or UNICODE format but this does not solve my problem ,my hardware device which i am connecting through my serialport(rs-232 ) can under stand only ASCII values ,

Any one there to solve this problem ,my exact requirement is to send ASCII values greater than 127 should be send to seriaport class

EX:
string str=FF;//FF is the Hex value but i am converting it to char which is ASCII
serialport.write(str);

the result of the above serialport.write () is returning ? becuse the value is greater than 127,

Regards
N.Msreddy
Apr 3 '07 #1
  • viewed: 2854
Share:

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Joshua Moore | last post: by
reply views Thread by Lee | last post: by
3 posts views Thread by Stu Lock | last post: by
19 posts views Thread by ... | last post: by
1 post views Thread by Ringo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.