Hi edoc,
The basic answer to your question is :
puppyserialdetect -u | grep SERIAL
puppyserialdetect is a bit slower than the latest puppyinputdetectFULL, and (puppyserialdetect) may be hazardous to some systems, i.e there are outstanding reports that it freezes some systems on boot, probably by not exiting.
Basically it just scans the kernel info about serial access ports, which is here /proc/tty/driver/serial which might be enough for you?
cat /proc/tty/driver/serial
Attached is source code of latest incarnation.
To detect the serial ports, use puppyinputdetectFULL with -swm command line options. Use -d for debug mode.
Examples:
Code: Select all
sh-3.00# ./puppyinputdetectFULL -swm
Type:SERIAL-Port|Port:/dev/ttyS0
sh-3.00# ./puppyinputdetectFULL -swmd
./puppyinputdetectFULL version 1.1i, part of PuppySerialDetect
Built on Nov 2 2008
Probing serial ports...
/dev/ttyS0: uart:16550A port:000003F8 irq:4 tx:3 rx:0 RTS|DTR
ensure_dev_node_present on /dev/ttyS0 4 64
Serial-Mouse test result is: unexpected result, its no mouse.
Type:SERIAL-Port|Port:/dev/ttyS0
/dev/ttyS1: uart:unknown port:000002F8 irq:3
ignore: [/dev/ttyS1] (force scan possible with -f)
/dev/ttyS2: uart:unknown port:000003E8 irq:4
ignore: [/dev/ttyS2] (force scan possible with -f)
/dev/ttyS3: uart:unknown port:000002E8 irq:3
ignore: [/dev/ttyS3] (force scan possible with -f)
/dev/ttyS4: is UNKNOWN by the kernel.
ignore: [/dev/ttyS4] (force scan possible with -f)
sh-3.00#
puppyinputdetectFULL is less likely to have problems as it does not attempt the complicated modem-detection any more (its removed), and also a full scan is not attempted unless -f is supplied on command line.
puppyinputdetectFULL will verify (and correct) any /dev/ttyS* nodes to make sure they are valid, and tell you if there is a mouse attached by sending/recving commands to the port, but this might confuse your device if you run it while it is being used.
Regards
Jesse