You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone. I'm currently using Zephyr's Modbus library (which is superb, thank you).
The implementation of the gateway currently proposed is a client controlled from the application; a message is received in TCP from the application, the frame is decoded then transmitted to the backend to be sent on the serial port (only in this direction). However, for one project, I needed to develop a gateway to do things like :
serial RTU -> serial RTU
serial RTU -> Raw
a modbus server with two serial RTU interfaces
a modbus server with one Raw and one RTU interface
It's not currently possible to do this with the current library.
So I had to adapt the library to create such a gateway by adding a simple function called modbus_process_gateway, which is called in the modbus_rx_handler. Each time a modbus frame is received on an interface, the other interfaces are instructed to transmit it. This is done in the modbus library, but could be done in the application if a callback was added to receive notification of the reception of a modbus frame.
My question is: would this addition be relevant and interesting?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone. I'm currently using Zephyr's Modbus library (which is superb, thank you).
The implementation of the gateway currently proposed is a client controlled from the application; a message is received in TCP from the application, the frame is decoded then transmitted to the backend to be sent on the serial port (only in this direction). However, for one project, I needed to develop a gateway to do things like :
It's not currently possible to do this with the current library.
So I had to adapt the library to create such a gateway by adding a simple function called modbus_process_gateway, which is called in the modbus_rx_handler. Each time a modbus frame is received on an interface, the other interfaces are instructed to transmit it. This is done in the modbus library, but could be done in the application if a callback was added to receive notification of the reception of a modbus frame.
My question is: would this addition be relevant and interesting?
Actual modbus from Zephyr tree:

With gateway

@jfischer-no
Beta Was this translation helpful? Give feedback.
All reactions