Home/Support/Support Forum/XBee3 Modbus RS485

XBee3 Modbus RS485

0 votes
Hi,
is it possible to do Modbus RTU / RS485 Communication via Micropython on XBee3 Pro?

There's the D7 (DIO7) setting that enables RS-485 communication either idle high or idle low. But I cannot find any documentation on how to send and receive the hex commands.

I assume that this must all be done via the primary UART serial line (the only one for XBee3) and using a logic level converter (for higher voltage on the slave RS-485 lines).

Been searching with combinations of "xbee, micropython, modbus rs-485". Only thing I can find is a micropython-modbus library which requires "from machine import UART" which XBee3 doesn't have.

Any help is appreciated. Thank you.
asked Jun 29 in XBee3 802.15.4 by lambu0815 New to the Community (3 points)

Please log in or register to answer this question.

2 Answers

0 votes
I don't think you will be able to via Micro Python but via the UART it should work.
answered Jun 29 by mvut Veteran of the Digi Community (15,409 points)
just can't figure out what to do with that answer.
0 votes
I'm currently trying via XCTU to send hex requests via UART + logic level converter. No answer.
answered Jun 30 by lambu0815 New to the Community (3 points)
I think you need to look at https://www.digi.com/support/knowledge-base/modbus-protocol

I would suggest using the Assemble packet function in XCTU to send your data packets with.
Actually I didn't want to do Modbus over RF. I am thinking of the XBee as a MC that I want to use as a Modbus Master using Micropython. The results will than be pushed over the RF network.
I do not know if that is possible. You would have to create the code first and see if it is small enough to run on the XBee or not.
...