0

Can I connect an RS232 Ethernet converter to a switch and expect to receive data on a PHP server listening to the IP converter?

In Windows I need to install drivers to create a virtual COM port, so I guess if I connect a converter directly to a switch it will not work?

ocrdu
  • 8,705
  • 21
  • 30
  • 42
asterix
  • 101
  • 10
  • `Can I connect an rs232 ethernet converter to a switch and expect to receive a data on a php server listening to the of IP conversor?` How about SSH? What information are you trying to get with RS232? Some servers may have a virtual serial port that you can enable. –  Jul 19 '19 at 17:58
  • Sorry it is not my idea, I am asking because I take a "idea"project where says "connect the conversor rs232 to ethernet to the on board device serial port, then connect the ethernet of the conversor to a switch, then it would be stream data to a server or lan, where a script php will be listen... I think it is not possible right? – asterix Jul 19 '19 at 18:05
  • 2
    Problems like this are usually sovable but only once the exact requirement is defined. At present this is both off topic as a use of technology products rather than a design problem, and unanswerable even on a network topic site given the lack of detail. – Chris Stratton Jul 19 '19 at 18:09
  • Okay I understand, thanks – asterix Jul 19 '19 at 18:10
  • There are plenty of RS232 to ethernet converters out there – Voltage Spike Jul 19 '19 at 18:15
  • Okay you're asking for feasibility rather than an implementation of trying to receive the information that you want to receive. I'm still uncertain how you're going to interface with your switch. I don't think you can plug something into the switch and _***poof***_ out goes information. –  Jul 19 '19 at 18:19
  • My workmate say the RS232 to Ethernet Conversor works like a server with static IP, but I know I need drivers to create a virtual com. I am asking you in this site because I think it not is possible like plug and play to put RS232 over Ethernet without use drivers of conversor. ¡? – asterix Jul 19 '19 at 18:29
  • 1
    This is more of a super user question – Voltage Spike Jul 19 '19 at 18:36

2 Answers2

0

If you want to extend RS232, you can get "extenders over LAN", and there are converters available.

Can I connect an RS232 Ethernet converter to a switch and expect to receive data on a PHP server listening to the IP converter?

If the RS232 converter can be 'seen' (best by using a static IP, and having the subnets set up correctly) by the PHP server and the driver can be installed then yes, the data could be received like a normal COM port. RS232 over LAN is a bit different because of the delays, make sure you have good solid link that isn't dropping packets. Also, if your application requires hardware flow control then the link may not work exactly like a normal COM port.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
Voltage Spike
  • 75,799
  • 36
  • 80
  • 208
  • Okay so and the PHP server I will need to install a drivers to create a virtual COM if I can NAT or forward the IP address – asterix Jul 19 '19 at 19:06
  • You could run through a switch, but the odds of a RS232\LAN link working through a router with NAT are not good, too much latency. The RS232\LAN device might use more than TCP\UDP to communicate or setup the link, if so then only a switch will work. Routers don't forward other protocols (like SNMP for example) if the link uses more than only TCP\UDP then only a switch will work – Voltage Spike Jul 19 '19 at 19:12
  • SO serial to ethernet is not TCP/IP ? I read I need to config a VPN to my local server and the remote server connect to the IP of converter in local pc and install driver for VCOM on the remote server – asterix Jul 19 '19 at 19:21
  • Did you read the previous comment and the phrase TCP? I'm talking about the communication between the VCOM driver and the RS232\LAN converter, sometimes the software uses more than TCP (for configuration) I've had devices like these that don't work if they are not on a local LAN – Voltage Spike Jul 19 '19 at 19:30
  • OH sorry thank now It is clear. Will doesnt works without driver – asterix Jul 19 '19 at 19:46
0

I tested finally the setup. It is working fine transmitting serial rs232 data through LAN/WLAN.

I can recover the message using pyserial without use virtual com from the RS232 to Ethernet server conversor. Only need this serial_for_url("socket://<host>:<port>/?logging=debug")

asterix
  • 101
  • 10