Serial port via TCP/IP

Posted on 2007-08-02
Last Modified: 2013-12-17
I need to communicate with a device via its serial port, however the messages will, be sent via the internet, how can this be achieved using .Net 2.0?

I have the IP Address and the port No.
Question by:rowdydowdy
    LVL 3

    Expert Comment

    serial ports do not work on IP address : port.
    You only need to specify mainly COM port, Baud rate.

    Just drag and drop the "serial port" from the toolbox and set the settings
    - OR -
    Dim sp As New System.IO.Ports.SerialPort("COM1", 9600, IO.Ports.Parity.None, 8, IO.Ports.StopBits.One)

    Author Comment

    Sorry I haven't explained this very well, but I am being drip fed information.
    it isn't a serial connection as in serial  port, and I can communicate with the device using telnet, Is there anything in .Net that facilitates this?
    LVL 3

    Expert Comment

    can you pl elaborate the question.
    What is the device. Is there a serial port connection / Internet.
    Can you explain the setup and you intentions.

    Or are you talking about virtual serial ports, whiich I am not good at :(
    LVL 37

    Accepted Solution

    Take a look at the TCPClient class in System.Net ... a quick google will give you tons of examples.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now