Improving Puppyserialdetect

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#16 Post by Sit Heel Speak »

I'll try the new version about 10 hours from now. I see Mstar's negative report in the other thread, but it is not clear to me whether he rebooted before testing the mouse-menu-action or not. Nor do I know whether it is necessary to reboot, in order for the new puppyserialdetect's sensings to take effect--is it? Presuming that to be a possibility, I gave Mstar instructions to replace /usr/sbin/puppyserialdetect with the new version and then reboot and see if there is any change.

Puppy user jonyo has also posted his /proc/bus/input/devices, over at

http://murga-linux.com/puppy/viewtopic.php?t=17655

It is a 2.15CE, but not the Final-2, puppyserialdetect is unmodified, and his /proc/bus/input/devices appears to suffer a drastic problem (***EDITED no, no drastic problem, just his first attempt at posting it went awry).

Would it serve a useful purpose for me to rerun the above test series on the "d" version?

Cheers,
SHS

jonyo

#17 Post by jonyo »

edit-(oopps just noticed your above note SHS..guess i'll leave mine here for now)

I'm running live cd save file to hard drive 2.15 CE with a combo logitech wifi keyboard & mouse (no drivers afaik). Had some probs with the mouse pointer disappearing from the screen once in a blue moon so plugged in a secondary usb corded mouse to see if it'd still work if I lost the wifi one.

Both mice work at the same time & haven't lost the pointer since, so might be a wifi mouse bug.
http://www.murga-linux.com/puppy/viewtopic.php?t=17655
Dougal wrote: Please will people start testing this? Batter try now than have detection problems when you try and boot 2.16!

SHS: what do you mean plugged in simultaniously? I wonder if it's listed in the file in /proc where the mouse is listed... but in any case you can only "detect" one mouse, so it doesn't matter...

Have you tried the USB alone? If then it isn't detected it's a problem.

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#18 Post by pakt »

Ok, finally had a chance to try puppyserialdetect-1.1d.tar.gz

I used a laptop with PS/2 mousepad plus these three mice connected:

- Old MS two-button serial mouse
- Logitech Optical USB mouse
- Brand X Optical USB mouse

Running 2.14 - results from within a rxvt terminal (same results running text mode):

Code: Select all

# puppyserialdetect 
Type:PS2-mouse|Port:/dev/input/mice
Type:PS2-mouse|Port:/dev/input/mice
Type:USB-mouse|Port:/dev/input/mice
Type:USB-mouse|Port:/dev/input/mice
Type:SERIAL-mouse|Port:/dev/ttyS0
# 

Code: Select all

# 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=/class/input/input0
H: Handlers=kbd 
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0011 Vendor=0002 Product=0008 Version=0000
N: Name="PS/2 Mouse"
P: Phys=isa0060/serio1/input1
S: Sysfs=/class/input/input1
H: Handlers=mouse0 
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3

I: Bus=0011 Vendor=0002 Product=0008 Version=7321
N: Name="AlpsPS/2 ALPS GlidePoint"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse1 
B: EV=f
B: KEY=420 0 70000 0 0 0 0 0 0 0 0
B: REL=3
B: ABS=1000003

I: Bus=0003 Vendor=1267 Product=0210 Version=2270
N: Name="PS/2+USB Mouse"
P: Phys=usb-0000:00:1d.0-1/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse2 
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=103

I: Bus=0003 Vendor=046d Product=c03d Version=2000
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/class/input/input7
H: Handlers=mouse3 
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=103

# 
It was interesting to note that I could use both USB mice and the mousepad at the same time :lol: - however the serial mouse didn't react.

Paul
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#19 Post by Dougal »

Pakt: the reason the serial mouse worked when the others did is that all the others seem to automatically work with /input/mice, but serial doesn't.

So what you have, in fact, is that /input/mice will work for all modern mice (i.e. no need to do the detection), but serial need to be detected.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

jonyo

#20 Post by jonyo »

Wonder why puppyserialdetect comes up with zip though I have 2 mice working & they show up with
> cat /proc/bus/input/devices <in console.

sh-3.00# puppyserialdetect
sh-3.00#

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#21 Post by Dougal »

jonyo wrote:Wonder why puppyserialdetect comes up with zip though I have 2 mice working & they show up with
> cat /proc/bus/input/devices <in console.

sh-3.00# puppyserialdetect
sh-3.00#
You're using the version that comes with Puppy and only detects serial mice.

You need to download Jesse's latest binary, open a ternimal in it's directory and run

Code: Select all

./puppyserialdetect
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#22 Post by Jesse »

Hello,

In the efforts to fix up the occasional problems with mouse detection for Puppy users, one component of the problem is getting puppyserialdetect to get the right information in the first place.
It seems to me that this step is complete, please post to let us know if you have tried the 1.1d version of puppyserialdetect and it does not indicate all mice attached to your computer!
Please note that if you download and try the new edition of PuppySerialDetect, that you use the ./ prefix to the name ( ./puppyserialdetect ) so that it runs the version in the local directory, rather than the edition you booted with.

Happy Mousing!
Jesse

User avatar
lvds
Posts: 340
Joined: Tue 23 Jan 2007, 15:15
Location: Near the window

#23 Post by lvds »

Hi,

I have been using puppyserialdetect since days now and there is something new i had not seen before. When i use a USB mouse, it works ok, but it does not recognise anymore usb-keys i might plugins. MUT or pmount never see them anymore... but the usb mouse still works fine.

And, though usb mouse works great, many users reported that ps2 mouse are not recognized... See here also:
http://www.murga-linux.com/puppy/viewto ... 0&start=15

Code: Select all

sh-3.00# 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=/class/input/input0
H: Handlers=kbd 
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=0518 Product=0001 Version=0001
N: Name="Composite USB PS2 Converter USB to PS2 Adaptor  v1.12"
P: Phys=usb-0000:00:10.0-1/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd 
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=7

I: Bus=0003 Vendor=0518 Product=0001 Version=0001
N: Name="Composite USB PS2 Converter USB to PS2 Adaptor  v1.12"
P: Phys=usb-0000:00:10.0-1/input1
S: Sysfs=/class/input/input2
H: Handlers=kbd mouse0 
B: EV=f
B: KEY=c0002 400 0 0 7001f c00 78000 2639fa d841d7ad 9e0000 0 0 0
B: REL=143
B: ABS=1 0

I: Bus=0003 Vendor=050d Product=3201 Version=0218
N: Name="Belkin Corporation Flip KVM"
P: Phys=usb-0000:00:10.1-2.2/input0
S: Sysfs=/class/input/input3
H: Handlers=kbd 
B: EV=20003
B: KEY=2 0 e0000 0 0 0
B: LED=100

sh-3.00# puppyserialdetect
Type:USB-mouse|Port:/dev/input/mice
sh-3.00# 
This is for my USB Mouse working fine, and an usb-key plugged but not seen by MUT.

Best regards,
Laurent.
Last edited by lvds on Sat 05 May 2007, 20:58, edited 3 times in total.

User avatar
lvds
Posts: 340
Joined: Tue 23 Jan 2007, 15:15
Location: Near the window

#24 Post by lvds »

pakt wrote:Running 2.14 - results from within a rxvt terminal (same results running text mode):
Hi Paul,
May you explain how you copy some text from rxvt into another window ?

EDIT: ok, i found ;-) here is how i do:

If you have a lot of text into rxvt to copy, maximise your rxvt window ...
1. go at the end of text and press left+right mouse buttons (this select all the rxvt window text)
2. press right mouse button (and release ; just press it once, don't keep it pressed) this copy text into buffer
3. open a leafpad text editor window
4. type CTRL V this paste text into editor
5. into leafpad, select your text again with CTRL A
6. then copy with CTRL C
7. now paste with CTRL V your text in firefox or wherever you want...

as text cannot be copied directly from rxvt into firefox
(at least on my computer ;-) )

Best regards,
Laurent


User avatar
lvds
Posts: 340
Joined: Tue 23 Jan 2007, 15:15
Location: Near the window

#26 Post by lvds »

Hi,

I have made more tests with other people on more computers.
I confirm there is a problem with ps2 mouses using the new puppyserialdetect_v_1.1d ... Puppy says it see the mouse but the mouse is not working, xvesa or xorg no matter. I have not been able to capture datas about it today but it is confirmed not working. I will try to send datas when available.

Also when using a usb mouse, it happens often other usb peripherals like usb keys or usb disks do not work.

Best regards,
Laurent.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#27 Post by Dougal »

lvds wrote:puppyserialdetect_v_1.1d ... Puppy says it see the mouse but the mouse is not working, xvesa or xorg no matter.
What do you mean it sees the mouse but it doesn't work?

This new puppyserialdetect is not supposed to go in /usr/sbin!
You are only supposed to test it and see that it recognizes the mouse correctly.

If you want to use it in Puppy, you'll have to replace the code in /etc/rc.d/rc.local0 with code that is intended for the new puppyserialdetect.

I am attaching an example of such code.
Last edited by Dougal on Sun 12 Apr 2009, 09:50, edited 1 time in total.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
lvds
Posts: 340
Joined: Tue 23 Jan 2007, 15:15
Location: Near the window

#28 Post by lvds »

Dougal wrote:
lvds wrote:puppyserialdetect_v_1.1d ... Puppy says it see the mouse but the mouse is not working, xvesa or xorg no matter.
What do you mean it sees the mouse but it doesn't work?
Hi Dougal,

Puppyserialdetect reports for a PS2 mouse connected but when one moves the mouse, the little arrow cursor on the screen does not move.
Dougal wrote:This new puppyserialdetect is not supposed to go in /usr/sbin!
You are only supposed to test it and see that it recognizes the mouse correctly.
ARG :cry: i am sorry, i really misunderstood that !
Dougal wrote:If you want to use it in Puppy, you'll have to replace the code in /etc/rc.d/rc.local0 with code that is intended for the new puppyserialdetect.

I am attaching an example of such code.
Ok i will see and test what to do, if i downgrade or if i upgrade.
Thank you very much.

Best regards,
Laurent.

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#29 Post by Jesse »

Hi,

Here is latest update 1.1e, only minor changes:

+ FIXED: with -e cmd option, 'Direct:' field may be incorrect for a combo device.
+ ADDED: cmd option -t to read from a testcases.tx file.
+ ADDED: version number to debug output
+ CHANGE: now compiled with -Os saves a few Kb.

Attached file includes source code, example testcases file, and binaries.

Jesse
Attachments
puppyserialdetect-1.1e.tar.gz
(29.08 KiB) Downloaded 643 times

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

#30 Post by edoc »

This thread seems old but the content is really relevant to a current app.

I have tried both 4.1 and 4.11rc and cannot see my weather station which is addressed via the Serial port.

How does one identify and access the serial ports in 4.1 or 4.11, 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

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

Post Reply