How can I detect the Serial Port Device ?

Submitted by Dilip Modi
on December 1, 2006 - 5:58am

Hi to all,

I want to get the Product ID, Vendor ID and Manufacturer of the Serial Port Device attached.

How can I get all the Information ?

Please give the Details.

Any good suggession is appreciated.

Thanks.

impossible

Anonymous (not verified)
on
December 1, 2006 - 11:46am

there's no "standard" way to do this. Some modems or "serial cards" may have a eeprom, but there's no "one way to do it right"...
If you want a Product ID, Vendor ID use USB, since the serial port is just a Point-to-Point connection.

Have you tried looking in the proc?

on
December 1, 2006 - 11:50am

I have never tried to do this pacifically before. However I would start with running less on /proc/tty/driver/serial and /proc/devices these files should help you get started.

I'm sure the data you are looking for is in the proc somewhere. I may also try using the command grep to look for a key word. for example if you know the manufacture or the serial number of the device you could do:


grep -r "hp" /proc/*

or you could try


grep -r "93829" /proc/*

Where 93829 is a small portion of the SN.

If you are writing a kernel driver or a peace of code to do this and don't want to do it by hand there should be kernel hooks for this information. I am sorry that I can not help you there.

---------
~H~ Harmon Wood :)

Why use a shotgun to kill a grasshopper when I got a blow gun and some darts right here!

Translation: Rebooting is NOT an option.

more on code.

on
December 1, 2006 - 11:55am

...oh yeah, Don't forget to look at The Linux Kernel Module Programming Guide.

Chapters 5 and 6 may be your best bet.

---------
~H~ Harmon Wood :)

Why use a shotgun to kill a grasshopper when I got a blow gun and some darts right here!

Translation: Rebooting is NOT an option.

Thanks for all the replies.

on
December 4, 2006 - 2:06am

Thanks for all the replies.

But I want to get all the information regarding to serial port without using the proc file.

So what is the other alternative to get all the above information ?

Thanks.

Read them again

Andrew Klossner (not verified)
on
December 4, 2006 - 7:16pm

The first reply is correct and complete. In general, you cannot obtain this information about a device attached to a serial port. (You can obtain it about a device attached to a Universal Serial Bus, a completely different interface.)

Not that complete answer

Anonymous (not verified)
on
December 5, 2006 - 5:55am

You *can* get more information on your serial port an obvious and
often used way (by developpers): just open the PC or portable PC
and find the chip/chipset used! Then you can often fetch the DOC
on Internet, and find where the chipset is not even compatible
with its own docs.

one prob!

Anonymous (not verified)
on
December 5, 2006 - 8:20am

yes, but this wasn't the question, read carefully:
"Serial Port Device attached." He wanted to know, which device IS connected TO the Serial Port, not which uart is used in the chipset.

So then I propose the "use y

Anonymous (not verified)
on
December 7, 2006 - 5:58am

So then I propose the "use your eyes" methodology:
1- locate the serial plug, often at the back of your PC
2- follow the cable - with your fingers if needed.
3- when the cable end onto a box, remove the dust from the box
4- you need now to open your eyes
5- locate and read the sticker on the later box.

As usual, if you have problem doing 5, you may need to learn how to
read - that may involve learning a new alphabet, and optionnaly a
new language, but that is where lies the fun most of the time.

The other methodology I can think of is "unplug and find what's
broken", description left as an exercise to the reader -:)

Now, press the other button...

GENIUS BLOODY

on
December 8, 2006 - 8:37am

So then I propose the "use y
Comment posted by Anonymous (not verified) on Thursday, December 7, 2006 - 02:58

So then I propose the "use your eyes" methodology:
1- locate the serial plug, often at the back of your PC
2- follow the cable - with your fingers if needed.
3- when the cable end onto a box, remove the dust from the box
4- you need now to open your eyes
5- locate and read the sticker on the later box.

As usual, if you have problem doing 5, you may need to learn how to
read - that may involve learning a new alphabet, and optionnaly a
new language, but that is where lies the fun most of the time.

The other methodology I can think of is "unplug and find what's
broken", description left as an exercise to the reader -:)

Now, press the other button...

Thanks a lot for your genius reply.

I hope this kind of bloody reply from the people like you.

I think you have a problem because of not taking proper rest or improper sleeping.

So I propose the "proper sleeping" methodology:

1- Locate the bed, often in the bed room.
2- Follow the bed room - with your feet if needed.
3- When reach to the bed room, open the door.
4- Find your bed and try to sleep by closing your eyes.
5- Don't open your eyes while sleeping.

Some good Doctors says that "Normal Person should sleep at least for 6 hours".

Improper sleeping can damage one's brain and that bloody brain can damage others brain.

NOTE : IT IS NOT COMPULSORY FOR PEOPLE LIKE YOU TO ANSWER THE QUESTION EVEN THOUGH YOU DON'T KNOW ANYTHING. DON'T BE OVER SMART.

Once again thanks for your genius and bloody answer.

Now press the same button and try to sleep.

the problem is

Anonymous (not verified)
on
December 9, 2006 - 12:07pm

please read the title...

he's right!

Need to probe supported devices

on
December 7, 2006 - 8:36am

If you support a certain set of devices that can be attached to a serial port (at the same baud rate, parity, stop bits, etc.), then you send some bytes to the unknown device(s) and see what you get back, for example, a status request (completely device dependent). Such code depends on timeouts -- if you send a status request and wait a certain period and there is no response, then it is not device X so try something to identify also supported device Y.

Since RS232 devices in general follow no defined Plug and Play specification, they do not in general return the "Product ID, Vendor ID and Manufacturer" in response to a certain byte sequence (or on power up/reset) as you would like.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.