I am having coby kyros android tab MID 7024(android 2.2) and want to connect my USB modem to it (huawei E220) is th开发者_如何学JAVAis possible to do with app? I can easily connect my tab with computer in the USB debugging mode and run Java Apps on it.
Or else do I need to do it in the Linux kernel?
I did Google this but couldn't find a solution.
Thanks, -Lasith.
I'm actually integrating a USB modem (UMTS) in gingerbread on a custom platform. If you have configured your USB to recognize new devices on the USB port and it does not recognizes it, yes, it involves integrating it to the kernel. That means your tablet manufacturer did not include your modem drivers. You probably don't need to recompile your kernel since in most cases it could be added as a Kernel module "file.ko" and then you add the "insmode /modules/file.ko" command in the "init.rc" file. The exact solution is not the same for every modem but in general, it involves a "serial to usb" driver provided by the modem manufacturer (sometimes the kernel already has the drivers for that). It also often involves the "usbnet.c" driver to create the usbnet.ko. Often, other drivers specific to you modem are also required. All of that allow the modem to be seen and talk to but not to do anything "useful" like establishing an internet connection. To do that, you need a connection manager to establish the connection and maintain it.
To get that done, you will not find anything on how to integrate that to android. I looked everywhere. There is very few information on integrating drivers in Android since it's just a small community working in cell and tablet companies. The way I did it is to look how to do it from a linux kernel perspective for a kernel version close to yours. Remember that most information you will find will show you how to do it on a linux-pc environment to run on the same machine. You will have to "convert the instructions" for a cross compile environment to ARM. Go to http://source.android.com/source/index.html and you will find the instructions to install the tools to compile android and its kernel. You need that to compile the drivers. For the kernel drivers, it will work the same as linux. For the connection manager, the one you already have might work, if not the linux one do not always work but you will at least see the source code to see what it does. To establish a connection, it most likely requires just a few "AT commands" to set the carrier APN and other parameters and start the connection. That's what I will work on in the next week.
I wish I had a simple answer but it's not that easy. Hopefully this answer will help you get started.
精彩评论