Thanks Peter and Clemens for your detailed explanations now I got it. On Wed, Feb 18, 2015 at 6:48 PM, Peter Stuge <peter@xxxxxxxx> wrote: > temp sha wrote: >> >> Look closely in the kernel output and you'll see that no ids change, >> >> but that the old device has disconnected and a new device has >> >> connected. >> >> sorry I could not get it completely. >> what is this new device/ old device ? > > A USB device as seen by the kernel is a software concept according to > the USB specification and is really unrelated to physical objects. > > Many physical objects which connect via USB only ever appear in one > way, the same way every time, but many also change how they appear, > depending on a number of different factors, including being told by > software such as a Windows driver or usb_modeswitch to change their > appearance and behavior. > > > USB is not a serial port with power. It is a highly structured bus, > much more similar to a network. > > >> there is only one device USB dongle. >> changing usb mode can change the product id as well ? does it mean product >> id is related with usb's mode of operation rather than actual physical h/w. > > Sure. The physical object is irrelevant to software. What matters is > how the object appears and behaves via USB. This is the definition of > a USB product. Most of the time it is actually adhered to by vendors. > > >> if yes then what about default and target vendor ids seen in the >> usb_modeswitch help cmd? >> does this also depend on mode of operation sometimes ? > > I tried to explain that in the previous email: > >> >> looking into the help I found 0x1446 is default product id wheres >> >> 0x1506 is the target product id. but could not get the idea behind >> >> this concept. >> > >> > The USB modem normally appears as a storage device with the Windows >> > software, so that Windows users can easily install it. > > By this I mean that the storage device is a virtual CD with a Windows > driver stored on it. > > >> > The driver needs to tell the modem to switch from appearing as a >> > storage device to appearing as an actual modem. usb_modeswitch does >> > that. > > A USB device can not change descriptors (with vid+pid) and behavior > on the fly, so the device then disconnects from the host, changes its > behavior and reconnects with different descriptors and different > behavior. Only then can the kernel modem driver use the modem. > > > //Peter -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html