I am writing an application which allows a Linux machine to connect to internet over usb modem. I have multiple usb modems having same vendor and product ID; I cannot differentiate them using lsusb
which gives vendor and product ID. Also giving IDs according to their usb ports does not solve my problem either, because I want to be able to use usb modems in whichever port I want.
Is there a unique identifier which I can use to differentiate my usb devices?
Asked
Active
Viewed 4,002 times
7
-
Do they have a MAC address? This might show in ifconfig when they are operational; if it's constant across connect/disconnect cycles (or especially when moved to another machine) it's probably a real value in the hardware. – Chris Stratton Nov 30 '12 at 15:32
-
no they do not have mac address – denizeren Nov 30 '12 at 15:33
-
try also the serial number, an USB device should have: PID, VID and serial number – garzanti Nov 30 '12 at 15:39
-
@deniz that is very surprising, or is this a telephony modem rather than a mobile network interface? – Chris Stratton Nov 30 '12 at 15:53
-
you can think of it as a usb memory too – denizeren Dec 01 '12 at 07:26
1 Answers
1
Using serial numbers I differetiated my usb modems. Here in this site basic commands are shown.
http://wiki.openmoko.org/wiki/Hardware:AT_Commands#Section_5.2C_General_Commands
I used "ATE+CGSN" command which gives serial number of the device.

denizeren
- 934
- 8
- 20