USB Dongle Recognition in Android - Beaglebone

我只是一个虾纸丫 提交于 2019-12-10 13:47:36

问题


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

  1. Change the Dongle's Mode to Modem Only Mode using AT command

  1. Add the vendor ID & Product ID to init.devicename.sh (Force the kernal to recognize the USB Dongle)

  1. 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 with linux 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!