473,563 Members | 2,904 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending ASCII Values to serialport in c#

366 Contributor
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.writ e(str);

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

Regards
N.Msreddy
Apr 3 '07 #1
0 3155

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

Similar topics

1
8455
by: Don Tucker | last post by:
Hello, I am using Visual Studio .Net 2005 beta. I have my computer's two comm ports connected with a serial cable (and null modem). I'm trying to write the letter 'a' out on comm port 1 with the C# program and see it appear in a Hyperterminal window open on comm port 2. Hyperterminal is configured with the same settings that the port 1 is...
0
8484
by: Joshua Moore | last post by:
I'm trying to convert from a lot of invoked code to c# 2.0 SerialPort code. I can't find a way to set fOutxCtsFlow to true (maybe CTSEnable?) and fRtsControl = RTS_CONTROL_HANDSHAKE (RtsEnable?). Also, do I need to set the handshaking? Below is the old and attempted new (that continually gets a timeout error on read. I upped the read...
0
1316
by: Lee | last post by:
Hi, I am trying to send and receive a file (it is actually an xml file, however any file may possibly be sent) using;- sending ..... public void send() {
3
3526
by: Stu Lock | last post by:
Hi, I am trying to write a script that sends a code to a COM port to open a till draw. The code at the bottom of the page (written in C) is what the suppliers sent as an example. I have used the SerialPort class in .Net 2.0 to try and send the same message. So far I have this on a button click: ...
19
11207
by: ... | last post by:
Hi I need to send a chr(255) to a serial port. When I send it, through comm.write (chr(255)) it sends a chr(63) ... in Hex, I write chr(&FF) and it actually sends chr(&3F) ... why does this happen, and how can I send it right ? I'm using vb.net 2005 express with framework 2.0 Thanks for an answear ...
1
4377
by: Ringo | last post by:
I'm trying to send numbers over the serial port as bytes, not strings. What I mean is if I want to send a 255, that should be 1 byte, not a 2 followed by a 5 and a 5. I'm trying to convert a borland c++ app. This is what the c++ app does int8B = 255; WriteFile(serialPort,&int8B,1,&bytesWritten,NULL); int8 = gainSlider->Position;...
2
2022
by: emilyhf | last post by:
This C# program is use to convert decimal to hex and send through serial port in ASCII characters. For example: I try to send a string variable in Hex format which i need to convert to a standart ASCII string; eg "70d9b7" where "b7" is the checksum of 2's complement. i have some problem in convert the "d9" and "b7" to the correct ASCII string as...
3
31243
by: Adriano | last post by:
Hello, I'm developing an application in VB.NET 2005 that communicates with a device through RS232, and need to send the following sequence of hexadecimal data to the device: 0xFF, 0x01, 0xC3, 0xE3, 0xFF, 0xFF. That's the configuration:
2
3324
by: Tenaious | last post by:
Hi, Sorry about such a ridicules question, but I have no clue what’s going on. I'm Using Visual Studio 08, programming in C++. I have a Serial Port created with: static System::IO::Ports::SerialPort^ SP1= (gcnew System::IO::Ports::SerialPort()); SP1->PortName="COM1";
0
7665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.