# ModBus on two USB - RS485 adapeters on Pi

**URL:** <https://discourse.nodered.org/t/modbus-on-two-usb-rs485-adapeters-on-pi/41338>\
**Category:** General\
**Created:** [20 February 2021 09:01 UTC](https://discourse.nodered.org/t/modbus-on-two-usb-rs485-adapeters-on-pi/41338 "2021-02-20T09:01:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![swanside](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/swanside/32/28781_2.png) [@swanside](https://discourse.nodered.org/u/swanside)\
**Post date:** [20 February 2021 09:01 UTC](https://discourse.nodered.org/t/modbus-on-two-usb-rs485-adapeters-on-pi/41338/1 "2021-02-20T09:01:24Z")

</div>

Hi all. Just a quick one, I have an MPPT Solar charger and a OB115-Mod meter. Both are set to ID1, so while I am waiting for a lead so I can change the address of the MPPT controller to ID2, I have put in a second USB-RS485 on my PI.  
I can see them plugged in but I cant get values from the Electric Meter.  
So basically I would have thought even if both devices have a Modbus ID of 1, but using separate USB adapters it would not clash. It may just be the power supply is not enough to run both adapters at the same time, But, should I be able to read multiple Modbus devices in the same Node Red project or is there something I need to add?  
Cheers

> pi@modbus:~ $ lsusb  
> Bus 001 Device 006: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter (MPPT Controller)  
> Bus 001 Device 007: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family] (Elec Meter)  
> Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter  
> Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub  
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 February 2021 10:30 UTC](https://discourse.nodered.org/t/modbus-on-two-usb-rs485-adapeters-on-pi/41338/2 "2021-02-20T10:30:53Z")

</div>

The should appear as separate serial devices, /dev/ttyUSB0 and USB1, or whatever is the current serial port naming on a pi. The problem is that they might not always be the right way round. You can use udev rules to give them separate names.

---

<div class="post-metadata">

**Author:** ![swanside](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/swanside/32/28781_2.png) [@swanside](https://discourse.nodered.org/u/swanside)\
**Post date:** [20 February 2021 10:38 UTC](https://discourse.nodered.org/t/modbus-on-two-usb-rs485-adapeters-on-pi/41338/3 "2021-02-20T10:38:35Z")

</div>

Thanks Colin, I saw the /dev/ttyUSB0 and /dev/ttyUSB1 and when I check the modbus to the Solar MPPT that was on /dev/ttyUSB0 until I insert the other device and the Solar MPPT jumps to /dev/ttyUSB1, which when I edit the server from USB0 toi USB1 the readings start again, so I set the other server to USB0 for the electric meter but it will not read. Mind you saying that, it says connected and then reconnecting after 2000ms, so its as if it can see the device but times out  
pi@modbus:~ $ ls /dev/ttyUSB\*  
/dev/ttyUSB0 /dev/ttyUSB1

---

<div class="post-metadata">

**Author:** ![swanside](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/swanside/32/28781_2.png) [@swanside](https://discourse.nodered.org/u/swanside)\
**Post date:** [20 February 2021 11:02 UTC](https://discourse.nodered.org/t/modbus-on-two-usb-rs485-adapeters-on-pi/41338/4 "2021-02-20T11:02:03Z")

</div>

DOh.......  
Had Parity set at Even and not None!!!!  
Working now

---

<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:** [6 March 2021 11:02 UTC](https://discourse.nodered.org/t/modbus-on-two-usb-rs485-adapeters-on-pi/41338/5 "2021-03-06T11:02:53Z")

</div>

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