• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
USB to RS485 convetrer
#1
Hello,

do USB to RS485 converter work with netPI core directly? we are testing it but face issue. we connected modbus energy meter through our USB to RS485 conveter to USB port of netPI. attached is Modbus flow n settings herewith.
In this we are not able to connect to Modbus meter , no data is received, no error in debug, also the Modbus Read node is always Green even though we remove USB conveter from netPI, I think it is not detected .
one more point we can not search for other serial ports as marked in image.


Is any other setting related to usb driver required? 

Thanks & BR
Madhumati


Attached Files Thumbnail(s)
   

.txt   nodered flow Modbus RTU.txt (Size: 1.16 KB / Downloads: 0)
  Reply
#2
Well,

I have no USB to RS485 converter personally. I have a USB to RS232 converter only and it works perfect with netPI product.

My USB converter maps to "/dev/ttyUSB0". So have you verfied that your USB converter also maps to this device? You can verify the exact device when plugging in the device to a commercial Raspberry Pi and list the folder "/dev/". When you plug it in a new folder /dev/ttyUSB0" should appear. So if the device maps to a commercial Raspberry Pi to "/dev/ttyUSB0" then also this device will map on netPI "/dev/ttyUSB0".

As next I would check the function of the converter on a commercial Raspberry Pi first. You can install Docker in your Raspberry Pi too using this command line documented here. Afterwards you can install hilschernetpi/Node-RED container using this command on your commercial Raspberry Pi as well:

Code:
docker volume create nodered && docker run -d --privileged --network=host --restart=always --device=/dev/ttyUSB0:/dev/ttyUSB0 -v nodered:/root/.node-red hilschernetpi/netpi-nodered

Open Node-RED using https://<ip-address of commercial Raspberry Pi>:1880 and check the USB converter function. When it works, then it must work in netPI too.

Then you say you remove the converter from netPI and everything is green. This is a speciality of Docker. When a Docker container is started a shadow device tree is copied to the container. Independent if you remove or add a device online after the container has been started, the shadow tree in the container will never change until you restart the container again. On the other hand this means you have to have inserted the converter before you start the container, else the contain sees no shadowed "/dev/ttyUSB0" device.

The most important point of using a USB device in a container is to map the device "/dev/ttyUSB0" to the container in the container start parameters. Have you done it?

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
Dear Armin,

Thanks. we did as you suggested & it is working now.

USB to RS 485 converter is working ok with netPI

Thanks for the guidance always.

BR
Madhumati

Dear Armin,

Thanks. we did as you suggested & it is working now.

USB to RS 485 converter is working ok with netPI

Thanks for the guidance always.

BR
Madhumati
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Driver for RS485 (netPI) ArteLukas 5 508 June-25th-2019, 07:10 AM
Last Post: Armin@netPI
  niot-e-npi3-51-en (RS485 <-> Industrial Ethernet) merklethomas 6 484 April-26th-2019, 01:38 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)