richw
Hi,

Why is my onboard com port not seen under slave devices. If I use a usb to serial converter it is available, I can use ttyS3 from the command line with a loop back and it works. Is there some change I need to make in openplc for it to be recognized?

Thanks,
Reply 1 0
thiagoralves
OpenPLC uses pyserial to identify ports. If the port is not there on the list, it is probably not available for use
Reply 0 0
richw
Hi,

If I manually edit the mbconfig.cfg file and add device0.address = "/dev/ttyS3" it works and I can access my modbus device. Do you have an any idea why this would not show up under slave devices?

Thanks
Reply 0 0
Bornukov-e
I have the same problem. Armbian OS. Ports /dev/ttyS1 /dev/ttyS2 are available in the system, I can open them with the nanocom program. But OpenPLC does not see them, they are not in the COM Port selection list when adding devices.
Reply 0 0
Bornukov-e
richw wrote:
Hi,

If I manually edit the mbconfig.cfg file and add device0.address = "/dev/ttyS3" it works and I can access my modbus device. Do you have an any idea why this would not show up under slave devices?

Thanks


Tell me where to look for the file mbconfig.cfg?
Reply 0 0
thiagoralves
It is either on the OpenPLC_v3 folder or inside /webserver. You will only see it there after you add a slave device and save
Reply 0 0
Bornukov-e
Yes, I saw this file when I added a USBtoSerial device. The ttyUSB0 port appeared in the list. I fixed it in the file on ttyS1, but only ttyUSB0 remained in the web interface. In my system, the ttyS0 device is used as a debugging port. Maybe this is the reason that the other serial ports are not visible in the list?
Reply 0 0
thiagoralves
OpenPLC uses PySerial to list all available serial ports. If PySerial does not see the port, it is not listed in OpenPLC web interface. I honestly don't know why PySerial is not seeing your ports.
Reply 0 0
Bornukov-e
I have solved this problem.
For some reason, the PySerial library does not display internal COM ports. File "/usr/local/lib/python2.7/dist-packages/serial/tools/list_ports_linux .py" have the string:

    if info.subsystem != "platform"] # hide non-present internal serial ports

I replaced this line with 
    if info.subsystem != "none"] # dont hide non-present internal serial ports

Ports /dev/ttyS* are now displayed in the selection list
Reply 0 0
Reply