USB Dongle Recognition on Android - Beaglebone

Problem:

Some of the Huawei USB USB keys are not recognized by Android JellyBean4.1.2 in Beaglebone.

In detail:

I am working with BeagleBone running Android JellyBean4.1.2.

Huawei - E1731 [Locked] , Huawei - E303D [Locked] work perfectly on this platform.

Huawei E303F , Huawei E303F (Both Factory Unlocked) not recognized by the operating system (Communication files are not generated)

Work-around done by me

  • Change Dongle Mode to Modem Only Mode with AT Command

enter image description here

  1. Add the vendor identifier and product identifier to the init.devicename.sh file (make the kernel recognize the USB key).

enter image description here

  1. Modify USB-Modeswitch File with VID and PID

enter image description here

Now the mentioned USB keys work fine.

enter image description here

  • But I want to find the root cause and have to fix it.

  • Is there any way to fix this by creating an Android OS from a source? If so, how? What files need to be changed?

  • Why were some keys recognized without the mentioned work?

UPDATE

As skoperst said, I checked option.c in kernel_dir/drivers/usb/serial/option.c

enter image description here

  • Is there any other than hard-coding Device VID & PID solution other than hard-coding Device VID & PID .

  • I need one more general solution to facilitate the Plug & Play mechanism.

  • Like Plug & Play works in linux . If this is possible with linux kernal , is it also possible with Android?

Your wonderful suggestions have been appreciated. Thank you very much in advance.

+5
source share
1 answer

Your problem is with the kernel running on your device, not with the Android OS.

Which USB device is supported (IE which vid / pid combination) depends on which sets are defined in the kernel, it is hardcoded.

In particular, you need a USB serial device definition (AKA ttyUSB) for your specific VID and PID, and they are usually located in: kernel_dir / drivers / usb / serial / option.c This is also true for any other driver you want. so that the device recognizes.

+3
source

Source: https://habr.com/ru/post/1209755/


All Articles