VB.NET and Serial Device Server

Hi All

I am fairly new to control and was hoping some of you might point me in the right direction.

I have a serial device connected to a serial device server (Lantronix Xport). I can communicate with the device by using a com port redirector but was wanting to create a vb.net program that communicates with the device without having to install the redirector or use a virtual com port. I think this can be done using the IP address and port number of the Xport but aren't really sure where to start looking.

I am familiar with VB.Net so would like to use that if possible.

I would appreciate if anyone could offer any suggestions or tell me if I am on the wrong track.

Regards ilr

Reply to
ilr
Loading thread data ...

I've just started programming a device containing an XPort using VB .NET

2003. I'm not that familiar with .NET, so that's a bit of a struggle, but the XPort end of things is fairly easy. Use the configuration tool provided by Lantronix (can't remember what it's called, not on this PC) to find the device if you don't know it's IP address, as I think it defaults to DHCP. Then set up the serial and TCP/IP parameters using the Web server function of the XPort and save the configuration. In VB, I use a System.Net.Sockets.Socket to open a TCP connection to the XPort, in my case a static IP address and port 10001. Anything you send is transparently transferred to the serial port, no control characters or higher level protocol required. I did try using the TCPClient class, but I've found the Socket provides a bit lower level access and status information.

Regards, Andrew

Reply to
Andrew M

Thanks Andrew

I really appreciate your response.

I'll have a look at that class and see if I can work it out.

Ian

Reply to
ilr

Hi Andrew

If you see this message I was wondering if you could offer any suggestions.

I have tried using system.net.sockets.socket and system.net.sockets.tcpclient but find the response slow. There is about 10 seconds between sending my string and the response. I feel it is probably something fairly simple. I am only sending a fairly small string and was wondering if it might be a timeout issue or something like that?

Any suggestions or assistance would be greately appreciated ilr

Reply to
ilr

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.