Author |
Message |
Jesse
Joined: 08 May 2005 Posts: 465 Location: Auckland, NZ
|
Posted: Sun 24 Jun 2007, 19:42 Post subject:
|
|
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
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8529 Location: Perth, Western Australia
|
Posted: Sun 24 Jun 2007, 22:46 Post subject:
|
|
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?
|
Back to top
|
|
 |
Jesse
Joined: 08 May 2005 Posts: 465 Location: Auckland, NZ
|
Posted: Mon 25 Jun 2007, 08:29 Post subject:
|
|
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
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8529 Location: Perth, Western Australia
|
Posted: Wed 27 Jun 2007, 20:24 Post subject:
|
|
....how's the big-finding going?
I want to wait until this is fixed before ploading 2.17alpha.
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8529 Location: Perth, Western Australia
|
Posted: Wed 27 Jun 2007, 22:48 Post subject:
|
|
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 )
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...
Description |
|

Download |
Filename |
puppyserialdetect-1.2.tar.gz |
Filesize |
35.73 KB |
Downloaded |
456 Time(s) |
|
Back to top
|
|
 |
Jesse
Joined: 08 May 2005 Posts: 465 Location: Auckland, NZ
|
Posted: Fri 29 Jun 2007, 22:47 Post subject:
|
|
Hi Barry,
I've been a bit frantic at work the last few weeks, yep, quite unusual for a telco. I havn't really had an oppertunity to sit down with puppyserialdetect and have a fully functional brain, but no other plans for saturday and sunday, so I should have the oppertunity to hae a go
Jesse
|
Back to top
|
|
 |
zygo
Joined: 08 Apr 2006 Posts: 233 Location: UK
|
Posted: Sat 30 Jun 2007, 11:54 Post subject:
|
|
I don't understand. How should this be tested?
Like this:
Code: | sh-3.00# cd /root/puppyserialdetect-1.2/
sh-3.00# puppyserialdetect
Type:PS2-mouse|Port:/dev/input/mice
sh-3.00#
|
No modem!
Or like this:
Code: | sh-3.00# /root/puppyserialdetect-1.2/puppyserialdetect
Type:modem|Port:/dev/ttyS0|Speed:230400
Type:PS2-mouse|Port:/dev/input/mice
sh-3.00#
|
Now my modem is detected!
By the way:
Code: | sh-3.00# /root/puppyserialdetect-1.2/puppyserialdetect-ORIG
Type:modem|Port:/dev/ttyS0|Speed:230400
sh-3.00#
|
|
Back to top
|
|
 |
Pence
Joined: 30 Jul 2005 Posts: 201
|
Posted: Sat 30 Jun 2007, 20:39 Post subject:
|
|
sh-3.00# ./puppyserialdetect
Type:modem|Port:/dev/ttyS1|Speed:230400
Type:PS2-mouse|Port:/dev/input/mice
sh-3.00#
I'm not sure if I did this proper.I extracted the download then opened the folder and then I right clicked the wheel named Puppyserialdetect, then clicked Window -> Terminal Here, Typed ./puppyserialdetect then pressed enter.
The modem lights started flashing for a second or two and I got that result.
|
Back to top
|
|
 |
Jesse
Joined: 08 May 2005 Posts: 465 Location: Auckland, NZ
|
Posted: Sat 30 Jun 2007, 23:25 Post subject:
|
|
Hello,
Pence, Zygo, thanks for the test report, looks like Barrys 1.2 is good.
Barry, I havn't looked so no cringing here , but looks like it works.
I've updated my edition, hopefully patched the bugs etc, and have added some more debug lines in case its still not working.
Also added a -u command line option to list serial ports found that have nothing attached.
If anyone would like to test this one, let us know how it goes.
Code: | sh-3.00# ./puppyserialdetect-static --help
Application to detect Mouse/Keyboard on PS2/USB/Serial
and some Serial modems. Uses /proc filesystem and /dev nodes
command options:
-d debugging info
-k detect keyboards
-e extra info like model name
-u detect serial ports without device attached
-t read from 'testcases.txt' rather than
from /proc/bus/input/devices
Original code borrowed and modified from Mandrake & Red Hat
Now: puppyserialdetect, for Puppy, www.puppyos.com
|
Code: | sh-3.00# ./puppyserialdetect -uke
Type:USB-mouse|Port:/dev/input/mice|Direct:/dev/input/mouse0|Model:Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)
Type:PS2-kbd|Port:/dev/input/keyboard|Direct:/dev/input/keyboard|Model:AT Translated Set 2 keyboard
Type:SERIAL-Port|Port:/dev/ttyS0
sh-3.00# |
Jesse
Description |
|

Download |
Filename |
puppyserialdetect-1.1g.tar.gz |
Filesize |
31.92 KB |
Downloaded |
431 Time(s) |
|
Back to top
|
|
 |
zygo
Joined: 08 Apr 2006 Posts: 233 Location: UK
|
Posted: Sun 01 Jul 2007, 05:21 Post subject:
|
|
1.1g gives the same results as 1.2 including the change when the path is included on the command line. Jesse can you explain this?
|
Back to top
|
|
 |
Pence
Joined: 30 Jul 2005 Posts: 201
|
Posted: Sun 01 Jul 2007, 07:27 Post subject:
|
|
I have two serial ports on the back of my computer.I connected two modems and turned them on and got this;
sh-3.00# ./puppyserialdetect
Type:PS2-mouse|Port:/dev/input/mice
Type:modem|Port:/dev/ttyS0|Speed:230400
Type:modem|Port:/dev/ttyS1|Speed:230400
sh-3.00#
|
Back to top
|
|
 |
Jesse
Joined: 08 May 2005 Posts: 465 Location: Auckland, NZ
|
Posted: Sun 01 Jul 2007, 08:03 Post subject:
|
|
Hi,
Pence, all looks good! thanks for trying it out.
Zygo, 1.2 and 1.1g, are both good versions it seems. 1.1g has certainly been bug fixed now that it is reporting your serial modem.
Theoretically, if there are no bugs in either 1.2 or 1.1g, then certainly the output from the programs will be the identical, this is good!
Jesse
|
Back to top
|
|
 |
zygo
Joined: 08 Apr 2006 Posts: 233 Location: UK
|
Posted: Mon 02 Jul 2007, 17:28 Post subject:
|
|
Jesse,
I was unclear. Sorry.
Why does invoking a program without it's path (my first code box) produce different results from when its path is included (my second code box)?
|
Back to top
|
|
 |
Jesse
Joined: 08 May 2005 Posts: 465 Location: Auckland, NZ
|
Posted: Mon 02 Jul 2007, 19:18 Post subject:
|
|
Hi Zygo,
The short answer is, because you are running a different program.
When you type in the name of an executable in a command window (without a path prefix), your command line program (bash) has some standard rules about how it goes about finding the named program. It looks in the directories listed in the PATH environment variable, in order, if it finds the named program, bash executes it.
The PATH environment variable does not include the current directory, and its considered a security violation, by most linux/unix people.
If you provide the pathname to the executable, then bash does not need to scan the PATH variable hunting for the program, it just executes it.
I hope that fills in the blanks for you?
Jesse
|
Back to top
|
|
 |
zygo
Joined: 08 Apr 2006 Posts: 233 Location: UK
|
Posted: Tue 03 Jul 2007, 13:00 Post subject:
|
|
Jesse,
Thanks for clearing that up. I am happy that I was executing 2 programs. This behaviour is familiar from my dos days. I knew linux had a path variable but as you have seen when tested I didn't put the two together.
|
Back to top
|
|
 |
|