io.getportstatus returns 53?
Matt last edited by
I'm trying to use the serial port /dev/ttyUSB0 on an Axon M505, but I'm getting a port status code of 53 after attempting to open the port. According to the table shown at https://forum.unipi.technology/topic/763/undefined-code-from-io-getportstatus-handle/3 this corresponds to "FileNotFound". I'm supplying the string 'serial:10:115200,8,N,1' to io.openport.
can you please verify how your USB device is enumerated in the system? Can you please post the
dmesgoutput issued after connecting the device?
Thank you in advance and have a nice day,
Matt last edited by Matt
Thanks @martin-kudláček. Here's the dmesg output:
[237619.915800] usb 2-1: new full-speed USB device number 2 using ohci-platform [237620.166155] usbcore: registered new interface driver usbserial [237620.166234] usbcore: registered new interface driver usbserial_generic [237620.166296] usbserial: USB Serial support registered for generic [237620.171302] usbcore: registered new interface driver cp210x [237620.171386] usbserial: USB Serial support registered for cp210x [237620.181473] cp210x 2-1:1.0: cp210x converter detected [237620.191236] usb 2-1: cp210x converter now attached to ttyUSB0
I had to compile the cp210x module to get this device to work, but I can now talk to it Python script so the driver seems to be working fine.
Matt last edited by
Hi @Martin-Kudláček, any ideas on this? I implemented a workaround with a Raspberry Pi talking to the device and sending the readout to the UniPi over Modbus, but it'd be nice to figure this out.
pascal37 last edited by
Hi @martin-kudláček, same issue for me.
Serial device connected on Axon M505 via USB port 1
(Baud=300, Databits=7, Parity=Even, Stopbits=1)
def := 'serial:10:300,7,E,1'; handle := io.openport(def);
I get also status code 53 after opening the port, could you help?
What device is it?
pascal37 last edited by pascal37
Thanks for your help.
It is a optical meter reader:
Here are the technical specifications:
Here is also the dmesg output issued after connecting the USB device:
[ 3051.254500] usb 2-1: new full-speed USB device number 2 using ohci-platform [ 3051.541253] usbcore: registered new interface driver usbserial [ 3051.541302] usbcore: registered new interface driver usbserial_generic [ 3051.541339] usbserial: USB Serial support registered for generic [ 3051.551364] usbcore: registered new interface driver ftdi_sio [ 3051.551419] usbserial: USB Serial support registered for FTDI USB Serial Device [ 3051.551798] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected [ 3051.551964] usb 2-1: Detected FT-X [ 3051.555614] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
thanks for pointing this out. We have missed the config file responsible for static mapping of the USB ports. Its now part of the unipi-common package in version 1.2.15.test.20191129155215 so you can install it by "apt update && apt install unipi-common=1.2.15.test.20191129155215" or get a fixed OS image version 18.104.22.168 from our knowledge base.
just to let you know, that the neccessary changes has been merged into unipi-common v1.2.16 and the MervisOS image 22.214.171.124 is online.