[UPDATE][ICS] USB 3G Huawei Dongle Drivers

Search This thread

trevd

Inactive Recognized Developer
Jul 19, 2011
895
1,271
Hull
Samsung Galaxy Tab 4
UPDATE - I have built the required kernel modules ( magic: 3.0.8+ SMP preempt mod_unload ARMv7) for ICS.

Download: archos-ics-gsm.zip

Remember these are only the kernel level drivers and a bit more hacking is required if you want to used these in the android environment.

Happy Hacking! :D


[ORIGINAL POST]
Hi

Here is the required kernel module (usb_wwan.ko) to enabled the modem functionality at the kernel level for Huawei 3G Dongles on the archos G9.

I don't know if anyone will find it useful but I thought I'd share it anyway :)

It was built from the archos-g9-gpl and is compatible with kernel version "2.6.35.7+ #1 SMP PREEMPT"

Notes:
Huawei USB 3G Modems actually require 2 modules to function usb_wwan.ko and option.ko. Archos already ship option.ko in /lib/modules on the device so this was the only one missing.

To use:

1. insmod usb_wwan.ko
2. insmod option.ko
3. Use usb_modeswitch to initialize the modem

The modem can be then be found at /dev/ttyUSB*

See this post for a quick guide into making a ppp connection using this driver

Thanks
 

Attachments

  • usb_wwan.ko.zip
    57.3 KB · Views: 2,756
  • archos-ics-gsm.zip
    129 KB · Views: 4,801
Last edited:

coolkid602008

Senior Member
Nov 2, 2008
75
12
I'm very interested in this. So I have a Huawei EC168 air card from a little cdma provider named Alltel (who is now partially owned by Verizon), would installing this allow it to function? I mean do you know if this is a universal driver or is it meant for GSM only?

I'm a bit of a noob at this. I've got the first two commands to run and usb_wwan.ko is just in my /mnt/storage
What are the specific switches I need to get the usb_modeswitch command working? -H just results in "No default vendor/product ID given. Aborting."
Btw I'm running everything through Terminal Emulator as I don't have adb or anything like that up and running currently on my computer.

Edit: I can't mess with this until I get hdd mounting working again. That was the whole reason I bought this tablet.
If anyone can help with that my topic is here. http://xdaforums.com/showthread.php?p=22722509
 
Last edited:

trevd

Inactive Recognized Developer
Jul 19, 2011
895
1,271
Hull
Samsung Galaxy Tab 4
I'm unsure whether this is a CDMA driver but you can give it a go. :)

From the command line I copied usb_wwan.ko to /lib/modules on the device and then did then following (the command should work equally as well in terminal emulator, with out the adb shell bit obviously :) )

Code:
adb shell insmod /lib/modules/usb_wwan.ko
adb shell insmod /lib/modules/option.ko

Then I Usb Mode Switched to the modem. I my case a Huawei E1752 [O2 UK Branded]
I discovered the correct target product [0x1436] (which isn't included in the 12d1_1446 config file) after plugging it into linux an listing my USB devices using lsusb in a terminal window.

Code:
adb shell usb_modeswitch  -s 6 -v 12d1 -p 1446 -V 12d1 -P 1436 -M 55534243123456780000000000000011062000000100000000000000000000 > /dev/null

Obviously the usb modeswitch parameters are unique to your device and you can of course specify a configuration file using the -c switch instead of using the switches I have here.

After this I had access to the modem on the /dev/tttyUSB*
I gave the modem about 1 minute to initialize and then ran

Code:
adb shell /system/bin/pppd /dev/ttyUSB0 115200 nocrtscts nocdtrcts local usepeerdns defaultroute noipdefault ipcp-accept-local ipcp-accept-remote user cmnet password cmnet debug kdebug 7 connect "/system/xbin/chat -v -t 500 -s -f /data/media/gprs_start"

This brings up a PPP connection on ppp0. Although it didn't register as any sort of connection in android, it does however allow me to use the android web browser on this connection. :)

Note:
You do need 2 additional files which I have attached - The gprs_start script which I copied to the /data/media directory and is run by pppd and ip-up which you need to place in your /etc/ppp directory. This handles setting the correct dns servers after you have connected

This method is a little rough and I have been experimenting with the android ril interface but I'm having some problems keeping the connection alive for any length of time after starting the ril-daemon and I found the connection was at it's most stable when the ril-daemon is stopped.
 

Attachments

  • ppp.zip
    527 bytes · Views: 1,061
Last edited:

trevd

Inactive Recognized Developer
Jul 19, 2011
895
1,271
Hull
Samsung Galaxy Tab 4
I didn't manage to get the full kernel to build because there was errors in the makefile last time in downloaded the source

out of more speculation than anything else I copied the makefile from the gen8 gpl source.

This didn't complete the build, it failed on ffmpeg but it did build kernel modules which is all I really needed for this.

I might have another go now that I understand a little more about the build process and makefiles.


Sent from my HTC Sensation XE with Beats Audio using xda premium
 
  • Like
Reactions: stas-nsb

gen_scheisskopf

Senior Member
Feb 22, 2009
1,129
249
Poznań
Xiaomi Redmi Note 8 (2021)
I didn't manage to get the full kernel to build because there was errors in the makefile last time in downloaded the source

out of more speculation than anything else I copied the makefile from the gen8 gpl source.

Current kernel sources are fine- compilation went without any problems. Included linux.config seems to be the recovery kernel config though (2.5 MB zImage, quite some modules built).
Compiled using crosstool-ng 1.9.3 on xubuntu 10.10 x86 (in VirtualBox)
 
  • Like
Reactions: trevd

VOODOOS!L

Senior Member
Nov 22, 2005
434
11
hi, very interested in this, I have an Archos 80 G9 16GB Turbo and a Huawei USB 3G dongle as well. But I'm coming from windows mobile, just my first android device. Anyone willing to give some more info & instructions on how to get it working all together? Is it required to have a rooted device?
Maybe a little app can be created to automate the installation/usage of non archos USB 3G dongles?

CIAO!
VOODOOS!L
 

trevd

Inactive Recognized Developer
Jul 19, 2011
895
1,271
Hull
Samsung Galaxy Tab 4
Hi Voodoos!l

Rooted Device is required. Apologies for the light instructions post 3 explains slightly more :)

It still may not be enough if your coming from a windows only environment!

I Assume at least some basic knowledge of:
Android Debug Bridge (ADB)
Composite Usb Devices (usb_modeswitch)
Android/Linux Kernel Modules (Installing insmod /lsmod etc)
Point to Point Protocol (How to start a connection)

I did write a quick and dirty app to do the mode-switching and then start the connection, I can give you the code if you want, it's nothing special, It just runs the commands from android using Superuser.

I've not had chance to work on this lately and I think a better route to go down is to hack the UsbKeyManager.apk which is what Archos use to turn on there own 3G Dongle. We should be able to modify it to accept any dongle. I had begun testing with HoneyComb but was waiting for ICS to appear before continuing.
 
Last edited:
  • Like
Reactions: daed02

mrgimo

Member
Jan 13, 2010
6
0
Hi all.

I'm following this thread too because I need a 3g adapter but I found that the archos one is 7Mbps, while I'd like to have a 14Mbps one. Trevd, I hope that you will find the solution for me and the other archos fans! :)

If you suggest me a good adapter, I'll buy it and then help you with tests.

Thanks.
Bye
 

h47e

Member
May 25, 2011
12
1
Togliatty
# usb_modeswitch -s 6 -v 12d1 -p 1446 -V 12d1 -P 1436 -M 55534243123456780000000000000011062000000100000000000000000000

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
No devices in default mode found. Nothing to do. Bye.

# ls -la /dev/tty*
crw-rw-rw- 1 root root 5, 0 Apr 21 18:04 /dev/tty
crw------- 1 root root 249, 0 Apr 21 18:04 /dev/ttyGS0
crw------- 1 root root 249, 1 Apr 21 18:04 /dev/ttyGS1
crw------- 1 root root 249, 2 Apr 21 18:04 /dev/ttyGS2
crw------- 1 root root 249, 3 Apr 21 18:04 /dev/ttyGS3
crw------- 1 root root 252, 0 Apr 21 18:04 /dev/ttyO0
crw------- 1 root root 252, 1 Apr 21 18:04 /dev/ttyO1
crw------- 1 root root 252, 2 Apr 21 18:04 /dev/ttyO2

#dmesg
[ 2338.794708] hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad?
[ 2338.795043] hub 1-0:1.0: unable to enumerate USB device on port 1

Bus 002 Device 013: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552 (HSPA modem)
3g stick ON
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    UPDATE - I have built the required kernel modules ( magic: 3.0.8+ SMP preempt mod_unload ARMv7) for ICS.

    Download: archos-ics-gsm.zip

    Remember these are only the kernel level drivers and a bit more hacking is required if you want to used these in the android environment.

    Happy Hacking! :D


    [ORIGINAL POST]
    Hi

    Here is the required kernel module (usb_wwan.ko) to enabled the modem functionality at the kernel level for Huawei 3G Dongles on the archos G9.

    I don't know if anyone will find it useful but I thought I'd share it anyway :)

    It was built from the archos-g9-gpl and is compatible with kernel version "2.6.35.7+ #1 SMP PREEMPT"

    Notes:
    Huawei USB 3G Modems actually require 2 modules to function usb_wwan.ko and option.ko. Archos already ship option.ko in /lib/modules on the device so this was the only one missing.

    To use:

    1. insmod usb_wwan.ko
    2. insmod option.ko
    3. Use usb_modeswitch to initialize the modem

    The modem can be then be found at /dev/ttyUSB*

    See this post for a quick guide into making a ppp connection using this driver

    Thanks
    1
    I didn't manage to get the full kernel to build because there was errors in the makefile last time in downloaded the source

    out of more speculation than anything else I copied the makefile from the gen8 gpl source.

    This didn't complete the build, it failed on ffmpeg but it did build kernel modules which is all I really needed for this.

    I might have another go now that I understand a little more about the build process and makefiles.


    Sent from my HTC Sensation XE with Beats Audio using xda premium
    1
    I didn't manage to get the full kernel to build because there was errors in the makefile last time in downloaded the source

    out of more speculation than anything else I copied the makefile from the gen8 gpl source.

    Current kernel sources are fine- compilation went without any problems. Included linux.config seems to be the recovery kernel config though (2.5 MB zImage, quite some modules built).
    Compiled using crosstool-ng 1.9.3 on xubuntu 10.10 x86 (in VirtualBox)
    1
    Hi Voodoos!l

    Rooted Device is required. Apologies for the light instructions post 3 explains slightly more :)

    It still may not be enough if your coming from a windows only environment!

    I Assume at least some basic knowledge of:
    Android Debug Bridge (ADB)
    Composite Usb Devices (usb_modeswitch)
    Android/Linux Kernel Modules (Installing insmod /lsmod etc)
    Point to Point Protocol (How to start a connection)

    I did write a quick and dirty app to do the mode-switching and then start the connection, I can give you the code if you want, it's nothing special, It just runs the commands from android using Superuser.

    I've not had chance to work on this lately and I think a better route to go down is to hack the UsbKeyManager.apk which is what Archos use to turn on there own 3G Dongle. We should be able to modify it to accept any dongle. I had begun testing with HoneyComb but was waiting for ICS to appear before continuing.