Hilscher Community Forum
USB to RS485 convetrer - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: USB to RS485 convetrer (/thread-653.html)



USB to RS485 convetrer - MGharat - October-19th-2020

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


RE: USB to RS485 convetrer - Armin@netPI - October-19th-2020

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


RE: USB to RS485 convetrer - MGharat - October-19th-2020

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


RE: USB to RS485 convetrer - patribenq - October-18th-2021

Sorry to bring this up, but RS-485 is for connecting a PC to system devices when programming. If I were you, I would check the converter function on a commercial Raspberry Pi. Next, install Docker on your Raspberry Pi using the command line that the author pointed out above. After that, you can install the hilschernetpi / Node-RED container. This way, you should have everything working. If it doesn't work, try the loader.to.


RE: USB to RS485 convetrer - vanefras - November-15th-2021

netPI only worked for me with the online joincombo program but I lost the link to it


RE: USB to RS485 convetrer - patribenq - November-15th-2021

(November-15th-2021, 02:34 PM)vanefras Wrote: netPI only worked for me with the online joincombo program but I lost the link to it

You're a little confused, because what you're writing about is a bit different. This netPI works in the local network and all types of networks and applications identical to netPI with which it would not conflict should be linked to it. And joincombo.com has applications for streaming and different functions for working with files of different formats. I remember this program too. It has a lot of interesting stuff but in our case we need to bind the networks to the netPI. It works fine with other subnets and with the one the author has in particular.