CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2012
    Posts
    2

    COM communications via Socket programming

    Hello, and sorry if this is not the right place to post.

    This is my situation:
    I have a serial device connected to the LAN through a TCP/IP-Serial port converter (Datacom ATC-1000). This converter is configured as a telnet server on a static IP address and port, and comm port settings like {1200,N,8,1}.

    I am able to communicate with the device from my PC without problems using Eltima Serial to Ethernet Connector 5.0 to create a virtual COM port, and the serial port class of .NET framework.

    My problem is: I'd like to skip completely the virtual COM port creation, and communicate directly with the TCP/IP-Serial port converter (and device) using socket programming (with System.Net.Sockets classes). Hyperterminal can do it establishing a TCP/IP (Winsock) connection to the converter.

    My question is: will I have communication problems due to baud rate issues ? (the device communicates only at 1200, while the socket classes send data at the maximum speed as possible as I know). If the answer is yes, how can solve the issue ? (for example, how can emulate a baud rate in socket communication ?)

    Thank you for your replies.

    Massimiliano

  2. #2
    Join Date
    Apr 2012
    Posts
    2

    Resolved Re: COM communications via Socket programming

    Hello again.

    I can now answer the issue myself.. I've developed a simple test program that communicates with the ethernet/serial port converter using raw socket programming, and all is ok without warring about baud rate.

  3. #3
    Join Date
    Aug 2015
    Posts
    1

    Re: COM communications via Socket programming

    Quote Originally Posted by max241274 View Post
    Hello again.

    I can now answer the issue myself.. I've developed a simple test program that communicates with the ethernet/serial port converter using raw socket programming, and all is ok without warring about baud rate.
    Hello!
    I would like to ask, do you still have that program? I have the same issue, but i can't figure out how to create a program like this.
    Thank you!

  4. #4
    Join Date
    Mar 2001
    Posts
    2,529

    Resolved Re: COM communications via Socket programming

    Here's a book on it:

    http://www.amazon.com/TCP-IP-Sockets.../dp/0124660517

    This will be a concise guide that explains the in's and outs. Hope it helps.
    ahoodin
    To keep the plot moving, that's why.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured