WisGate Connect as Modbus RTU Slave

Hello!

Is it possible to deploy a WisGate Connect with a RAK5802 RS458 Modbus Interface behaving as a Modbus RTU Slave?

I have a customer who is requesting the deployment of a private LoRaWAN Network inside a manufacturing plant to monitor several variables across the site. However, the main requirement is that the measurements of the wireless LoRa sensors must be made available to a legacy system which communicates through Modbus RTU. The old system will behave as a Modbus Master and the WisGate Connect would be a modbus RTU Slave which provides current sensor measurements to the modbus master on demand.

Is this possible with the WisGate Connect? And if not, is this achievable with any other RAK gateway?

Thank you for your help!

Hello @ejimenez ,

We do not have this specific example, but it could be made for sure.
You would need to use the Modbus protocol as a reference and develop the software for that.
You can use this example as base for the project: https://github.com/RAKWireless/rak7391-examples/tree/master/MQTT_to_ModBUS_bridge

Hope this helps!
Best Regards,
Nikola Semov

Hello @ejimenez

That’s an interesting use case indeed. As @Nikola says we have a Modbus to LoRaWAN example but you need it the other way around: LoRaWAN to Modbus. We have a similar service with BACnet: a LoRaWAN to BACnet bridge (here: GitHub - RAKWireless/lorawan-bacnet-bridge: The LoRaWAN to BACnet Bridge is a service to forward LoRaWAN messages from sensors to a BACnet BMS). I guess it could be adapted to Modbus…

This, of course, requires the WisGate Connect to run not only the packet forwarder but a full LNS like The Things Stack or ChirpStack and register the devices on it in order to get the data from them on the bridge using MQTT (as an example).

For the Modbus example we should then be able to map the data from the different sensors into Modbus registers so the master can query the last value every now and then.

Hey Enrique,

I’m currently doing exactly this with a RAK7391/Rak5802 RS485 Modbus interface. The only issue that I’ve encountered so far is that it seems like the RAK5802 does not function properly if you try to use it with a RAK8213 LTE module in one of the PCI slots. Once I removed the 8213, it worked flawlessly.

For reference, I’m using the PyModbus library to set the values of input/holding registers depending on the sensor values.

Hey @xoseperez does that BACnet code work with the WisGate series like the RAK7240V2?
If so are there instructions for that?

Hi @seriph, unfortunately no, it doesn’t.
But we will have BACnet support on the new ARM-based commercial gateways coming soon.