Thread: Send and Recive Information through the serial Port RS232

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    12

    Send and Recive Information through the serial Port RS232

    Hi guys, hopping that youve been fun, well , lets see , i have a little trouble here, i need to do a program that recive information from some machine, binary code, through the serial port, so im using C# but until now i have no idea how to do this, at first i think that maybe C# have some libraries in order to manage the port but anything appear yet.... so, if someone have any idea.... i ll be appriciate it, also im thiking using .dll but... i dont know .... rude prob no ?
    or even betta if someone have a .snl already working that would be like heaven....
    Last edited by Salem; 04-14-2006 at 02:25 AM. Reason: Remove font size abuse!

  2. #2
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    From what i know you will use System.IO.Ports.SerialPort class.

    Info on how to use this class with some examples can be found here http://www.codeproject.com/csharp/Se...munication.asp.

    On a side note if you want to attempt to do it trough parallell port then I'd suggest the use of PortAcces.Output() which can be used trough a dll ... more info at: http://www.codeproject.com/csharp/cspplcds.asp

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    12
    I forgot to mention that im using Framework 1.1 an the visual studio 2003 , so that class that u mention on top is not on this version.

  4. #4
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    SUMMARYOut-of-the-box, the only way of coding RS232 serial communications applications in the .NET environment is to import the outdated and somewhat limited MSComm ActiveX control. This article describes the development of a lean, multithreaded, and modern RS232 base class library in C# managed code. The library uses Platform Invocation Services to interact with the Win32 API directly. Application programmers can use the library from any .NET language through inheritance; the article explores examples written in C# and Visual Basic .NET.
    http://msdn.microsoft.com/netframewo...alComm/TOC.ASP

    After some googling, they use CreateFile ( a win32 function ) , anyway I think you should take a look at that article as a start.

  5. #5
    Registered User
    Join Date
    Jun 2005
    Posts
    12
    ok, im gonna look the article tnks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Send information to this IP.
    By Queatrix in forum Networking/Device Communication
    Replies: 6
    Last Post: 02-03-2006, 03:00 PM
  2. send and recive
    By laasunde in forum C++ Programming
    Replies: 6
    Last Post: 01-22-2003, 09:22 AM