Hi,
I bought 2 x Waveshare products, which I want to hook up to Node-RED - once I can confirm that they work:
I am not able to get these products talking to one another on Raspberry Pi per my tests with modpoll on modbusdriver - a terminal app.
I have done the following (Raspberry Pi - 3B+ - with latest Buster OS):
- Connected products (Relay to Power 5V, Relay to USB 3 wires or RS485, GND, A+, B-; and USB)
- Checked the drivers on RPi - (already in the latest kernel of OS Buster) - checked this with command
lsmod | grep "usbserial"
gives the output:usbserial 36864 1 ftdi_sio
- which is correct. - Checked the starting up of the driver against the mounting of USB
ls -l /dev/ttyUSB0
. - Added my uid to dialout, for my uid to have access to the /dev/ttyUSB0 (command
groups
includes dialout) - sudo raspi-config / 5 Interfacing Options / a6 Serial / enable.
- Installed ModBus testing software to be run from ssh, with commands:
a) wget https://www.modbusdriver.com/downloads/modpoll.tgz
b) tar xzf modpoll.tgz && rm modpoll.tgz
c) export PATH=$PWD/modpoll/linux_arm-eabihf:$PATH - Tested the above config with modbusdriver modpoll, as follows:
modpoll -m rtu -b 9600 /dev/ttyUSB0
Above command gives the following:
modpoll 3.9 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright (c) 2002-2020 proconX Pty Ltd
Visit https://www.modbusdriver.com for Modbus libraries and tools.
Protocol configuration: Modbus RTU, FC3
Slave configuration...: address = 1, start reference = 1, count = 1
Communication.........: /dev/ttyUSB0, 9600, 8, 1, even, t/o 1.00 s, poll rate 1000 ms
Data type.............: 16-bit register, output (holding) register table
-- Polling slave...
Reply time-out!
When I send this command, I can see the Tx light on the USB come on, and the Rx on the 8CH relay come on briefly. So their is comms.
PS: I thought that the 8CH relay's modbus protocols will have some clues, but have not been able to work that out.
What should I do?