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

**URL:** <https://discourse.nodered.org/t/testing-wave-usb-to-rs485-industrial-converter-to-8ch-relay-on-linux-using-modpoll/37320>\
**Category:** General\
**Created:** [10 December 2020 18:37 UTC](https://discourse.nodered.org/t/testing-wave-usb-to-rs485-industrial-converter-to-8ch-relay-on-linux-using-modpoll/37320 "2020-12-10T18:37:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IoTPlay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotplay/32/40_2.png) [@IoTPlay](https://discourse.nodered.org/u/IoTPlay)\
**Post date:** [10 December 2020 18:37 UTC](https://discourse.nodered.org/t/testing-wave-usb-to-rs485-industrial-converter-to-8ch-relay-on-linux-using-modpoll/37320/1 "2020-12-10T18:37:20Z")

</div>

Hi,

I bought 2 x Waveshare products, which I want to hook up to Node-RED - once I can confirm that they work:

- [Wave USB to RS485 Industrial Converter](https://www.robotics.org.za/W17286)
- [Wave 8 Channel Industrial Relay - RS485 MODBUS](https://www.robotics.org.za/W17658)

I am not able to get these products talking to one another on Raspberry Pi per my tests with [modpoll on modbusdriver](https://www.modbusdriver.com/modpoll.html) - 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](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:

```auto
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](https://www.waveshare.com/wiki/Protocol_Manual_of_Modbus_RTU_Relay#Command_format) will have some clues, but have not been able to work that out.

What should I do?

---

<div class="post-metadata">

**Author:** ![IoTPlay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotplay/32/40_2.png) [@IoTPlay](https://discourse.nodered.org/u/IoTPlay)\
**Post date:** [10 December 2020 19:18 UTC](https://discourse.nodered.org/t/testing-wave-usb-to-rs485-industrial-converter-to-8ch-relay-on-linux-using-modpoll/37320/2 "2020-12-10T19:18:07Z")

</div>

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

```auto
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:

```auto
[{"id":"e4d6becf.7d167","type":"modbus-response","z":"76274d8e.fd5214","name":"","registerShowMax":"10","x":660,"y":40,"wires":[]},{"id":"174978cb.b7da67","type":"modbus-read","z":"76274d8e.fd5214","name":"","topic":"","showStatusActivities":true,"logIOActivities":false,"showErrors":true,"unitid":"1","dataType":"InputRegister","adr":"1","quantity":"1","rate":"30","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4099da6.7419b24","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":340,"y":140,"wires":[["e4d6becf.7d167"],["942f710f.4b0c1"]]},{"id":"942f710f.4b0c1","type":"debug","z":"76274d8e.fd5214","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":750,"y":160,"wires":[]},{"id":"4099da6.7419b24","type":"modbus-client","name":"","clienttype":"simpleser","bufferCommands":true,"stateLogEnabled":true,"queueLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB0","serialType":"RTU","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"5000","reconnectOnTimeout":false,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true}]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 February 2021 19:18 UTC](https://discourse.nodered.org/t/testing-wave-usb-to-rs485-industrial-converter-to-8ch-relay-on-linux-using-modpoll/37320/3 "2021-02-08T19:18:14Z")

</div>

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