Author Topic: Connecting Xport to a remote server  (Read 1221 times)

0 Members and 1 Guest are viewing this topic.

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Connecting Xport to a remote server
« on: September 03, 2020, 02:29:03 pm »
I have an embedded project where my PSoC6 processor talks to a Lantronix Xport over a 115,200 baud serial link - the PSoC6 code is quite far along with code that responds to 2-letter commands such as 'di' that gives a directory listing of the files my system has stored - this is all self-developed in C using Cypress Creator 4.2 and GCC C, no RTOS, no DOS, just Cypress-provided C drivers for stuff like the Quad SPI flash memory IC I'm using.

I have been successfully developing on this for a while simulating the UI by connecting to it from a remote PC using TeraTerm; when the initial TeraTerm connection window pops up, I chose the TCP/IP option, enter the IP address of the Xport, change the TCP port# to 10001 (default for the Xport), choose the 'other' radio button and set the Protocol: to IPv4.  TeraTerm then connects immediately and stays connected all day.  So far so good.

Now I need to make the Xport connect to a remote server which I don't have control over and the Server guy has no experience with Xport.  I have discovered (around p52/53 of the Xport UG) that I can configure the Xport so that it can be commanded to establish an Ethernet link by sending a command over the serial port something like C10.0.0.12/10001 and that is supposed to connect to the device at the other end and, if I configure it to respond, I can get a 1-letter response like Y or N to indicate success.

Sorry it's taken quite a while to get there but here is my question.  What needs to be set up at the Server end so that the incoming connection instigated by the Xport is successful?  Lantronix Tech Support tell me that they are assuming a second Xport at the other end but (disappointingly IMHO) they can't (or won't) provide information on a driver or setup of what the remote server would need to have configured to accept the incoming connection.  I think the server is Windows - I'll check.  Can anyone give me any help or advice on this?
If at first you don't succeed, get a bigger hammer
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 7281
  • Country: hr
Re: Connecting Xport to a remote server
« Reply #1 on: September 03, 2020, 03:49:53 pm »
I have an embedded project where my PSoC6 processor talks to a Lantronix Xport over a 115,200 baud serial link - the PSoC6 code is quite far along with code that responds to 2-letter commands such as 'di' that gives a directory listing of the files my system has stored - this is all self-developed in C using Cypress Creator 4.2 and GCC C, no RTOS, no DOS, just Cypress-provided C drivers for stuff like the Quad SPI flash memory IC I'm using.

I have been successfully developing on this for a while simulating the UI by connecting to it from a remote PC using TeraTerm; when the initial TeraTerm connection window pops up, I chose the TCP/IP option, enter the IP address of the Xport, change the TCP port# to 10001 (default for the Xport), choose the 'other' radio button and set the Protocol: to IPv4.  TeraTerm then connects immediately and stays connected all day.  So far so good.

Now I need to make the Xport connect to a remote server which I don't have control over and the Server guy has no experience with Xport.  I have discovered (around p52/53 of the Xport UG) that I can configure the Xport so that it can be commanded to establish an Ethernet link by sending a command over the serial port something like C10.0.0.12/10001 and that is supposed to connect to the device at the other end and, if I configure it to respond, I can get a 1-letter response like Y or N to indicate success.

Sorry it's taken quite a while to get there but here is my question.  What needs to be set up at the Server end so that the incoming connection instigated by the Xport is successful?  Lantronix Tech Support tell me that they are assuming a second Xport at the other end but (disappointingly IMHO) they can't (or won't) provide information on a driver or setup of what the remote server would need to have configured to accept the incoming connection.  I think the server is Windows - I'll check.  Can anyone give me any help or advice on this?
If other side is windows you can map remote xport to a virtual serial port and just use that.
 

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Connecting Xport to a remote server
« Reply #2 on: September 03, 2020, 04:59:59 pm »
If other side is windows you can map remote xport to a virtual serial port and just use that.
How do I do that?
If at first you don't succeed, get a bigger hammer
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 7281
  • Country: hr
Re: Connecting Xport to a remote server
« Reply #3 on: September 03, 2020, 06:04:18 pm »
There is a windows driver that creates virtual serial port that is tunneled to an IP adress of X-port on the other side.
It completely encapsulates serial port on windows trough TCP/IP to serial port on X-port. If you put MAX232 on X-port on the other side you get virtual RS232 cable...

So you map X-port to serial port on windows, and when you open COM port on windows, you create tunnel to serial interface on X-port. Your UART data goes there and back.
 
The following users thanked this post: Gandalf_Sr

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Connecting Xport to a remote server
« Reply #4 on: September 03, 2020, 06:48:57 pm »
There is a windows driver that creates virtual serial port that is tunneled to an IP adress of X-port on the other side.
It completely encapsulates serial port on windows trough TCP/IP to serial port on X-port. If you put MAX232 on X-port on the other side you get virtual RS232 cable...

So you map X-port to serial port on windows, and when you open COM port on windows, you create tunnel to serial interface on X-port. Your UART data goes there and back.
Thanks. But doesn't one end of the link have to establish a connection with the other before data can be passed?
If at first you don't succeed, get a bigger hammer
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 7281
  • Country: hr
Re: Connecting Xport to a remote server
« Reply #5 on: September 03, 2020, 09:02:28 pm »
There is a windows driver that creates virtual serial port that is tunneled to an IP adress of X-port on the other side.
It completely encapsulates serial port on windows trough TCP/IP to serial port on X-port. If you put MAX232 on X-port on the other side you get virtual RS232 cable...

So you map X-port to serial port on windows, and when you open COM port on windows, you create tunnel to serial interface on X-port. Your UART data goes there and back.
Thanks. But doesn't one end of the link have to establish a connection with the other before data can be passed?

It does but it is transparent to the user..
 

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 2455
  • Country: gb
Re: Connecting Xport to a remote server
« Reply #6 on: September 04, 2020, 02:26:53 pm »
If you mean 'remote' as-in across the internet, then you are likely to run into firewall problems.
I have never used X-port before, but if it is initiating a connection to a windows server, you have to get through the firewall first.
The X-port would need to use the 'public' IP address of the receiving network, at a specified port.
The firewall would need a rule to say incoming connections on that port are forwarded to the server (at its different IP address) and specified port (probably different port).
Internet search for 'port forwarding' to get more info.
However, it might be more complicated than that in a commercial setting.
 

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Connecting Xport to a remote server
« Reply #7 on: September 04, 2020, 05:14:04 pm »
If you mean 'remote' as-in across the internet, then you are likely to run into firewall problems.
I have never used X-port before, but if it is initiating a connection to a windows server, you have to get through the firewall first.
The X-port would need to use the 'public' IP address of the receiving network, at a specified port.
The firewall would need a rule to say incoming connections on that port are forwarded to the server (at its different IP address) and specified port (probably different port).
Internet search for 'port forwarding' to get more info.
However, it might be more complicated than that in a commercial setting.
Thanks.  I know about port forwarding and would likely have to forward port 10001 in my router to the LAN side IP address that the Xport is connected to (to make it work through NAT).  I now understand that the remote end is going to be Linux Ubuntu about which I know very little - I'm also not responsible for the setup or maintenance of the remote end.  Lantronix support have come back to me and said this...

1. 'Modem mode' (a feature of the Xport) is propriety to Lantronix with AT-style modem commands - I think they mean the AT style commands which, when sent down the serial line, cause the Ethernet side to try to connect to a specific remote IP address.

2. When establishing the connecting using the modem emulator, the Xport connects to a TCP server with a specific IP/PORT. It is not mandatory to be Xport at the other side.
If at first you don't succeed, get a bigger hammer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf