I have a Rpi-4 running HA and it talks to the ethernet cable o.k. I am adding Modbus integration devices and could get nothing working. A bit ( well quite a lot really) of poking about I have tried a serial adaptor on a (Win10) machine usuing a Modbus monitor programme, and all my devices work as expected. I can look at the sent and received signals on my DSO and all looks fine. The RPI does not seem to send anything. I go into devloper tools and select a register to write and run the test nothing happens no error massages, just a nice green tick - it thinks it’s done. So I made up a cable to allow me to power the RPi USB stick converter form the same supply as it is usuing in the RPI installation and (after sawing off some of the case so it would fit) inserted it in the P.C. Couldn’t connect, but I changed the COM port form COM3 (works with my other adaptor) to COM4 and bingo I can talk through the RPi adaptor from the P.C. to all devices. Now how does the RPi know where the correct registers are in my serial adaptor - Is there an alternate destination port for serial besides dev/tty/USB0? which would mimick COM4? Thanks for your patience! Dangerousdave.
Replyimg to mmyself - after a bit of fudge rewiring I have fitted the COM3 adaptor (USB to RS485) and it seems to talk to the network. More testing to come, but for the moment this question is answer by me.
Incidently, looking at the components on this USB/RS485 adaptoe I found the manufacturer has added a 120 Ohm resistor across the modbus lines. I will remove this as my lines are terminated each end and the adaptor (bus master) sits about the centre. Two terminators = good, three terminators too much load!