473,795 Members | 3,002 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

read/write string from a serial port using C#

1 New Member
I have to writen application in C# that can read or write data from a serial port.
Can you please send any code that can help me for that. Or even material that can help me understanding this.
Kindly do guide me through any tutorial,help book or even sugestion to initiate this project.
Your kind guidence means alot to me .
Jul 31 '07 #1
5 8173
r035198x
13,262 MVP
I have to writen application in C# that can read or write data from a serial port.
Can you please send any code that can help me for that. Or even material that can help me understanding this.
Kindly do guide me through any tutorial,help book or even sugestion to initiate this project.
Your kind guidence means alot to me .
Moved to .NET forum
Jul 31 '07 #2
Plater
7,872 Recognized Expert Expert
Check out this thread for some sample code:
http://www.thescripts.com/forum/thread685229.html
Jul 31 '07 #3
bartonc
6,596 Recognized Expert Expert
Moved to .NET forum
This is the second time that I've seen admins (Mary and r035198x) move threads without leaving a redirect. Perhaps your defaults are different than mere moderators or maybe there is a good reason for doing so. I just feel sorry for the poor member with only one post, not knowing their way around the site, returning to find a "missing post". That's all.
Jul 31 '07 #4
Plater
7,872 Recognized Expert Expert
That is what Control Pannel is for, to see all the recent activity on posts (subscribed)
OR check under your user profile where it says "Find all threads started by <username>".
It would be nice to see it I suppose, but I view it as rather worthless since more then 20 questions get posted everyday. (I see probably a good 30 new threads a day, just in the .NET section), thus making the thread hard to find regardless as it gets bumped down.

This is the second time that I've seen admins (Mary and r035198x) move threads without leaving a redirect. Perhaps your defaults are different than mere moderators or maybe there is a good reason for doing so. I just feel sorry for the poor member with only one post, not knowing their way around the site, returning to find a "missing post". That's all.
Jul 31 '07 #5
r035198x
13,262 MVP
This is the second time that I've seen admins (Mary and r035198x) move threads without leaving a redirect. Perhaps your defaults are different than mere moderators or maybe there is a good reason for doing so. I just feel sorry for the poor member with only one post, not knowing their way around the site, returning to find a "missing post". That's all.
Sorry Barton, I usually only leave a redirect if the thread was in the introductions forum only. I'll try to add the Software and Misc to that list as well.
Jul 31 '07 #6

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

Similar topics

8
14777
by: collinm | last post by:
hi we use linux and c language under bash i do echo -e \\000\\000\\000\\000\000\\001Z00\\002AA LINUX \\004 >/dev/ttyS2 that send command to a led display (alpha sign communication)
3
5056
by: collinm | last post by:
hi i send a command to a led display, the led display is suppose to return me some character i write a string on a serial port void ledDisplayExist() { char msg={'\0', '\0', '\0', '\0', '\0', '\1', 'Z', '0', '0',
17
7939
by: luca72 | last post by:
Hello at all sorry for my english but i'm Italian. I use pyserial to communicate via rs232 with an extarnal device called smartmouse. I write the exact line that i want , but when i read i read only the echo ond not the other bytes. When i meke the same project with delphi i solve this problem with the call of the sleep. But in python it don't work. Have you got some ideas for solve my problem?
0
1543
by: daikeechi | last post by:
hello guys .. i want to perform pc to pc chatting via null modem cable.. i managed to write and sent data to serial port but how to write loops to read data from serial port ? i'm using visual c++ 2005 express editon .. below is my code .. #pragma endregion public: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { String^ msg;
4
11809
by: rowan | last post by:
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when you open a serial port. This is not what I want to do. I need to change the timeout each time I do a "read" on the serial port, depending on which part of the protocol I've got to. Sometimes a return character is expected within half a second,...
0
1460
by: darkking | last post by:
Ok, I'm trying to read data from the serial port. Problem is, that i always have to query the port for new data, and in 99.9% of acses my query doesn't return the result cause of the fact it's done when the modems is seding the answers. I've tried using a timer, but still i get errors. Same while using DTR enable/false. How i can safely send the query without getting over the momdem response ? I'm using DataRecived event, to read the...
0
4569
by: ghjk | last post by:
I want to read sms from GSM modem using C# in serial communication. I wrote the code. But i want to do it automatically. I put my code here and please tell me how can i do it automatically. public partial class SMS : Form { //create an Serial Port object SerialPort sp = new SerialPort(); public SMS() {
1
3650
by: ghjk | last post by:
I'm write code to read data from GSM modem. but it couldn't read modem response. Could you please help me? I'll post my code. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO.Ports; using System.Threading;
2
10405
by: mmrasheed | last post by:
Hi, I am newbie in python. I am working on Telit GM862 GPS/GPRS module which has python interpreter built in. But it seems this problem is pretty much related to general python structure. I need a promt/terminal when the device is connected to PC. If user enters a command by serial port and press "Enter" then the data is read by the device and work on the command. This is similar to readline() function. Unfortunately there is no...
1
4299
by: rfarley | last post by:
Hi, I am using the pyserial module and am trying to read the serial port from an accelerometer (LIS302DL). It has an option in which you write "*debug\r\n" and then you read the data (three axes output) from the output. I use hyperterminal with the below settings and it works fine: baudrate=115200 databits=8
0
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7541
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5437
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2920
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.