Symbian
Android

piPOIAlert


Forum
BugTracker / Roadmap












piPOIAlert onon
de en

pipip.de

Android


Android Tablet USB UMTS-Stick Howto

The following tutorial will show you how to get an USB UMTS stick working on your Android tablet.
Tested on my Acer Iconia A510 (Tablet PC, Android 4 - ICS) with an Huawei E173 UMTS-stick


For any question please use the forum.

Prerequisites

USB_ModeSwitch

"USB_ModeSwitch is a mode switching tool for controlling flip flop (multiple device) USB gear."
(mode_switch homepage)
In this case USB_ModeSwitch is needed to make Android recognise the USB UMTS stick as an UMTS modem.

Install USB_ModeSwitch

  • Compile usb_modeswitch for ARM (static) or use the already compiled version usb_modeswitch-1.1.9-arm-static
  • Copy usb_modeswitch to your Android device to /system/sbin (if sbin does not exist copy the file to bin; make sure its got the executable right: x)
    You need root access for that! You also might want to remount your system partition for read and write access (Android Terminal Emulator: mount -o remount,rw /system)
  • Create /etc/usb_modeswitch.conf
    This is an example file for the Huawei E173, for other UMTS-sticks there is an overview provided at link (Make sure idVendor and idProduct fits for your UMTS-Stick, dmesg will help you finding your IDs)
    ##############
    # Huawei E173
    DefaultVendor=  0x12d1
    DefaultProduct= 0x1446
    
    TargetVendor=   0x12d1
    TargetProduct=  0x1001
    
    MessageContent="55534243000000000000000000000011060000000000000000000000000000"
    
    CheckSuccess=5
    ##############

Use USB_ModeSwitch

  • Run: usb_modeswitch -c /etc/usb_modeswitch.conf
  • Use dmesg to check if the modeswitch worked correctly

    terminal
    # su
    # usb_modeswitch -c /etc/usb_modeswitch.conf


    # dmesg
    ...
    USB Serial support registered for GSM modem (1-port)
    option 1-3:1.0: GSM modem (1-port) converter detected
    usb 1-3: GSM modem (1-port) converter now attached to ttyUSB0
    option 1-3:1.1: GSM modem (1-port) converter detected
    usb 1-3: GSM modem (1-port) converter now attached to ttyUSB1
    option 1-3:1.2: GSM modem (1-port) converter detected
    usb 1-3: GSM modem (1-port) converter now attached to ttyUSB2
    ...

ppp

ppp implements the Point-to-Point Protocol (PPP) on Linux.
(ppp homepage)
In this case ppp is needed to establish the PPP connection (pppd) and to configure the modem (chat).

Install pppd / chat

  • Compile pppd and chat for ARM (static) or use my compiled version Android_UMTS-Tools.tar.gz
  • Copy pppd and chat to your Android device to /system/bin (in my case pppd already existed --> only copy chat)
    (Make sure both files got the executable right: x)
    You need root access for that! You also might want to remount your system partition for read and write access (Android Terminal Emulator: mount -o remount,rw /system)
  • Create /etc/ppp/peers/ppp
    hide-password
    noauth
    connect "/system/bin/chat -f /etc/chatscripts/ppp"
    debug
    /dev/ttyUSB0
    460800
    defaultroute
    noipdefault
    noccp
    nobsdcomp
    user "USER"
    password "PASS"
    usepeerdns
    connect-delay 10000
  • Create /etc/chatscripts/ppp
    ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
    # modeminit
    '' 'ATZ'
    TIMEOUT 5
    OK AT+CPIN?
    'READY-AT+CPIN=1234-' ''
    TIMEOUT 20
    'OK' 'AT+cgdcont=1,"IP","internet.partner1"'
    'OK' 'ATDT*99#'
    CONNECT \d\c
    1234 is your SIM pin
    internet.partner1 is the APN for your provider, in this case Alice (overview of German network providers)

Use pppd

  • Run: pppd call ppp nodetach
    status: network should be found --> light flashes blue
  • I needed to run pppd call ppp nodetach a 2nd time to connect to the network
    status: connection to network should be established --> light stays blue
  • You might want or even need to set your DNS server by running setprop net.dns1 8.8.8.8 (Googles DNS Server)

    terminal
    # su
    # usb_modeswitch -c usb_modeswitch.conf
    # pppd call ppp nodetach
    # pppd call ppp nodetach


    # setprop net.dns1 8.8.8.8