On 11 February 2010 06:54, Gu, Yang <[email protected]> wrote:
> In oFono code, "device4" represents the modem, while "device1" is the 
> udev_device when calling function add_huawei_em770(modem, udev_device). When 
> I check if it's ttyUSB2 or not in my code, I think I'm checking the device1 
> and its sysname (Showed as KERNEL in device1, but not the one showed in /dev 
> directory), and in the context of this modem (device4). I do believe there 
> may be some other ttyUSB2 in the system, for example, we have another em770 
> modem pluged in. But these two ttyUSB2 are in different context. I ever tried 
> to change the name showed in /dev directory by writing some udev rules, but 
> this sysname (KERNEL) seems stable (It's still ttyUSB2). Is it possible this 
> sysname gets changed under some circumstance expect the kernel or driver 
> changes? If not, I still think it's safe and convenient to check this value 
> here.

Honestly I don't know.  But the whole /dev path may change between
kernel versions, for example I believe "ttyUSB" was "ttyU" a long time
ago (I'm not 100% sure).  So in my opinion the safe way is to compare
the "bInetrfaceNumber" and "configuration" of the parent devices to
"02" and "Huawei  Configuration".

Best regards
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to