Change CDC ACM serial driver information - driver

I'm using a USB CDC serial converter. When I connect it to my computer it displays "USB-CDC Serial<>USB". Now I want to change this information to the name of my product. Does anybody know how to do it in Linux and Windows?
I want to change these information in dmesg:
[100480.031359] usb 2-1.8: Product: USB-CDC Serial<>USB
[100480.031362] usb 2-1.8: Manufacturer: Silicon Labs
[100480.031364] usb 2-1.8: SerialNumber: 1234
Any tip will be very helpful,
Thanks!

There is a field in the USB device descriptor called iProduct at offset 15. This is called the product string descriptor.
You will need to change the firmware of the USB device and have it send the name of your product in this location.
Check out this website for more details on USB descriptors
http://www.beyondlogic.org/usbnutshell/usb5.shtml#DeviceDescriptors

Related

How does an OS communicate with device drivers

I know that an OS provides an api for a device driver to access the configuration space so that the device driver knows the memory addresses assigned to the device and can control the device. However, my question is how does an OS communicate with device drivers? For example, let's say the OS wants a document to be printed. How does it tell that it wants a document to be printed to the printers device driver and provide the driver with the text to print? Device drivers are developed by different developers, so wouldn't the drivers expect different types or formats of data from an OS. For example, printer A's driver may expect the command byte before the text data but printer B's driver may expect the text data before the command byte.

Difference between wi-fi router and usb modem devices

Both usb and wifi routers are modes of connectivity.
Is there any difference between the two devices? Is it correct to say both are same?
While the term USB modem refers to any type of data/fax/voice modem device which can be connected to a computer using USB, the term more commonly describes a specific portable USB device that looks similar to a USB flash drive and can be as small as 100 x 35 x 23mm in physical size and weigh only around 25grams . These small portable USB fax modems do not require a power source and can be plugged into any USB port on your PC, notebook, or Macintosh computer and can also be disconnected from the computer without turning off the system. One end of the portable USB modem will have a USB interface, while the other end will have an RJ-11 port for connecting your phone line.
A wireless router is a device that performs the functions of a router and also includes the functions of a wireless access point. It is used to provide access to the Internet or a private computer network. It can function in a wired LAN (local area network), in a wireless-only LAN (WLAN), or in a mixed wired/wireless network, depending on the manufacturer and model.

I need a way to retrieve and log the IMEI, Serial, ICCID, and MEID of an iPhone device connected via usb

As it says in the title I'm after a way to retrieve and log the IMEI, Serial, ICCID, and MEID of an iPhone device connected via usb.
Ideally this method would work with multiple devices plugged in at once and export the information to a spreadsheet with the information separated by column.
Trying to develop a better inventory system for my company's iPhone fleet.
I've been struggling with this for a while now to no avail.
Thanks for looking!
You can use the command system_profiler SPUSBDataType from a shell to list the USB information, including the serial number of an attached iPhone - you could parse this.
USB Hi-Speed Bus:
Host Controller Location: Built-in USB
Host Controller Driver: AppleUSBEHCI
PCI Device ID: 0x0aa6
PCI Revision ID: 0x00b1
PCI Vendor ID: 0x10de
Bus Number: 0x24
iPhone:
Product ID: 0x12a8
Vendor ID: 0x05ac (Apple Inc.)
Version: 6.02
Serial Number: 797296a8472XXXXXXXXXf5806511452228ac9
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x24300000 / 3
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 500
To get things like the IMEI you will need to communicate with the actual phone, probably using IOUSBLib and you will need to do a lot of research on the USB primitives supported by the iPhone as I don't know how well documented they are.
It is probably easier to use a commercial Mobile Device Management (MDM) platform.

cellular modem data session via "ethernet" adapter?

Most USB cellular modems present as a composite device containing (amongst other things) a modem and a network adapter. The latter shows up under the "LAN or High-Speed Internet" heading in Network Connections (and under Network Adapters in Device Manager).
I know how to initiate a data session on the modem interface using standard AT commands, but I am looking for information or documentation on (programmatically) using the network adapter.
My modems are a ZTE MF626i and a Sierra Wireless USB 301. I would happy with documentation that was either general in nature or specific to these modems.
Edited to add: I'm using Windows XP, so no Mobile Broadband API.
Assuming you're using Windows 7 or 8, you can use the built in Windows interface.
Use the VID and PID to identify the device amongst the Windows Network Adapters (find the VID and PID manually by inspecting the network adapter properties in Windows Device Manager).
Once you know the device, you can get the Windows device id programmatically.
Then use Windows Mobile Broadband API together with the device id to make data connections via the network adapter.
http://msdn.microsoft.com/de-de/library/windows/desktop/dd323269(v=vs.85).aspx

Windows device manager and hardware IDs

I'm curious how the windows device manager obtains the hardware IDs for a device, even though no device driver may be loaded for the device yet. Anybody have a clue on how Windows goes on about this?
On a related note, I am interested in supporting language localization for the software we are writing; is it possible for a device and/or driver to report back its friendly name and description in a localized fashion? Is there a common practice for this already?
Thanks for your time.
First, to understand the order of drivers being loaded, you're recommended to switch the Device Manager into View | Devices by Connection mode.
As you would notice, the devices are located below their bus driver. For PCI devices, it'll be "PCI bus". For USB devices, it would be their USB hub. Each bus driver has its own idea about how the identifier strings should be formatted:
Device Instance Id
Hardware Ids
Compatible Ids
Location, etc.
It returns them in response to IRP_MN_QUERY_ID (BusQueryInstanceID, BusQueryHardwareIDs, BusQueryCompatibleIDs) and IRP_MN_QUERY_DEVICE_TEXT (DeviceTextDescription, DeviceTextLocationInformation etc.)
Of course, since the bus driver enumerated the devices (i.e. created the child devices you're seeing) in the first place (through whatever standard interface appropriate for the bus; e.g. 'Get Device/String Descriptor' on USB), it knows their vendor ID, product ID etc.
The device's driver does not have to be loaded at this time. In fact, it can't be loaded. The device IDs are precisely what instructs the PnP system as to which driver matches the device.
As to localization:
Unlike IRP_MN_QUERY_ID, which provides opaque strings intended for device matching, the IRP_MN_QUERY_DEVICE_TEXT information was indeed intended to be localized. For that purpose, you receive the requested Locale ID (LCID) in the input data (Parameters.QueryDeviceText.LocaleId).
[As Alphaneo noted, a USB hub driver might pass this LCID onwards to the USB device (within a Get String Descriptor request), hoping that the USB device itself has localized strings.]
The top level process is called enumeration. Most modern device buses support a mechanism that lets the OS query the buss and determine what devices are connected to the bus.
The PCI family of buses all support enumeration. The PCI bus has a special enumeration space just for this. This is where "Plug-n-Play" ID's come from.
The device id's uniquely identify a device on the bus and enable the OS to find the correct driver for that device.
Other buses, including USB and FireWire have enumeration strategies
Device ID, is a combination of information given from the device. For example, for a USB device, the string is based on the VID and PID (Vendor ID and Product ID). Now, this cannot happen if no driver is loaded. Atleast some driver, bus driver would have to be loaded for the OS to get the Device ID.
Now, for language support, I guess for WDM driver, there is a QUERY_LANG or something, I dont remember properly, alternatively some devices like USB, have Language ID support. This language ID determines the language of the Product descriptor string.
Please note that there is a difference between the hardware identifier/serial number and the true unique hardware ID. Maybe this will explain it better:
http://www.soft.tahionic.com/download-hdd_id/hardware%20ID%20programmer%27s%20DLL.html

Resources