You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Android USB

Build Steps for RNDIS Feature


repo init -u https://code.rdkcentral.com/r/manifests -b kirkstone -m rdkb-bpi-extsrc.xml

repo sync -j`nproc` --no-clone-bundle

Enable the distro for RNDIS in below path

/meta-cmf-bananapi/conf/distro/include/rdk-bpi.inc
#Enable the below DISTRO to enable Hybrid Hal(rndis/modem) for cellular devices
DISTRO_FEATURES_append_broadband = " cellular_hybrid_support"

MACHINE=bananapi4-rdk-broadband source meta-cmf-bananapi/setup-environment-refboard-rdkb
/---copy 6.6 bl2 and fip files to downloads folder-------/

bitbake rdk-generic-broadband-image

Test Steps 

  • Connect ethwan cable - erouter0 is coming up with v4/v6
  • Remove ethwan and connect Android phone to USB port of BPi device using USB to C-type cable and enabled USB Tethering on Android phone.
  • Once USB Tethering in enabled below lines are observed on serial console.
    root@Filogic-GW:~# [  370.758874] usb 1-1.4: new high-speed USB device number 4 using xhci-mtk
    [  370.946456] cdc_acm 1-1.4:1.1: ttyACM0: USB ACM device
    [  382.185096] usb 1-1.4: USB disconnect, device number 4
    [  382.748876] usb 1-1.4: new high-speed USB device number 5 using xhci-mtk
    [  382.949809] rndis_host 1-1.4:1.0 usb0: register 'rndis_host' at usb-11200000.usb-1.4, RNDIS device, 02:26:0a:15:62:0c
    [  385.990274] cellularmanager[10486]: Cannot find device "wwan0"
  • usb0 interface comes UP. 
    root@Filogic-GW:~# ifconfig usb0
    usb0      Link encap:Ethernet  HWaddr 02:26:0A:15:62:0C  
              inet6 addr: fe80::26:aff:fe15:620c/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:7 errors:0 dropped:0 overruns:0 frame:0
              TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:668 (668.0 B)  TX bytes:1464 (1.4 KiB)
  • Reboot device to start dhcp on new selected interface
    root@Filogic-GW:~# ifconfig usb0
    usb0      Link encap:Ethernet  HWaddr 02:26:0A:15:62:0C  
              inet addr:192.168.113.181  Bcast:192.168.113.255  Mask:255.255.255.0
              inet6 addr: fe80::26:aff:fe15:620c/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:44 errors:0 dropped:0 overruns:0 frame:0
              TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:14906 (14.5 KiB)  TX bytes:19903 (19.4 KiB)

Basic info with RNDIS set up

root@Filogic-GW:~# ifconfig usb0
usb0      Link encap:Ethernet  HWaddr 02:26:0A:15:62:0C  
          inet addr:192.168.113.181  Bcast:192.168.113.255  Mask:255.255.255.0
          inet6 addr: fe80::26:aff:fe15:620c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:419 errors:0 dropped:0 overruns:0 frame:0
          TX packets:600 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:189632 (185.1 KiB)  TX bytes:162761 (158.9 KiB)


root@Filogic-GW:~# ifconfig erouter0
erouter0  Link encap:Ethernet  HWaddr 02:01:00:7B:5E:88  
          UP 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@Filogic-GW:~# ping www.google.com
PING www.google.com (142.250.66.4): 56 data bytes
64 bytes from 142.250.66.4: seq=0 ttl=114 time=28.445 ms
64 bytes from 142.250.66.4: seq=1 ttl=114 time=37.527 ms
64 bytes from 142.250.66.4: seq=2 ttl=114 time=36.626 ms
64 bytes from 142.250.66.4: seq=3 ttl=114 time=42.642 ms
64 bytes from 142.250.66.4: seq=4 ttl=114 time=20.625 ms
64 bytes from 142.250.66.4: seq=5 ttl=114 time=56.432 ms
64 bytes from 142.250.66.4: seq=6 ttl=114 time=34.281 ms
^C
--- www.google.com ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max/mdev = 20.625/36.654/56.432/10.404 ms

root@Filogic-GW:~# ip r
default via 192.168.113.106 dev usb0 
10.0.0.0/24 dev brlan0 proto kernel scope link src 10.0.0.1 
169.254.85.0/24 dev brebhaul proto kernel scope link src 169.254.85.1 
192.168.101.0/24 dev br0 proto kernel scope link src 192.168.101.3 
192.168.106.0/24 dev br106 proto kernel scope link src 192.168.106.1 
192.168.113.0/24 dev usb0 proto kernel scope link src 192.168.113.181 
192.168.245.0/24 dev br403 proto kernel scope link src 192.168.245.1 


Switch over form RNDIS Mode to Eth-WAN Mode

steps

  • Remove USB cable - usb0 goes down
  • Connect ethwan cable and Reboot the device
  • erouter0 comes up with v4/v6
  • DNS is updated

root@Filogic-GW:~# [  411.635639] usb 1-1.4: USB disconnect, device number 5
[  411.640938] rndis_host 1-1.4:1.0 usb0: unregister 'rndis_host' usb-11200000.usb-1.4, RNDIS device
[  411.650890] rndis_host 1-1.4:1.0 usb0 (unregistering): left allmulticast mode
[  411.639351] ip[12709]: Device "usb0" does not exist.

root@Filogic-GW:~# ifconfig ub0
ifconfig: ub0: error fetching interface information: Device not found

root@Filogic-GW:~# ifconfig erouter0
erouter0  Link encap:Ethernet  HWaddr 02:01:00:7B:5E:88  
          inet addr:192.168.0.7  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::1:ff:fe7b:5e88/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:471 errors:0 dropped:0 overruns:0 frame:0
          TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:151572 (148.0 KiB)  TX bytes:27878 (27.2 KiB)

root@Filogic-GW:~# ping www.google.com
PING www.google.com (142.250.66.4): 56 data bytes
64 bytes from 142.250.66.4: seq=0 ttl=115 time=16.660 ms
64 bytes from 142.250.66.4: seq=1 ttl=115 time=15.750 ms
64 bytes from 142.250.66.4: seq=2 ttl=115 time=15.797 ms
64 bytes from 142.250.66.4: seq=3 ttl=115 time=15.841 ms
64 bytes from 142.250.66.4: seq=4 ttl=115 time=15.764 ms
64 bytes from 142.250.66.4: seq=5 ttl=115 time=15.770 ms
64 bytes from 142.250.66.4: seq=6 ttl=115 time=15.886 ms
^C
--- www.google.com ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max/mdev = 15.750/15.924/16.660/0.303 ms


iPhone USB

  • TBD

USB Modem

  • TBD


  • No labels