Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Using USB ethernet gadget to communicate

1,098 bytes added, 12:22, 29 August 2012
m
Connect to IGEP device
<section begin= Connect using USB Ethernet Gadgetexclude /RNDIS driver >{{Message/Information Message|title=|message= In this guide is used [[ IGEP firmware Yocto ]]}}<section end=exclude />== Overview ==
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 == Requirements ==
= Linux Host USB Network Configuration =There are some requisites to follow this guide:
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. *IGEP Processor Board *Host PC
== Ubuntu 10.04 LTS Lucid Lynx Connect to IGEP device ==
In the file /etc/network/interfaces, you should add a section which looks like this: === Linux ===
auto usb0'''NOTE:''' 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. IGEP SDK Virtual Machine has this module enabled. <section begin=USB_linux />*In the file /etc/network/interfaces, you should add: <pre>iface usb0 inet staticdhcp</pre> *Plug an USB Type-A to USB Type-A mini cable between your host PC and the USB OTG from IGEP device. Use a powered USB Hub if you use IGEP COM MODULE or PROTON Board. *If you use IGEP&nbsp;SDK&nbsp;VM you need to attach the [http://labs.isee.biz/index.php/IGEP_SDK_Virtual_Machine#Attach_removable_devices_to_Virtual_Machine removable device] RNDIS driver. address *Type in a terminal:<pre>sudo ifup usb0</pre> *Revise that:<pre>jdoe@ubuntu ~ $ ifconfig...usb0 Link encap:Ethernet HWaddr 66:cc:f2:be:51:b6 inet addr:192.168.7.1 network 10 Bcast:192.168.7.0 netmask 255 Mask:255.255.255.0 broadcast 192 inet6 addr: fe80::64cc:f2ff:febe:51b6/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:14 errors:0 dropped:0 overruns:0 frame:0 TX packets:44 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2496 (2.1684 KB) TX bytes:8794 (8.7.255KB) gateway 192.168.7.1</pre> *Connect to IGEP device
Connect jdoe@ubuntu ~ $ ssh root@192.168.7.1 The authenticity of host '192.168.7.1 (192.168.7.1)' can't be established. ECDSA key fingerprint is 80:be:2d:b6:fe:b1:09:c3:3b:ac:0f:1d:f2:43:f2:20. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.7.1' (ECDSA) to the board using ssh list of known hosts. root@igep00x0:~# uname -a Linux igep00x0 2.6.37 #1 Thu Jul 19 09:07:47 CEST 2012 armv7l GNU/Linux root@igep00x0:~# <section end=USB_linux />==== 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
ssh -l root 192.168.7.2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! The authenticity of host '192.168.7.2 Someone could be eavesdropping on you right now (192.168.7.2man-in-the-middle attack)' can't be established! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key fingerprint sent by the remote host is 9d 8d:0e0b:ba29:02f0:2a0a:76a1:e4f5:5f56:d10c:c112:9b18:2db0:8526:6c02:836d:d49d. Are you sure you want Please contact your system administrator. Add correct host key in /home/eballetbo/.ssh/known_hosts to continue connecting (yesget rid of this message. Offending key in /home/eballetbo/.ssh/no)? yesknown_hosts:57 Warning: Permanently added 'RSA host key for 192.168.7.2' (RSA) 1 has changed and you have requested strict checking. To fix the problem edit your ~/.ssh/known_hosts and remove the line corresponding to the list of known hoststhis host.&nbsp;  ===== NFS in root filesystem ===== Don't use NFS in root@192.168.7.2's password: [enter] (no password)filesystem combined with USB Ethernet Gadget === Windows and MAC OSX<br> root@igep0030:~#===
= Windows Host USB Network Configuration =You should use [[IGEP SDK Virtual Machine|IGEP&nbsp;SDK&nbsp;Virtual Machine]] to develop under IGEP&nbsp;Technology, but you can use these alternatives too:
==== Windows 7 ====
*http://robosavvy.com/forum/viewtopic.php?p=28788
==== 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.
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>PuTTy]) to [[Using SSH to communicate|connect via SSH ]] (192.168.7.2)</span><br>  '''''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 '''Thanks 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 Iñigo Lazkanotegi from Tecnalia (manDonostia -in-the-middle attackSan Sebastián)! 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 hostcontribution.&nbsp;'''
= See also =
*[[Using SSH to communicate]]
*[[Using serial debug port to communicate]]
*[[Using IGEP WLAN to communicate]]*[[Category:CommunicationsIGEP_module_standalone]]
4,199
edits