Testing "Wave USB to RS485 Industrial Converter" to 8CH relay on Linux using modpoll


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):

  1. Connected products (Relay to Power 5V, Relay to USB 3 wires or RS485, GND, A+, B-; and USB)
  2. 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.
  3. Checked the starting up of the driver against the mounting of USB ls -l /dev/ttyUSB0.
  4. Added my uid to dialout, for my uid to have access to the /dev/ttyUSB0 (command groups includes dialout)
  5. sudo raspi-config / 5 Interfacing Options / a6 Serial / enable.
  6. 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
  7. 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?

If I try connect to USB rs485 device with Node-RED, I also get a timeout. From log file:

10 Dec 21:15:11 - [warn] [modbus-read:174978cb.b7da67] Modbus Failure On State sending Get More About It By Logging
10 Dec 21:15:11 - [error] [modbus-read:174978cb.b7da67] Timed out

Here is the flow:


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.