All Boards Tethering

Document created by jesseg Employee on Aug 15, 2012Last modified by Jodi Paul on Apr 9, 2013
Version 4Show Document
  • View in full screen mode

Connectivity - Using a HTC Hero as a 3G modem

Network Connection

A simple way to have a 3G connection on i.MX board is to use a smartphone.
This tutorial is done with an HTC Hero with the original HTC Android 2.1 image.

 

 

Your phone operator has certainly modified your Android image and locked the Tether feature!.
You need the original HTC Android 2.1 image.

 

 

This tutorial has been tested with LTIB1011 and an i.MX53 EVK.

Tether_htc_2.jpg

Setup package in LTIB

Add DHCP support:

-->Package List 
[*] dhcp 
[*] Include DHCP server 
[*] Include DHCP client support

Select

[*] Configure the Kernel 

Launch the build and wait the Kernel Configuration screen.

Setup the Kernel

Configure the kernel as below (I don't know if all is needed):

-->Device Drivers-->Network Device Support-->USB Network Adapters 
       [*] Multi-purpose USB Networking Framework 
       [*] Host for RNDIS and Activesync devices
-->Device Drivers-->Network Device Support-->Wireless LAN 
        [*] Wireless RNDIS USB support
-->Device Drivers-->USB support 
        [*] USB Wireless Device Management Support 
        [*] USB modem (CDC ACM) support
-->Device Drivers-->USB support-->USB Gadget support 
        [M] Ethernet Gadget (with CDC Ethernet support) 
        [*] RNDIS support 
[*] Function Filesystem 
        [*] Include CDC ECM (Ethernet) function 
        [*] Include RNDIS (Ethernet) function
-->Network Support-->Wireless 
        [*] cfg80211 - wireless configuration API

Wait until the end of compilation...
Deploy your Linux on an SD card (see i.MX 51 Flashing Linux Application Only with SD Card Reader


Test on Board

 

Put the SD card on the suitable slot.
Log as "root" (as usual!).
Plug your HTC hero phone on the i.MX board thru USB
Choose "Share Internet connection" (not sure of the French/English translation!) on the HTC Hero (if the pop-up doesn't appear, parameter-->Wireless and Network-->Share Network ).

$ ifconfig -a 

You should see "usb0" in the interface list.

$ ifconfig usb0 up 
$ ifconfig 
$ dhclient usb0 
$ ping www.google.fr

You can ping Google!

Here is the complete log with i.MX53's kernel feedbacks:

freescale login: root   


BusyBox v1.15.0 () built-in shell (ash) 
Enter 'help' for a list of built-in commands.  

root@freescale ~$ usb 2-1.1: USB disconnect, address 3 
usb 2-1.1: new high speed USB device using fsl-ehci and address 4 
rndis_host 2-1.1:1.0: usb0: register 'rndis_host' at usb-fsl-ehci.1-1.1, RNDIS device, 12:16:12:5f:13:0b 
root@freescale ~$ ifconfig -a 
can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
             NOARP  MTU:16  Metric:1 
             RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:64 
             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  

can1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
             NOARP  MTU:16  Metric:1 
             RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
             collisions:0 txqueuelen:64 
             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  

eth0      Link encap:Ethernet  HWaddr 00:04:9F:01:1B:05 
            BROADCAST MULTICAST  MTU:1500  Metric:1 
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
            collisions:0 txqueuelen:1000 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B) 
            Base address:0xc000  

lo          Link encap:Local Loopback 
            LOOPBACK  MTU:16436  Metric:1 
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
            collisions:0 txqueuelen:0 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  
usb0     Link encap:Ethernet  HWaddr 12:16:12:5F:13:0B 
            BROADCAST MULTICAST  MTU:1500  Metric:1 
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
            collisions:0 txqueuelen:1000 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  

root@freescale ~$ ifconfig usb0 up 
root@freescale ~$ ifconfig 
usb0      Link encap:Ethernet  HWaddr 12:16:12:5F:13:0B 
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
             RX packets:6 errors:0 dropped:0 overruns:0 frame:0 
             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
             collisions:0 txqueuelen:1000 
             RX bytes:384 (384.0 B)  TX bytes:0 (0.0 B)  

root@freescale ~$ dhclient usb0 
Internet Systems Consortium DHCP Client V3.0.3b1 
Copyright 2004-2005 Internet Systems Consortium. 
All rights reserved. 
For info, please visit http://www.isc.org/products/DHCP  

eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1) 
Listening on Socket/eth0 
Sending on   Socket/eth0 
Listening on Socket/usb0 
Sending on   Socket/usb0 
Sending on   Socket/fallback 
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 
DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 4 
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6 
DHCPOFFER from 192.168.100.254 
DHCPREQUEST on usb0 to 255.255.255.255 port 67 
DHCPACK from 192.168.100.254 
bound to 192.168.100.100 -- renewal in 369535 seconds. 
root@freescale ~$ ping www.google.fr 
PING www.google.fr (209.85.227.99): 56 data bytes 
64 bytes from 209.85.227.99: seq=0 ttl=41 time=148.918 ms 
64 bytes from 209.85.227.99: seq=1 ttl=41 time=128.646 ms 
64 bytes from 209.85.227.99: seq=2 ttl=40 time=128.532 ms 
64 bytes from 209.85.227.99: seq=3 ttl=40 time=128.313 ms 
64 bytes from 209.85.227.99: seq=4 ttl=41 time=128.361 ms 
64 bytes from 209.85.227.99: seq=5 ttl=41 time=128.289 ms 
64 bytes from 209.85.227.99: seq=6 ttl=41 time=128.219 ms


Attachments

    Outcomes