Tuesday, November 20, 2018

How do I go about connecting a local python server to an Ethernet to serial converter which is then connected to an arduino which is sending/receiving serial data?

I have inherited an existing project where I basically have to send arduino data via serial back to my python server which will be running locally. But there is a converter in the middle. I think this is essentially acting as a virtual com port. It has it's own IP address. The end goal is to be able to send RS485 messages to and from the arduino/python server.

I can't find any resources for doing what I intend to do so I'm having some trouble.

Am I right in saying that the first step is to write a TCPClient (in python?) Which will then communicate with the converter, and from there it will allow RS485 messages to pass through? I've tried using the socket library in Python to connect to the converter's IP address, but all I'm getting are "Network is unreachable" error messages.

What I inherited was this system working already, so I can see the converter is working as it's intended. I have arduino code and a piece of software (not open source) which is sending the RS485 messages every x minutes. So my project is to basically do whatever the software is doing in terms of sending the arduino messages, and from there, process the data in a different way.



No comments:

Post a Comment