USB 3G Modem & APN Settings

Discussion in 'Android' started by micmo, Sep 18, 2014.

  1. micmo

    micmo New Member

    Joined:
    Sep 2, 2014
    Messages:
    7
    Likes Received:
    0
    Hi there,

    Has anyone been able to successfully use a USB 3G modem with the Android build for the UDOO?

    I have a Huawei E1786 (USB ID 12d1:1446) but cannot get it to work.

    Below is the output of lsusb:
    Code:
    1d6b:0002 (bus 1, device 1)
    1d6b:0002 (bus 2, device 1)
    0424:2514 (bus 2, device 2)
    12d1:1446 (bus 2, device 3) <-- this is the USB modem E1786
    148f:5370 (bus 2, device 4)
    and an extract from dmesg:
    Code:
    <5>scsi 0:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
    <5>scsi 1:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
    <5>sd 1:0:0:0: [sda] Attached SCSI removable disk
    After doing some Googling, it looks like the problem is probably down to the USB modeswitching (from Storage to Modem). Any idea how to solve this?

    A Google suggestion was to use PPPWidget from the play store (https://play.google.com/store/apps/details?id=de.draisberghof.pppwidget) to connect to the USB modem, but the widget kept saying 'no modem found. Worryingly the modem isn't being picked up in /dev/tty*, despite being listed in lsusb.

    So, to have a manual go at things, Android UDOO does not come with a usb_modeswitch binary, but I was able to get one by downloading PPPWidget and cd'ing to the 'app_bin' directory of the app's data directory (/data/data/de.draisberghof.pppwidget/app_bin) - however, I do not have any modeswitch configs on the Udoo to use :/
    I'm going to try and create one this week to give it a go...
    (for reference: http://forum.odroid.com/viewtopic.php?f=60&t=4075)

    Additionally, if I try and create a new APN (Settings > More ), enter the correct information for my network (in this case, Vodafone UK), and click Save - nothing appears in the APN List?! Any ideas why?

    Thanks,
    Mike
     
  2. micmo

    micmo New Member

    Joined:
    Sep 2, 2014
    Messages:
    7
    Likes Received:
    0
    Update: I got things moving a bit. Using PPPWidget, I added the correct APN settings, un-ticked 'automatic device detection'. Then clicked on the widget's icon, selected the huawei dongle (sometimes 12d1:1446 or 12d1:1001), then clicked configure. Then, looking at the USB log I found the correct tty port (ttyUSB2), selected 'manual port selection' and entered that into the settings. Then back in the widget, I clicked 'connect', it seemed to dial out and connect initially, but then got stuck sending LCP config-requests (log below).

    Code:
    /sdcard/pppwidget/log/usb_modeswitch.log
    PPP Widget version 1.3.5 TEST
    USB_ModeSwitch log from Thu Sep  18 20:35:20 BST 2014
    
    Raw args from call: 2-1.2/2-1.2:1.0
    Using external storage dir /storage/emulated/0/pppwidget
    
    Using top device dir /sys/bus/usb/devices/2-1.2
     Reading attributes from /sys/bus/usb/devices/2-1.2/ ...
    ----------------
    USB values from sysfs:
      manufacturer    HUAWEI Technology
      product    HUAWEI Mobile
      serial    
    ----------------
    bNumConfigurations is 1 - don't check for active configuration
    SCSI attributes not needed, moving on
    checking config: /data/data/de.draisberghof.pppwidget/app_tmp/12d1.#android
    ! matched. Reading config data
     devList 1: 
    config: TargetVendor set to 12d1
    Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
    
    Command to be run:
    usb_modeswitch -W -D -s 20 -u -1 -b 2 -g 7 -v 12d1 -p 1446 -f $cB
    
    Verbose debug output of usb_modeswitch and libusb follows
    (Note that some USB errors are to be expected in the process)
    --------------------------------
    
    Read long config from command line
    
     * usb_modeswitch: handle USB devices with multiple modes
     * Version 2.2.0 (C) Josua Dietze 2014
     * Based on libusb1/libusbx
    
     ! PLEASE REPORT NEW CONFIGURATIONS !
    
    DefaultVendor=  0x12d1
    DefaultProduct= 0x1446
    TargetVendor=   0x12d1
    MessageContent="55534243123456780000000000000011063000000100010000000000000000"
    NeedResponse=0
    Success check enabled, max. wait time 20 seconds
    System integration mode enabled
    
    Use given bus/device number: 002/007 ...
    Look for default devices ...
     bus/device number matched
      found USB ID 12d1:1446
       vendor ID matched
       product ID matched
     Found devices in default mode (1)
    Use interface number 0
    Use endpoints 0x01 (out) and 0x81 (in)
    
    USB description data (for identification)
    -------------------------
    Manufacturer: HUAWEI Technology
         Product: HUAWEI Mobile
      Serial No.: not provided
    -------------------------
    Looking for active driver ...
     OK, driver detached
    Set up interface 0
    Use endpoint 0x01 for message sending ...
    Trying to send message 1 to endpoint 0x01 ...
     OK, message successfully sent
    Reset response endpoint 0x81
     Could not reset endpoint (probably harmless): -99
    Reset message endpoint 0x01
     Could not reset endpoint (probably harmless): -99
     Device is gone, skip any further commands
    Bus/dev search active, refer success check to wrapper. Bye!
    
    ok:busdev
    --------------------------------
    (end of usb_modeswitch output)
    
    Checking success of mode switch for max. 20 seconds ...
     Waiting for device file system (1 sec.) ...
     Waiting for device file system (2 sec.) ...
     Waiting for device file system (3 sec.) ...
     Waiting for device file system (4 sec.) ...
     Reading attributes from /sys/bus/usb/devices/2-1.2/2-1.2:1.0 ...
     Mode switch has completed
    Mode switching was successful, found 12d1:1001 (HUAWEI Technology: HUAWEI Mobile)
    Device class of first interface is ff
    Now checking for bound driver ...
     Driver has bound, device is known
    
    All done, exiting
    Code:
    /sdcard/pppwidget/log/ppp.log:
    
    Using port ttyUSB2 for connection
    ATE1
    OK
    AT+CFUN=1
    OK
    AT+CGDCONT=1,"IP","internet"
    OK
    ATD*99***1#
    chat:  Sep 18 20:38:42 CONNECT
    Serial connection established.
    using channel 1
    Using interface ppp0
    Connect: ppp0 <--> /dev/ttyUSB2
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x87e73c5d>]
    LCP: timeout sending Config-Requests
    Connection terminated.
    Receive serial link is not 8-bit clean:
    Problem: all had bit 7 set to 0
    Modem hangup
    Will continue to investigate...
     

Share This Page