问题
Issue :
Some of the Huawei USB Dongles not recognized by Android JellyBean4.1.2 in Beaglebone.
In Detail :
I am working with BeagleBone running on Android JellyBean4.1.2 .
Huawei - E1731 [Locked] , Huawei - E303D [Locked]
are working fine in this platform.
Huawei E303F , Huawei E303F (Both Factory Unlocked)
are not recognized by the OS
(Communication files not generated)
Work-Around done by myself
- Change the Dongle's Mode to Modem Only Mode using AT command
- Add the vendor ID & Product ID to init.devicename.sh (Force the kernal to recognize the USB Dongle)
- Change the USB-Modeswitch File with VID & PID
Now the mentioned USB Dongles are working fine .
But i want to find the root cause & have to fix it .
Is there any option to fix it by building Android OS from source ? If yes , How ? Which are the files need to change ?
Why some dongles directly recognized without the mentioned work-around ?
UPDATE
As skoperst said , i have checked option.c
in kernel_dir/drivers/usb/serial/option.c
Is there any solution
other than hard-coding Device VID & PID
.I need some more generic solution , to facilitate a
Plug & Play
mechanism.How the
Plug & Play works in linux
.If it is possible withlinux kernal
, is it also possible with Android?
Your great suggestions appreciated . Lot of thanks in advance.
回答1:
Your issue is with the kernel running on the device you use and not about the Android OS.
Which USB device are supported(I.E. which combination of vid/pid) depends on which sets are defined in the kernel, its hard-coded.
Specifically you need USB serial device definition(AKA ttyUSB) for you specific VID&PID and they are usually located in: kernel_dir/drivers/usb/serial/option.c That's also true for any other driver you wish the device will recognize.
来源:https://stackoverflow.com/questions/27616045/usb-dongle-recognition-in-android-beaglebone