Forum > Packages and Libraries

Error on using hardware Raspberry Pi Inno-Maker RS485&CAN Module with TLAZserial

(1/9) > >>


I use TLAZSerial with an isolated RS485 HAT connected to the Pi's native serial I/O and an USB to RS485 isolated device to communicate with several power meters using ModBus protocoll. That works fine.

I also want to use CAN so I bought the above mentioned HAT.
With the driver installed, I can see the 2 new serial ports:

pi@raspberrypi:~ $ ls -l /dev/ttyS*
crw-rw---- 1 root dialout   4, 64 Mär 14 13:10 /dev/ttyS0
crw-rw---- 1 root dialout 235,  0 Mär 14 13:10 /dev/ttySC0
crw-rw---- 1 root dialout 235,  1 Mär 14 13:10 /dev/ttySC1
pi@raspberrypi:~ $

When I use the Demo GPS Simulator application, I can select both /dev/ttySC0 & /dev/ttySC1 devices.
But when I try to open the port, I get the following error message:

"Could not open device /dev/ttyS-2"

I tried it with GTKTerm, but here the two devices /dev/ttySC0 & /dev/ttySC1 do not show up in the selectable device list. Connecting USB adapter it works.

I already wrote to innomaker, but since GTKterm does not show the devices I have no clue where the problem lies. I searched the forum for the term "/dev/ttyS-2" without result.

Thanks and Best Regards.

You get a bonus point for checking with gtkterm. Two possible things to try: (i) look at serial.pp which comes with FPC (i.e. not Lazarus), it doesn't try to check the validity of the name parameter. (ii) step into the LazSerial code that opens the port, and see if it's trying to parse the name e.g. as part of an attempt to list valid serial ports.

I must admit that I've never seen the ttySC* form, and I've spent a fair amount of time with kernel documentation etc. working out valid names. What type of device actually implements it, and does it really use the serial API?



Since Linux kernel 2.4 (~ 2000) /dev/ttyS2 is not a legal device name anymore.

It was renamed to   /dev/tts/2



$ ls -lt /dev/ttyS*
crw-rw---- 1 root dialout 4, 65 Feb 26 09:00 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 Feb 26 09:00 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Feb 26 09:00 /dev/ttyS3
crw-rw---- 1 root dialout 4, 64 Feb 26 09:00 /dev/ttyS0

...and before anybody calls me out for being undiplomatic, I suggest referring to

specifically char device major 4.


No Mister Rubbish

You are not undiplomatic .

You just have no knowledge about Linux history.

If you had then you should have said:

"devfs is not up-to-date"

Have a nice rubbish time



[0] Message Index

[#] Next page

Go to full version