I'm using modbus RTU over RS485 for a project. I use a RaspberryPI as master and Arduino Pro Mini as slaves.
My problem is the following : I plug a sensors on the bus and it returs its value. I plug another sensor, this one returns its value but the first sensor doesn't return its value anymore. So it looks evident something makes them incompatible.
I tried to diagnose it using a logic analyser and the results are the following : When idle, the lines A and B from the master are respectively HIGH and LOW. When idle, the lines A and B from the slave are both HIGH.
I wonder if the line B shouldn't be LOW.. Looking why this line was HIGH, I discovered that the line is pulled HIGH because of the library I use on Arduino. This library pulls DE and RE HIGH when transmitting data, LOW otherwise. (On the max485 module, I tied DE and RE together. I'm not sure it's a good practice)
Here is the library I use on arduino : https://platformio.org/lib/show/1727/ModbusSerial
On logic analyser (1 slave connected to the master) :
I tried with 2 differents usb/rs485 transceivers
So my question is: Is it normal to get HIGH on both lines A and B ? And if not, what can I do to correct it ?
Thanks in advance !!