Page 1 of 2

Puppyserialdetect fix/patch

Posted: Sun 10 Jun 2007, 01:33
by Jesse
Hi,

Barry just noticed a problem with latest puppyserialdetect:
http://www.puppylinux.com/news/comments ... 608-031112

Here is a version that'll maybe revert to the original detection scheme.

Version 1.1f:
ADDED README file.
ADDED /dev/ttySX node creation if necessary.
ADDED scan ttyS0 - ttyS4 (inclusive)
REMOVED optimization that might have skipped over a serial modem.
INCLUDES binaries and source code.

Jesse

Posted: Sun 10 Jun 2007, 16:07
by BarryK
Great! But, I'm away from home for 5-6 days and don't have access to a serial modem. Will test as soon as possible.

Posted: Mon 11 Jun 2007, 00:04
by Jesse
Ok Barry :)

If anyone would like to try out this version, please post if it works or not with your serial modem or internal PCI modem ( /dev/ttyS4 is supposed to be internal PCI modem on some computers), also let us know what make/model it is. If the progam works, it will output a line identifying the modem e.g.:
Type:modem|Port:/dev/ttyS4|Speed:14400

Jesse

Posted: Mon 11 Jun 2007, 12:52
by BarryK
Yes, testers are wanted!
Just to clarify though, if you do have a internal PCI modem, we are only concerned with a true hardware modem -- that's all 'puppyserialdetect' will detect. There aren't too many true-hardware PCI modems around, certainly they are no longer made, and you are only likely to find one in a PC ....how long ago.... 5 years old?

There are apparently some true hardware USB modems, but we havn't got to the point of autodetecting them yet. Except for some models, I'm working on that right now.

Diamond Modem SupraExpress56e com1 port

Posted: Wed 20 Jun 2007, 16:11
by Firefox
I downloaded and installed puppyserialdetect and it detected it ok
Type:modem|Port:/dev/ttys0|Speed:230400

Posted: Wed 20 Jun 2007, 17:05
by Béèm
Doesn't detect nor the internal modem nor a PCMCIA one.
Only mice's, but as far as I know they aren't serial.
One them is a touchpad.

Code: Select all

sh-3.00# puppyserialdetect
Type:PS2-mouse|Port:/dev/input/mice
Type:PS2-mouse|Port:/dev/input/mice
sh-3.00#

Posted: Thu 21 Jun 2007, 00:35
by Jesse
Hi Béèm,

Are you sure you are running the file that you download?
Normally you have to run it with a ./ prefix, like: ./puppyserialdetect

Code: Select all

sh-3.00# puppyserialdetect 
sh-3.00# ./puppyserialdetect 
Type:USB-mouse|Port:/dev/input/mice
sh-3.00# 
Above you can see that I get two different outputs, from the two different versions on the system, (version with Puppy 2.13 does not detect my usb mouse).

Jesse

Posted: Thu 21 Jun 2007, 06:56
by muggins
jesse,

i tried ./puppyserialdetect, with pup2.16, and it didn't detect modem on ttyS0. the modem wizard with pup2.16 also doesn't recognise a modem on ttyS0, but if i save, then it's OK. (modemwizard with pup1.08 does see the modem).

Posted: Sat 23 Jun 2007, 08:37
by jeffrey
No joy with my old Asus PC (500MHz) with external serial modem connected to Com1 (/dev/ttyS0). It does detect the serial mouse (PS/2):

Code: Select all

sh-3.00# ./puppyserialdetect 
Type:PS2-mouse|Port:/dev/input/mice
sh-3.00# 
Let me know if there's something I can run to show you what the hardware is. It's a 3Com US Robotics 56K Faxmodem

Posted: Sat 23 Jun 2007, 08:38
by jeffrey
... I should perhaps have added that that was done with Puppy 2.14.

Posted: Sat 23 Jun 2007, 09:45
by zygo
I get exactly the line that jeffrey got back. My external serial modem is a "3com us robotics 56k voice faxmodem"

The CD I'm running puppy off is remastered with Dougal's program and I accepted the option to customise the iso for this machine (keyboard, mouse).

Posted: Sat 23 Jun 2007, 10:00
by zygo
I'm using puppy 2.16. The modem wizard and wvdial both find the modem I mentioned. It's on ttyS0.

Posted: Sun 24 Jun 2007, 10:15
by Tui
Hi Jesse,
I have downloaded the "puppyserialdetect-1.1f and
went thro' the process of what I thought was an install, every thing
looked like an install, and after a reboot I checked I don't think it
loaded, Please advise how to load and check that it loaded.

Cheers Tui

Posted: Sun 24 Jun 2007, 11:56
by BarryK
Jesse,
I'm finally home and able to test my serial modem. No joy I'm afraid. 1.1f does not detect it, 1.0 does. It's a plain-vanilla ordinary external serial hardware modem on ttyS0.

Posted: Sun 24 Jun 2007, 17:47
by zygo
My pci sound card died so I replaced it with the original device:

Code: Select all

pci bus 0x0002 cardnum 0x0a function 0x00: vendor 0x14f1 device 0x2f00
 Conexant HSF 56k HSFi Modem
This too is not detected. Nor is it detected by the modem wizard. Is it the kind of modem that is supposed to be detected?

Posted: Sun 24 Jun 2007, 23:42
by Jesse
Hi Barry,

Are there any clues about what has gone wrong, if you run it with the -d option?
Sorry I don't have a modem here to test with.

What do you think is best course of action, debug and fix 1.1f, or go back to 1.0 and patch things one at a time?

Jesse

Posted: Mon 25 Jun 2007, 02:46
by BarryK
zygo: no, only genuine hardware modems.

Jesse: -d option returns this:

Probing serial ports...
ensure_dev_node_present on /dev/ttyS0 4 64
Found [/dev/ttyS0]
ensure_dev_node_present on /dev/ttyS1 4 65
ensure_dev_node_present on /dev/ttyS2 4 66
ensure_dev_node_present on /dev/ttyS3 4 67
ensure_dev_node_present on /dev/ttyS4 4 68

...which is interesting, at least it recognises something is there!
Does that help to narrow-down the problem?

Posted: Mon 25 Jun 2007, 12:29
by Jesse
Hi Barry,

Yep, the problem is certainly narrowed down, I just had a quick look at the code and spotted the logic flaw in it, and I looked at the original code, and scratching my head as to why that worked, the original isn't gauranteed to work, but that is determined at compile time, it needs a compiler optimization to be gauranteed for the program to work, which is what probably confused me in the first place.
I'll hopefully post an update soon.

Jesse

Posted: Thu 28 Jun 2007, 00:24
by BarryK
....how's the big-finding going? :wink:
I want to wait until this is fixed before ploading 2.17alpha.

Posted: Thu 28 Jun 2007, 02:48
by BarryK
Okay, I got it working.

I realised that Jesse has a problem not having a serial modem to test with, so got stuck into it myself.

It's a very bad hack though. I went back to the original version, which tests serial modems only. I then turned on the mouse detection bits, which waswhat Dougal did for v1.1, but it didn't detect my ps/2 mouse -- I then tried Dougal's v1.1, same problem.

So, I grabbed Jesse's 'mouse.c' and hacked it very badly, but it now works (don't cringe too much when you look at it, Jesse :D )

I'm only using puppyserialdetect in Puppy to detect modems and mice, not keyboards, as I'm still using some code that pakt works out sometime ago for usb keyboard detection.

I'm called it version 1.2...