By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,012 Members | 1,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,012 IT Pros & Developers. It's quick & easy.

Sending ASCII Values to serialport in c#

100+
P: 366
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
Share this question for a faster answer!
Share on Google+

Post your reply

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