Raspberry Pi 2でAndroidのUSBテザリングを使う
Raspbian jessieを使っています。
Nexus One (Android 2.3.6)をUSBケーブルでつなぎ、Androidの設定でUSBテザリングを有効にするとそれだけで使えました。
$ dmesg |tail [12881.591125] usb 1-1.5: USB disconnect, device number 7 [12881.871995] usb 1-1.5: new high-speed USB device number 8 using dwc_otg [12881.985095] usb 1-1.5: New USB device found, idVendor=18d1, idProduct=4e13 [12881.985123] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [12881.985140] usb 1-1.5: Product: Nexus One [12881.985155] usb 1-1.5: Manufacturer: Google, Inc. [12881.985172] usb 1-1.5: SerialNumber: HT015P803242 [12882.009486] usbcore: registered new interface driver cdc_ether [12882.028650] rndis_host 1-1.5:1.0 usb0: register 'rndis_host' at usb-3f980000.usb-1.5, RNDIS device, a2:cd:1a:a1:66:8a [12882.028851] usbcore: registered new interface driver rndis_host
新しくusb0というインタフェースができています。
$ ifconfig -s Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 493 0 0 0 388 0 0 0 BMU lo 65536 0 136 0 0 0 136 0 0 0 LRU usb0 1500 0 6443 0 0 0 4149 0 0 0 BMRU $ ifconfig usb0 usb0 Link encap:Ethernet HWaddr a2:cd:1a:a1:66:8a inet addr:192.168.42.204 Bcast:192.168.42.255 Mask:255.255.255.0 inet6 addr: fe80::a0cd:1aff:fea1:668a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6443 errors:0 dropped:0 overruns:0 frame:0 TX packets:4149 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9455321 (9.0 MiB) TX bytes:494963 (483.3 KiB) $ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.42.129 0.0.0.0 UG 205 0 0 usb0 192.168.42.0 * 255.255.255.0 U 205 0 0 usb0