Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 31 Jul 2014, 08:01
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Improving Puppyserialdetect
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 3 [40 Posts]   Goto page: Previous 1, 2, 3
Author Message
Jesse

Joined: 08 May 2005
Posts: 465
Location: Auckland, NZ

PostPosted: Sat 01 Nov 2008, 23:40    Post subject:  

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:
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
puppyinputdetect-1.1i.tar.gz
Description  latest edition 1.1i, code/command name revamp - its different!!
gz

 Download 
Filename  puppyinputdetect-1.1i.tar.gz 
Filesize  8.12 KB 
Downloaded  395 Time(s) 
Back to top
View user's profile Send private message 
edoc


Joined: 07 Aug 2005
Posts: 4341
Location: Southeast Georgia, USA

PostPosted: Sun 02 Nov 2008, 00:04    Post subject:  

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!

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
edoc


Joined: 07 Aug 2005
Posts: 4341
Location: Southeast Georgia, USA

PostPosted: Thu 01 Jan 2009, 00:04    Post subject:  

Here are the results of two different "cat" inquiries:

Quote:
# # 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



Quote:
# 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
#

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
edoc


Joined: 07 Aug 2005
Posts: 4341
Location: Southeast Georgia, USA

PostPosted: Thu 01 Jan 2009, 00:21    Post subject:  

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]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


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!

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
edoc


Joined: 07 Aug 2005
Posts: 4341
Location: Southeast Georgia, USA

PostPosted: Sun 04 Jan 2009, 23:59    Post subject: FTDI Driver Challenges  

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
Quote:
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

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
edoc


Joined: 07 Aug 2005
Posts: 4341
Location: Southeast Georgia, USA

PostPosted: Mon 05 Jan 2009, 21:16    Post subject:  


_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
edoc


Joined: 07 Aug 2005
Posts: 4341
Location: Southeast Georgia, USA

PostPosted: Sun 11 Jan 2009, 22:57    Post subject:  

[size=18BUMP!][/size]

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

Help, please?

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Mon 12 Jan 2009, 05:01    Post subject: Serialdetect  

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 Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
edoc


Joined: 07 Aug 2005
Posts: 4341
Location: Southeast Georgia, USA

PostPosted: Mon 12 Jan 2009, 12:05    Post subject:  

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?

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
edoc


Joined: 07 Aug 2005
Posts: 4341
Location: Southeast Georgia, USA

PostPosted: Tue 13 Jan 2009, 00:28    Post subject:  

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?

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 3 of 3 [40 Posts]   Goto page: Previous 1, 2, 3
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0930s ][ Queries: 13 (0.0068s) ][ GZIP on ]