• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
USB to RS485 convetrer
#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


Messages In This Thread
USB to RS485 convetrer - by MGharat - October-19th-2020, 09:27 AM
RE: USB to RS485 convetrer - by Armin@netPI - October-19th-2020, 10:24 AM
RE: USB to RS485 convetrer - by MGharat - October-19th-2020, 01:37 PM
RE: USB to RS485 convetrer - by patribenq - October-18th-2021, 09:38 AM
RE: USB to RS485 convetrer - by vanefras - November-15th-2021, 02:34 PM
RE: USB to RS485 convetrer - by patribenq - November-15th-2021, 02:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  NIOT-E-NPIX-RS485 LucioFiam 6 4,620 January-21st-2023, 05:20 PM
Last Post: Armin@netPI
Question Driver for RS485 (netPI) ArteLukas 5 7,963 June-25th-2019, 07:10 AM
Last Post: Armin@netPI
  niot-e-npi3-51-en (RS485 <-> Industrial Ethernet) merklethomas 6 5,047 April-26th-2019, 01:38 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)