SparkFun Inventor's Kit for Edison Experiment Guide

Pages
Contributors: Shawn Hymel
Favorited Favorite 4

Appendix C: Using a USB Network

If you are trying to update the Edison's firmware via the Phone Flash Tool Lite program or want to upload code from the XDK without using WiFi, you can enable USB Ethernet networking. For Windows, this relies on the RNDIS driver. OS X needs to use HoRNDIS, and Linux users will need to use USB CDC.

For all operating systems, start by connecting a USB cable from the OTG port of the Edison Base Block to an available USB port on your computer.

Edison Base Block USB OTG port

NOTE: By default, the IP address of the Edison on the USB network is 192.168.2.15. Additionally, you can program the Edison from the XDK by connecting over the USB network!

Windows

Go to Start → Control Panel → Network and Internet → Network and Sharing Center → Change Adapter Settings

Adapter Settings in Windows

Right-click on the Local Area Connection that says Intel Edison USB RNDIS Device and select Properties. This will bring up a new window.

Local Area Connection Properties

Select Internet Protocol Version 4 (TCP/IPv4) and click Properties. This will, once again, bring up a new window.

Entering static IPv4 address

Select Use the following IP address: and enter 192.168.2.2 for the IP Address. Click anywhere in the Subnet mask fields and it should auto-populate. Click OK on this window and OK on the Local Area Connection window.

Your computer and Edison should now be networked together over USB. To check this, go to Start → Accessories → Command Prompt. Enter ping 192.168.2.15 and you should see several replies from the Edison (192.168.2.15).

Pinging the Edison from Windows

OS X

WARNING: At this time, the HoRNDIS driver does not work on OS X 10.11 (El Capitan). If you are using 10.11, keep watching the HoRNDIS site for updates.

Modern versions of OS X do not come with USB networking drivers. As a result, we will need to install a custom driver. Download the latest release (in .pkg form) for HoRNDIS:

Open the .pkg file and follow the instructions to install the driver. Restart your Mac just to be sure. Once it has booted back up, open up System Preferences and go to Network, and you should see the Edison listed. Change Configure IPv4 to Manually, set IP Address to 192.168.2.2, and Subnet Mask to 255.255.255.0.

Configure networking for the USB network on OS X

Click Apply and you should be able to connect to the Edison over the USB network. Open a console and enter the command ping 192.168.2.15. You should see some ping replies. Press 'Ctrl+C' to stop pinging.

Ping the Edison from OS X

OS X also come packaged with an SSH client. In a console, enter:

ssh root@192.168.2.15

Type yes if prompted to accept the RSA key, and enter your Edison's root password.

Linux

Many modern distributions contain USB network drivers by default. With a USB cable connected between your computer and the OTG port on the Base Block, open up a console and enter the command:

ifconfig

You should see an entry labeled usb0, which refers to a USB network. That should be the Edison, assuming you have no other USB Ethernet devices plugged in.

USB network device plugged in

Enter the commands:

sudo ip address add 192.168.2.15/24 dev usb0
sudo ip link set dev usb0 up

If your system does not support the sudo command, use su to become root before entering the commands (without sudo).

You can check to make sure that the IP address was set with ifconfig. You should see an IP address assigned to usb0.

IP address assigned to usb0 on Linux

To test that you have a connection to the Edison, you can ping it:

ping 192.168.2.15

That should give you a few replies, showing that the Edison is indeed at 192.168.2.15. Press 'Ctrl+C' to stop pinging.

Ping the Edison from Linux

Many versions of Linux also come packaged with an SSH client. If so, you won't need any special programs to connect to the Edison over the USB network. Just enter:

ssh root@192.168.2.15

Type yes if prompted to accept the RSA key, and enter your Edison's root password.