LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-17-2008, 12:01 PM   #1
duki
LQ Newbie
 
Registered: Feb 2007
Posts: 8

Rep: Reputation: 0
C# COM ports in Linux


Please Help!!!

We're trying to communicate through a COM port in Linux using C#. It was working great in windows because we just dragged over the COM toolbox option and configured it. Do we need to manually code the COM port in mono for Linux to use it?

Thanks!
 
Old 10-17-2008, 12:37 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Actually, high-level support for the serial port was conspicuously *lacking* in .Net until Microsoft introduced the "System.IO.Ports" namespace relatively late in the game (introduced in .Net 2.0, circa VS2005):

http://www.dreamincode.net/forums/showtopic37361.htm

Anyway, you might be able to do anything you want simply by reading from and writing to "/dev/ttyS0".

Here's a good link on comm programming in general:

http://tldp.org/HOWTO/Serial-Programming-HOWTO/
 
Old 10-17-2008, 01:02 PM   #3
duki
LQ Newbie
 
Registered: Feb 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Ok we've gotten to the part of declaring a serial port as follows:

SerialPort port = new SerialPort("ttyS6",19200,Parity.None, 8, StopBits.One);


But we can't get it to send information out of the COMM. We've tried ttyS0-f with no luck. Any clue why it's not working? We've also tried /dev/ttyS0-f
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
open ports for utorrent using iptables n close smpt to that ports shtorrent00 Linux - Networking 2 09-30-2008 03:34 PM
Problem opening ports - ports appear open, but do not work. computer_freak_8 Linux - Software 10 09-20-2008 09:39 PM
how? redirect apache2 outbound ports to specific ports w/iptables? nowshining Linux - Security 5 05-27-2008 02:46 AM
reject all ip & ports and allow only some ports with iptables ysar68 Linux - Security 1 05-12-2007 08:50 PM
are outbound ports converged while local ports are ok ? inanc Linux - Networking 0 02-06-2007 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration