Re: phone detect changes needed
"Roger Binns" <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <010601c543e3$bdac4cb0$3501a8c0@rogersqyvr14d3> |
> I was just curious: what's involved of handling the dual-port issue > at the BitPim app level instead of at the OS level? The problem is that the LG phones are USB composite devices. The first(*) USB interface is of modem class. The second interface is bulk data and is of 'vendor specific protocol' class, aka the diagnostics interface. In Windows, a USB device node is created for the overal composite device and then each interface appears as a seperate device and has a totally seperate driver. It will also have a seperate COM port number and the first interface will show up as a modem and the second as a serial port. The COM port numbers are usually sequential but don't have to be. The only way you could link them is by examining the hardware id that Windows assigns, although even that won't work well if you have two LG phones plugged in since you can't tell them apart. USB devices can have serial numbers which Windows will then use to ensure the settings follow the device, as opposed to having seperate settings for each place the device is plugged in. For whatever reason LG don't provide a USB level serial number. On Linux and Mac, the modem interface is detected and automatically assigned a USB modem device driver. The second interface is ignored and we have to access it via libusb. There is no easy way of tying the the /dev device node and the libusb second interface access together. Since we don't speak the USB modem protocol directly in BitPim, we have to use the OS level driver for accessing the modem interface on Mac/Linux and since there are no device drivers, we have to use libusb for the diagnostics interface. (And if a driver is present for an interface, you can't use libusb for the same interface). (*) Technically the zeroth interface is a interrupt interface and the first interface is bulk data and together they implement the USB modem protocol. Roger ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click