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.
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!
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.)
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.
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 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 -:)
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.
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.
impossible
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?
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:
or you could try
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.
...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.
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
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
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!
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
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
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
please read the title...
he's right!
Need to probe supported devices
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.