User:Joerg rw/usb-networking
Revision as of 23:14, 15 June 2012
connect via USB cable - stop/kill networkmanager if it turns out it interferes with manual setup on your PC
laptop:~ # tail -f /var/log/syslog ##click "PC suite mode, on N900 -> Jun 15 23:43:34 HaleBopp kernel: [171995.846433] usb 1-1: USB disconnect, device number 9 Jun 15 23:43:34 HaleBopp dbus-daemon[1069]: **** REMOVING /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1:1.0/host7/target7:0:0/7:0:0:0/block/sdb Jun 15 23:43:34 HaleBopp dbus-daemon[1069]: **** EMITTING REMOVED for /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1:1.0/host7/target7:0:0/7:0:0:0/block/sdb Jun 15 23:43:34 HaleBopp dbus-daemon[1069]: **** REMOVING /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1:1.0/host7/target7:0:0/7:0:0:1/block/sdc Jun 15 23:43:34 HaleBopp dbus-daemon[1069]: **** EMITTING REMOVED for /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1:1.0/host7/target7:0:0/7:0:0:1/block/sdc Jun 15 23:43:34 HaleBopp dbus-daemon[1069]: **** scsi_host IGNORING REMOVE /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1:1.0/host7/scsi_host/host7 Jun 15 23:43:35 HaleBopp kernel: [171996.849156] usb 1-1: new high speed USB device number 10 using ehci_hcd Jun 15 23:43:35 HaleBopp kernel: [171996.964379] usb 1-1: New USB device found, idVendor=0421, idProduct=01c8 Jun 15 23:43:35 HaleBopp kernel: [171996.964383] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Jun 15 23:43:35 HaleBopp kernel: [171996.964387] usb 1-1: Product: N900 (PC-Suite Mode) Jun 15 23:43:35 HaleBopp kernel: [171996.964390] usb 1-1: Manufacturer: Nokia Jun 15 23:43:35 HaleBopp kernel: [171996.989324] cdc_acm 1-1:1.6: This device cannot do calls on its own. It is not a modem. Jun 15 23:43:35 HaleBopp kernel: [171996.989448] cdc_acm 1-1:1.6: ttyACM0: USB ACM device Jun 15 23:43:35 HaleBopp kernel: [171996.990659] usbcore: registered new interface driver cdc_acm Jun 15 23:43:35 HaleBopp kernel: [171996.990661] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters Jun 15 23:43:35 HaleBopp kernel: [171997.001495] cdc_ether 1-1:1.8: usb0: register 'cdc_ether' at usb-0000:00:1a.7-1, CDC Ethernet Device, fe:3c:f6:21:f9:97 Jun 15 23:43:35 HaleBopp kernel: [171997.002233] usbcore: registered new interface driver cdc_ether Jun 15 23:43:35 HaleBopp modem-manager[1425]: <info> (ttyACM0) opening serial port... Jun 15 23:43:35 HaleBopp dbus-daemon[1069]: modem-manager[1425]: <info> (ttyACM0) opening serial port... Jun 15 23:43:35 HaleBopp ifup[14725]: Service network not started and mode 'auto' -> skipping Jun 15 23:43:35 HaleBopp ifup[14724]: Service network not started and mode 'auto' -> skipping Jun 15 23:43:40 HaleBopp modem-manager[1425]: <info> (ttyACM0) closing serial port... Jun 15 23:43:40 HaleBopp dbus-daemon[1069]: modem-manager[1425]: <info> (ttyACM0) closing serial port... Jun 15 23:43:40 HaleBopp modem-manager[1425]: <info> (ttyACM0) serial port closed Jun 15 23:43:40 HaleBopp dbus-daemon[1069]: modem-manager[1425]: <info> (ttyACM0) serial port closed Jun 15 23:43:40 HaleBopp modem-manager[1425]: <info> (ttyACM0) opening serial port... Jun 15 23:43:40 HaleBopp dbus-daemon[1069]: modem-manager[1425]: <info> (ttyACM0) opening serial port... Jun 15 23:43:40 HaleBopp modem-manager[1425]: <info> (Nokia): GSM modem /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-1 claimed port ttyACM0 Jun 15 23:43:40 HaleBopp dbus-daemon[1069]: modem-manager[1425]: <info> (Nokia): GSM modem /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-1 claimed port ttyACM0 Jun 15 23:43:40 HaleBopp modem-manager[1425]: <info> (ttyACM0) closing serial port... Jun 15 23:43:40 HaleBopp dbus-daemon[1069]: modem-manager[1425]: <info> (ttyACM0) closing serial port... Jun 15 23:43:40 HaleBopp modem-manager[1425]: <info> (ttyACM0) serial port closed Jun 15 23:43:40 HaleBopp dbus-daemon[1069]: modem-manager[1425]: <info> (ttyACM0) serial port closed laptop:~ # ^C laptop:~ # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:24:7E:DA:92:BA inet addr:192.168.1.32 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:864130 errors:0 dropped:0 overruns:0 frame:0 TX packets:860517 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:662287573 (631.6 Mb) TX bytes:175300050 (167.1 Mb) Interrupt:20 Memory:fc200000-fc220000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:142 errors:0 dropped:0 overruns:0 frame:0 TX packets:142 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:18498 (18.0 Kb) TX bytes:18498 (18.0 Kb) usb0 Link encap:Ethernet HWaddr FE:3C:F6:21:F9:97 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) usbpn0 Link encap:UNSPEC HWaddr 1B-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 POINTOPOINT NOARP MTU:65541 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:3 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) wlan0 Link encap:Ethernet HWaddr 00:1E:65:CF:8F:5C 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)
now on N900 (need xtrem installed for that, and rootsh):
~> root password: Nokia-N900:~# ifconfig -a lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:33 errors:0 dropped:0 overruns:0 frame:0 TX packets:33 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3991 (3.8 KiB) TX bytes:3991 (3.8 KiB) phonet0 Link encap:UNSPEC HWaddr 15-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP POINTOPOINT RUNNING NOARP MTU:4000 Metric:1 RX packets:197 errors:0 dropped:0 overruns:0 frame:0 TX packets:226 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:3952 (3.8 KiB) TX bytes:3129 (3.0 KiB) upnlink0 Link encap:UNSPEC HWaddr 1B-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP POINTOPOINT RUNNING NOARP MTU:49152 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:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) usb0 Link encap:Ethernet HWaddr AA:91:D6:60:5A:E0 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) wlan0 Link encap:Ethernet HWaddr 2C:D2:E7:0C:76:60 inet addr:192.168.1.34 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4381 errors:0 dropped:0 overruns:0 frame:0 TX packets:2645 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6118630 (5.8 MiB) TX bytes:275129 (268.6 KiB) wmaster0 Link encap:UNSPEC HWaddr 00-1F-DF-A5-C1-A7-00-00-00-00-00-00-00-00-00-00 UP BROADCAST RUNNING 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) Nokia-N900:~# Nokia-N900:~# Nokia-N900:~# ifconfig usb0 192.168.5.111 netmask 255.255.255.0 Nokia-N900:~# ifconfig usb0 usb0 Link encap:Ethernet HWaddr AA:91:D6:60:5A:E0 inet addr:192.168.5.111 Bcast:192.168.5.255 Mask:255.255.255.0 UP BROADCAST RUNNING 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) Nokia-N900:~#
on PC:
HaleBopp:~ # ifconfig usb0 192.168.5.110 netmask 255.255.255.0 HaleBopp:~ # /sbin/route add -host 192.168.5.111/32 dev usb0 HaleBopp:~ # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 192.168.1.0 * 255.255.255.0 U 1 0 0 eth0 192.168.5.0 * 255.255.255.0 U 0 0 0 usb0 wap11.kicker.de * 255.255.255.255 UH 0 0 0 usb0 HaleBopp:~ # ifconfig usb0 usb0 Link encap:Ethernet HWaddr FE:3C:F6:21:F9:97 inet addr:192.168.5.110 Bcast:192.168.5.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:18 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:4241 (4.1 Kb) HaleBopp:~ # ping 192.168.5.111 PING 192.168.5.111 (192.168.5.111) 56(84) bytes of data. 64 bytes from 192.168.5.111: icmp_seq=1 ttl=64 time=0.792 ms 64 bytes from 192.168.5.111: icmp_seq=2 ttl=64 time=0.495 ms 64 bytes from 192.168.5.111: icmp_seq=3 ttl=64 time=0.357 ms 64 bytes from 192.168.5.111: icmp_seq=4 ttl=64 time=0.499 ms ^C --- 192.168.5.111 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3000ms rtt min/avg/max/mdev = 0.357/0.535/0.792/0.161 ms HaleBopp:~ # #### I also installed sshd and set password via the dialog that pops up during installation HaleBopp:~ # ssh 192.168.5.111 The authenticity of host '192.168.5.111 (192.168.5.111)' can't be established. RSA key fingerprint is 5d:16:83:dd:37:c9:26:04:2c:2e:d8:67:44:b3:1f:89. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.5.111' (RSA) to the list of known hosts. root@192.168.5.111's password: BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash) Enter 'help' for a list of built-in commands. Nokia-N900:~#