Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

At current time, I'm developing a simple program which need me to get the device ID to match with the settings from INI (match to match ID) before it can continue to initialize after open port success.

Is it possible to open port and get the unique ID from the hardware such as barcode, cash acceptor,cash dispenser or any other hardware that run by serial port which not have any driver to operate the module and just write through the comport to operate? Right now I want to retrieve hardware ID from serial port. Is it possible? If my question is not clear, pardon me as I'm very desperate to know either the is a way for this issue. I need a help from you guys. Please advise
Posted

1 solution

Serial is just a way of exchanging byte data with a device, its not really like USB where the device exchanges hardware descriptors with the host before it "connects". On top of that, there are no standard interfaces for the devices you listed to get a hardware id from them, they would have to be on a case-by-case, manufacturer-by-manufacturer, and possibly even model-by-model basis.

So pretty much summing it up, there is no way to get a unique hardware ID from the serial device unless the serial device has some kind of command you can send to it to get one. At that point each manufacturer does it different so you'll have to account for all the different types in code.
 
Share this answer
 
Comments
Luiey Ichigo 19-Nov-13 10:34am    
Oh is that so? OK understand. Thanks Ron
Sergey Alexandrovich Kryukov 19-Nov-13 13:34pm    
Correct, a 5.
—SA
Ron Beyer 19-Nov-13 13:42pm    
Thanks Sergey.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900