4

We need to be able to make a com (serial) connection remotely off site from PLC type device.

We have completed a POC for sending some signals to Azure IoT utilizing a Siemens IoT2020 running linux with a NB cellular modem on the Cat-M1 network. The reason for the NB cellular is due to signal strength in some sites as most locations don’t have network infrastructure in place. The main goal was to achieve an out of service signal and switch a couple of relays remotely which we achieved with both data and via sms.

As ideally (security by obscurity) and practically these modems are on the carriers private IP range although we can look at ipv6 if required.

We connected to a 5V modem port on the controller with a couple of cheap serial adapters however only received rubbish most of the time and at a set baud rate presume that we would have needed to use control lines and a handshake. We also presume that they are likely using proprietary communication.

We have software that can connect and run the PLC from a RJ45 connection on the controller to a hand held terminal device. The RJ45 can also connect to a Bluetooth device that then shares the com port to either an App on a smart phone or Windows computer. It has the option on Windows to connect to a com port and mentions RS232, Com port and Baud rate. There is also an option to connect by IP Address and com port.

Is there a practical way to do serial over cellular on IoT like devices using embedded Linux or similar?

Most research shows a lot of off the shelf units and dev boards are geared up to forward over ethernet, or to connect with a local Windows PC and then forward the virtual com port. We need to do both the connection with Azure IoT and forward the com port.

6
  • 2
    "security by obscurity" isn't
    – Mawg
    Commented Aug 6, 2018 at 9:27
  • 1
    Sorry, I am confused - " a couple of cheap serial adapters however only received rubbish most of the time and at a set baud rate presume that we would have needed to use control lines and a handshake. We also presume that they are likely using proprietary communication" 1) do you have any documentation to explain how to interpret the data received over serial port? 2) have you tried locally, just reading over serial directly to a PC/Raspberry Pi, etc?
    – Mawg
    Commented Aug 6, 2018 at 9:29
  • 1
    We have no information on the controller and it's likely proprietary code. We took a punt as we new the baud rate to see if it may have been a standard format. The manufacturers provide the App that can control the PLC. We tried a terminal in Windows locally to read serial data. Security by obscurity with devices having a private IP is in my mind quite secure. It's not like having a tcp port open on some high numbered port that publicly accessible.
    – AntC
    Commented Aug 6, 2018 at 12:25
  • 1
    I can't see how you can expect to proceed, if you don't understand the data format. Or, am I missing something? Maybe you are just the middleman and want to pass it on to someone who does understand it? All of my telemetry projects read from serial to a local industrial PC or a Raspberry Pi, which then passes the data to a RESTful API on my server.
    – Mawg
    Commented Aug 6, 2018 at 12:53
  • Raw forwarding of the serial port over a cellular connection is unlikely to work well, things like latency and possible packet loss will have a huge impact. Much better to interface with the device locally then send commands and status to the local app. This will require you knowing the details of the protocol. Or just ask the supplier for a remote access solution rather than trying to roll your own.
    – hardillb
    Commented Aug 6, 2018 at 13:27

1 Answer 1

3

If I get your question correctly, you want to gather data from the IoT devices using a serial protocol over rs232/485. and then send this data onto some remote server using the cellular data.

If that is the case then you could use a gsm modem to connect and send data over the cellular data network (gprs). This is a standard practice. It would look something like this

PLC -> Modem -> Remote Server

The modem shall have com interface to connect and receive data from the PLC and also will house the gsm modem accepting a sim. The modem will convert the received data into the desired format (for e.g JSON) and send it over to a server (this could be your Azure IOT hub) using the gsm modem using application level protocols like http/MQTT etc.

We have been using this tech successfully for quite some time now.

4
  • 1
    Sorry I might not have been clear. The manufacturer provides an App that interfaces with the controller using a serial port which is achieved by presenting the port to Windows or smart phone by Bluetooth. There is also a small terminal device they supply that can connect straight to the controller via RJ45 port and has same functionality as App. We need to be able to forward a virtual serial port over cellular / internet that a Windows client can then use App to connect. Or we can likely serve up the port on an accessible serial com server as we can connect by ip address and port from App..
    – AntC
    Commented Aug 6, 2018 at 12:31
  • Have you asked the manufacturer their advice?
    – Mawg
    Commented Aug 6, 2018 at 12:55
  • If we simplify your scenario, its a device pushing data onto a pc/phone/terminal device, now you need to send this data over to another pc over gprs. so just use the same modem i talked about and on the server that receives the data have a program (say a rest api) which will interpret the data in the required format. However this will require the manufacturer to expose some apis to read/write data. Modbus is the most common and simplest protocol supported by most devices, check if they support modbus.
    – Subbu
    Commented Aug 6, 2018 at 13:45
  • I might be missing something however isn't what I'm trying to achieve what this device does?
    – AntC
    Commented Aug 7, 2018 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.