C# COM ports in Linux

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Jun 2006
Posts: 1,169
Reputation: Duki has a spectacular aura about Duki has a spectacular aura about Duki has a spectacular aura about 
Solved Threads: 9
Duki's Avatar
Duki Duki is offline Offline
Veteran Poster

C# COM ports in Linux

 
0
  #1
Oct 17th, 2008
Hey everyone,

we're still working trying to get Linux to communicate to our robot via an RS232 port. We added this code to the project in Mono:

  1. Using System.Ports.IO
  2. SerialPort ports = new SerialPort("ttyS0",19200,Parity.None, 8, StopBits.One);

We can't get anything sent out of our COM ports. We're not even sure if we're coding it correctly. Is ttyS0 (we've tried S0-Sf) what we should be putting in the code? Please help!!

thanks!
Last edited by Duki; Oct 17th, 2008 at 3:26 pm.
It is practically impossible to teach good programming style to students that have had prior exposure to Basic; as potential programmers they are mentally mutilated beyond hope of regeneration.

-Edsger Dijkstra
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: C# COM ports in Linux

 
0
  #2
Oct 17th, 2008
Start at the beginning

Does your kernel have serial built in?
If so, what serial ports does it find? and tell you are available?
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 1,169
Reputation: Duki has a spectacular aura about Duki has a spectacular aura about Duki has a spectacular aura about 
Solved Threads: 9
Duki's Avatar
Duki Duki is offline Offline
Veteran Poster

Re: C# COM ports in Linux

 
0
  #3
Oct 20th, 2008
I'm not sure. We tried some command, can't remember what it was, and it showed ttyS0-3
It is practically impossible to teach good programming style to students that have had prior exposure to Basic; as potential programmers they are mentally mutilated beyond hope of regeneration.

-Edsger Dijkstra
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: C# COM ports in Linux

 
0
  #4
Oct 20th, 2008
Well, having the kernel support would be somewhat essential to your program, so it would make sense that you learn how to tell.

If you are sure you have ttyS0, thats a terminal running through a serial port, not the serial port itself.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 1,169
Reputation: Duki has a spectacular aura about Duki has a spectacular aura about Duki has a spectacular aura about 
Solved Threads: 9
Duki's Avatar
Duki Duki is offline Offline
Veteran Poster

Re: C# COM ports in Linux

 
0
  #5
Oct 20th, 2008
Hmm, ok. What commands can I enter to see my com ports?
It is practically impossible to teach good programming style to students that have had prior exposure to Basic; as potential programmers they are mentally mutilated beyond hope of regeneration.

-Edsger Dijkstra
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC