Difference between revisions of "Using USB ethernet gadget to communicate"

From IGEP - ISEE Wiki

Jump to: navigation, search
(See also)
(Windows XP)
Line 52: Line 52:
  
 
Gateway 192.168.7.1 </pre>  
 
Gateway 192.168.7.1 </pre>  
<span class="s2">4. Use putty ([http://www.chiark.greenend.org.uk/~sgtatham/putty/ <span class="s3">http://www.chiark.greenend.org.uk/~sgtatham/putty/</span>]) to connect via SSH (192.168.7.2)</span><br>  
+
4. Use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTy] to [[Using SSH to communicate|connect via SSH]] (192.168.7.2)<br>  
  
'''''Thanks to Iñigo Lazkanotegi from Tecnalia (Donostia - San Sebastián) for this contribution.'''''  
+
'''''Thanks to Iñigo Lazkanotegi from Tecnalia (Donostia - San Sebastián) for this contribution.'''''
  
 
== Mac OS X Host USB Network Configuration  ==
 
== Mac OS X Host USB Network Configuration  ==

Revision as of 17:27, 3 August 2011

Connect using USB Ethernet Gadget/RNDIS driver

The Linux kernel has a class of drivers called USB Gadgets (http://www.linux-usb.org/gadget/) that allow you to use USB as a transport for a number of different protocols like serial, virtual file systems, and Ethernet devices.

The USB OTG connector supports using the Ethernet Gadget to create a networking device over USB. From the client's (and host's) perspective this driver simply appears as another Ethernet device, enabling us to have Ethernet access on the board by hooking them up to a desktop, so this USB slave device can communicate with a properly configured USB host.

Following article explains how to get the Ethernet over USB connection working in different Operating Systems

Linux Host USB Network Configuration

You should have the usbnet module available for your Linux kernel. On most distributions, this is the case by default. If this is not the case for your distribution, you will need to enable USB networking support in the kernel. If you build your own kernel then you want 'CDC Ethernet support' in USB Network adaptors.

Ubuntu 10.04 LTS Lucid Lynx

In the file /etc/network/interfaces, you should add a section which looks like this:

auto usb0
iface usb0 inet static
 address 192.168.7.1
 network 192.168.7.0
 netmask 255.255.255.0
 broadcast 192.168.7.255
 gateway 192.168.7.1

Connect to the board using ssh

ssh -l root 192.168.7.2

The authenticity of host '192.168.7.2 (192.168.7.2)' can't be established.
RSA key fingerprint is 9d:0e:ba:02:2a:76:e4:5f:d1:c1:9b:2d:85:6c:83:d4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.7.2' (RSA) to the list of known hosts.
root@192.168.7.2's password: [enter] (no password)
root@igep0030:~#

Windows Host USB Network Configuration

Windows 7

Windows XP

1. During the first seconds the module is recognized as OMAP3430. Avoid the installation of this device and wait until RNDIS/Ethernet gadget is detected by the operating system.

2. The following driver INF file from the Gumstix Project works under Windows XP. http://www.davehylands.com/linux/gumstix/usbnet/linux.inf

3. In Control Panel/Network Connections and after driver installation set up the TCP/IP properties of the Local Network Connection (Linux USB Ethernet/RNDIS Gadget) as follow:

IP address 192.168.7.1

Netmask 255.255.255.0

Gateway 192.168.7.1 

4. Use PuTTy to connect via SSH (192.168.7.2)

Thanks to Iñigo Lazkanotegi from Tecnalia (Donostia - San Sebastián) for this contribution.

Mac OS X Host USB Network Configuration

Please contribute ...

Connect using WLAN interface

Please contribute ...

Troubleshooting

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

In the case of the SSH client in Linux, a changed host key results in the client refusing to connect and showing an remote host identification has changed error

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
8d:0b:29:f0:0a:a1:f5:56:0c:12:18:b0:26:02:6d:9d.
Please contact your system administrator.
Add correct host key in /home/eballetbo/.ssh/known_hosts to get rid of this message.
Offending key in /home/eballetbo/.ssh/known_hosts:57
RSA host key for 192.168.7.2 has changed and you have requested strict checking.

To fix the problem edit your ~/.ssh/known_hosts and remove the line corresponding to this host. 

See also