Missing ip on usb0

Started by dovolenka, September 14, 2015, 01:07:11 PM

Previous topic - Next topic

dovolenka

Hi all. My first post in the forum :)

I powered up my a20-4gb running debian from micro-sd. Managed to ssh the device using LAN connector (192.168.1.254) but using USB0 (192.168.2.1) is not successful.

Here is some diagnostics

root@debian/#dmesg
[ 3701.336862] usb 1-3: new full-speed USB device number 3 using xhci_hcd
[ 3701.510527] usb 1-3: New USB device found, idVendor=0525, idProduct=a4a2
[ 3701.510534] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3701.510538] usb 1-3: Product: RNDIS/Ethernet Gadget
[ 3701.510540] usb 1-3: Manufacturer: Linux 3.4.90+ with sw_usb_udc
[ 3701.523858] cdc_eem 1-3:1.0 usb0: register 'cdc_eem' at usb-0000:00:14.0-3, CDC EEM Device, aa:1a:ea:6b:c6:61

root@debian/#ifconfig
usb0      Link encap:Ethernet  HWaddr 9a:ee:a2:d1:f8:23 
          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)

Olinuxino a20 Users Manual says:
2.6.3 SSH via mini USB cable in Debian
The latest official Debian Linux image allows the use the USB_OTG connector for SSH connection
without the need of a LAN cable or a serial cable. You can use a mini USB cable connected
between your host PC and the on-board mini USB connector. For connection convenience there is a
DHCP server running specifically for USB0 interface. The DHCP server should give IP address to
the new USB0 interface of your host PC so you can make SSH connection from your PC to the
default board IP address of the USB0 interface – 192.168.2.1

Could it be that the DHCP server running for giving USB0 the ip 192.168.2.1 in reality is not running?


Gerrit

there is no DHCP server running and ifconfig is showing the the interface does not have an ip address,

the most easy way is to add this section to a20 /etc/network/interfaces

auto usb0
iface usb0 inet static
address 192.168.2.1
netmask 255.255.255.0
hwaddress ether ee:a1:99:99:4e:c1


And if the other machine is also linux add to

/etc/network/interfaces
auto usb0
iface usb0 inet static
address 192.168.2.2
netmask 255.255.255.0
hwaddress ether ee:a1:99:99:4e:c2


so then the a20 has ip 192.168.2.1 and the other has ip 192.168.2.2


dovolenka

Thanks for your answer.

I tried your suggestion, but it changed nothing.

Instead I solved this by adding usb0 to my list of internet connections (some dialog in xfce desktop). After dooing that


root@debian/# ifconfig
usb0      Link encap:Ethernet  HWaddr 5a:0c:ad:27:ec:44 
          inet addr:192.168.2.26  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::580c:adff:fe27:ec44/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:107 errors:10 dropped:0 overruns:0 frame:7
          TX packets:158 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16808 (16.4 KiB)  TX bytes:31360 (30.6 KiB)


now gives usb0 an ip, and finally a20 let me ssh it over usb.


BUT this connection seems to be much slower than using eth0. ANY ideas?


JohnS

What usb speed is it running at?  That may be why it's slower.

John

dovolenka


JohnS

#5
The board doesn't support 3.0 does it?

What do your system logs etc show for the actual speed being used?

If the above - which shows full speed - then THAT is the speed.  Read up on USB...

John