Improving Puppyserialdetect

Under development: PCMCIA, wireless, etc.
Message
Author
Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#31 Post by Jesse »

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
Attachments
puppyinputdetect-1.1i.tar.gz
latest edition 1.1i, code/command name revamp - its different!!
(8.12 KiB) Downloaded 574 times

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#32 Post by edoc »

Thanks!

Really late here tonight and a busy day tomorrow at church ... will try to see how this all works asap and report back.

Thanks again!
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#33 Post by edoc »

Here are the results of two different "cat" inquiries:
# # cat /proc/tty/driver/serial
# serinfo:1.0 driver revision:
bash: serinfo:1.0: command not found
# 0: uart:16550A port:000003F8 irq:4 tx:0 rx:0
bash: 0:: command not found
# 1: uart:unknown port:000002F8 irq:3
bash: 1:: command not found
# 2: uart:unknown port:000003E8 irq:4
bash: 2:: command not found
# 3: uart:unknown port:000002E8 irq:3
bash: 3:: command not found
# cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3803078 f800d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0011 Vendor=0002 Product=0007 Version=9db1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input1
U: Uniq=
H: Handlers=mouse0 event1
B: EV=b
B: KEY=6420 0 7000f 0 0 0 0 0 0 0 0
B: ABS=11000003

I: Bus=0003 Vendor=062a Product=0000 Version=0110
N: Name="HID 062a:0000"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0/input/input2
U: Uniq=
H: Handlers=mouse1 event2
B: EV=17
B: KEY=1f0000 0 0 0 0 0 0 0 0
B: REL=103
B: MSC=10

I: Bus=0019 Vendor=0000 Product=0002 Version=0000
N: Name="Power Button (FF)"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
U: Uniq=
H: Handlers=kbd event3
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input4
U: Uniq=
H: Handlers=event4
B: EV=21
B: SW=1

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button (CM)"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input5
U: Uniq=
H: Handlers=kbd event5
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button (CM)"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input6
bash: S:: command not found
#
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#34 Post by edoc »

Jesse wrote: 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

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[/quote]

Sorry for my delayd reply, been traveling and Internet access at several of the places we stayed was useless.

I have downloaded and extracted your serial detection app but am not certain how I should proceed.  I always forget the correct steps to install .gz's

The moments I can grab to deal with things like this are often separated by weeks, sometimes months, so I cannot keep it in my head.  (I have another problem with CUPS that I need to return to tomorrow - cannot print since I upgraded to 4.11 and then 4.12, was OK in 4.0 ... but that's another thread! Also cannot talk to my USB-serial adapter.  Sigh.)

I have been printing and saving things lately to my Linux ring binder so if you'd please walk me through this I will do so in order to have it for the next .gz I need to handle.

Thanks for your assistance and your patience!
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

FTDI Driver Challenges

#35 Post by edoc »

In chasing down my serial port challenges I stumbled upon the following URL's, the first is clearly related, the third URL I just wanted to post in case someone knew of a thread where I should move it in case it is of use to someone chasing a relted problem.

http://www.ftdichip.com/Drivers/D2XX.htm
This appears to be the driver I need for my USB-Serial-RadioTransceiver project.

http://www.emx.net.au/page426.htm
This links Puppy & a project requiring the FTDI driver.

http://www.linuxfocus.org/~guido.socher/#whichman
Laptops which use dynamic IP address assignment via DHCP have the problem that the boot process is much longer when no wire is connected to the Ethernet card. This is because the startup scripts have to wait for the DHCP request to time out.

ethwireck can detect if the physical layer of the Ethernet is up. This can then be used in the init script for your network card to determine whether or not an interface should be brought up. In other words a timeout is avoided.

ethwireck is similar to mii-tool but it can handle more ethernet cards (not only drivers with an mii interface).

Note: I discovered recently that ethwireck does not work with all cards as expected. The problem seems to be that some cards support the interface but do not report the status as expected. I am currently invesitgating this problem. Wait for ethwireck-1.3.

Download:
ethwireck-1.2.tar.gz
Previous versions:
ethwireck-1.1.tar.gz
ethwireck-1.0.tar.gz
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#36 Post by edoc »

OK, I went here:
http://www.puppylinux.org/~whodo/wiki/a ... compiling

Then read this:
To Compile:

* Download source of the application or driver you need:
It is usually recommended to download the stable version of the package. Only download the development or test versions if you really need them and know what you are doing.
* Extract source from archive to a suitable location
Most if not all the applications sources come packaged. Use the appropriate command to extract the source.
It is Highly advisable to Extract the files to a new or empty folder.
e.g.
# mkdir /root/src
# mkdir /root/src/packageName
Then download the file to that folder
# cd /root/src/packageName
# tar -xvzf packageName.tar.gz
* READ THE DOCUMENTATION INCLUDED IN THE SOURCE PACKAGE ESPECIALLY ANY INSTALL & README FILES
* Open a terminal console (e.g. rxvt) and do the following:
o Change directories to the directory where you extracted the source code
e.g. cd /root/src/<appName>
o Follow the compilation instructions included in the source package (README and INSTALL files)
Then did this:
# tar -xvzf puppyinputdetect-1.1i.tar.gz
Then this"
# ./Makefile
./Makefile: line 6: OBJ: command not found
./Makefile: line 7: CFILES: command not found
./Makefile: line 8: CC: command not found
./Makefile: line 9: CFLAGS: command not found
./Makefile: line 11: default:: command not found
./Makefile: line 13: tidy:: command not found
./Makefile: line 14: @rm: command not found
./Makefile: line 16: clean:: command not found
./Makefile: line 17: @rm: command not found
./Makefile: line 19: all:: command not found
./Makefile: line 21: puppyps2mousedetect:: command not found
./Makefile: line 22: CFLAGS: command not found
./Makefile: line 22: gcc: command not found
./Makefile: line 23: @strip: command not found
./Makefile: line 24: @sync: command not found
./Makefile: line 26: puppyinputdetect:: command not found
./Makefile: line 27: CFLAGS: command not found
./Makefile: line 27: gcc: command not found
./Makefile: line 28: @strip: command not found
./Makefile: line 29: @sync: command not found
./Makefile: line 31: puppyinputdetect-static:: command not found
./Makefile: line 32: CFLAGS: command not found
./Makefile: line 32: gcc: command not found
./Makefile: line 33: @strip: command not found
./Makefile: line 34: @sync: command not found
./Makefile: line 36: puppyinputdetectFULL:: command not found
./Makefile: line 37: CFLAGS: command not found
./Makefile: line 37: CFILES: command not found
./Makefile: line 37: gcc: command not found
./Makefile: line 38: @strip: command not found
./Makefile: line 39: @sync: command not found
./Makefile: line 41: puppyinputdetectFULL-static:: command not found
./Makefile: line 42: CFLAGS: command not found
./Makefile: line 42: CFILES: command not found
./Makefile: line 42: gcc: command not found
./Makefile: line 43: @strip: command not found
./Makefile: line 44: @sync: command not found
#
What did I do wrong now, please? :oops:
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#37 Post by edoc »

[size=18BUMP!][/size]

Sure would like to get access to my serial port, directly or via USB.

Help, please?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

Serialdetect

#38 Post by ecomoney »

Just a quick observation...we must have installed puppy on well over three hundred computers now, and not once has puppy ever failed to correctly detect the mouse. This has been mostly with 2.15ce and earler versions. I do realise there is an occaisional report of serialdetect failing to detect mice on the forum, and it must happen at some point...but isnt that where a forum comes in?

One of the few things that seem to be a step backward in the new puppy is adding an additional screen to the first setup (xorgwizard?) to confirm the type of mouse. Adding an extra setup screen will lose us more users through decreased useability/complexity than the very few that serialdetect doesnt work for. Perhaps the serialdetect screen should be accessed separately from the xorgwizard with a command like "setmouse"?

That being said, I am glad that more work is being done to improve serialdetect, should it ever fail for me in the future!
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#39 Post by edoc »

I don't have any problems with the mouse, it is access to the serial port for access to/control of external devices e.g. programming a radio scanner or setting up my weather station.

I have the software I need but cannot get recognition of serial/comm ports.

I keep hoping that there is an app out there in the Linux worl that brings up a troubleshooting window, detects the hardware, then walks one through what settings are incorrect to re-establish reliable communications.

I have tried a USB-to-Serial and direct Serial connection but nothing works.

I am also unable to access any USB-based printer from this laptop, local or remote, and presume that the problems have a common denominator. (I had no problems with printers like this under 4.0 and prior.)

WDYT?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#40 Post by edoc »

I do recall in a prior version, not sure if 4.0 or 4.11, there was a question about checking for Serial devices in the Boot stage.

The idea was to save time by skipping that check. I may have done so.

Is it possible that in the version upgrade that setting was maintained?

Anyone remember where that would have been set and how I might undo it if it has in fact been set, please?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

Post Reply