Matching USB modems on serial.port

Danny Kukawka danny.kukawka at web.de
Thu Jan 29 03:36:18 PST 2009


On Donnerstag, 29. Januar 2009, Adrian Cox wrote:
> I'm working on HAL support for an unreleased 3G modem. I've noticed that a
> lot of the USB modems in 10-modem.fdi match against the "serial.port" key,
> including ones recently added such as this patch:
>
> http://cgit.freedesktop.org/hal-info/commit?id=3da37e0ebef1bcd4fd57e6745ef4
>c85d26f335f7
>
> Is this correct? 

Depends on the machine. If there are more than one device where 
@info.parent:usb.interface.number == 4 , you need a way to differ between 
them. The serial.port key is then may a way.

> My testing indicates that the "serial.port" key changes  
> depending on the plugging order, and what other devices are attached. For
> example, my modem implements four serial ports. If I plug it in once, they
> are assigned serial.port values of 0,1,2,3. If I open /dev/ttyACM1 with a
> terminal program, unplug the modem (terminal still open), then replug the
> modem the serial.port values change to 0,2,3,4.

For /dev/ttyUSB* serial.port is now the real port of the device itself. (check 
http://cgit.freedesktop.org/hal/commit/?id=b09774739efe4215aa03e7812bca8a50be65e2c1) 

Maybe we have to change it also for ttyACM devices. Can you send the full 
lshal output from your machine with the device attached to the machine.

> If I only match the modem on "@info.parent:usb.interface.number" the HAL
> behavior is correct in the unplug and replug scenario above.

Danny


More information about the hal mailing list