This walks through assigning your LAN9512 an IP address and enabling ssh.
Follow these steps after screen
'ing into your Edison from your host Linux machine, as described here (i.e., sudo screen /dev/ttyUSB0 115200
).
-
Create an interfaces file for use with
ifup
andifconfig
. For a brief description of theifup
command, see here or the man page.- Create the
/etc/network
directory:mkdir /etc/network
. - Create the
/etc/network/interfaces
file:touch /etc/network/interfaces
.
- Create the
-
Find the name of the LAN9512 adapter. A very simple way is to use the
ifconfig
command with the-a
flag to show all connected and disconnected interfaces. With the LAN9512 disconnected, runifconfig -a
. Then, connect the adapter and runifconfig -a
again. Note the name of the newly added interface. Mine wasenp0s17u1u1
.- For extra information, use the
dmesg
tool to view the kernel log and verify that the kernel found the device. You can rundmesg | grep -i network
to find when the kernel recognized the network device, and when it gave it a name.
- For extra information, use the
-
Edit the
/etc/network/interfaces
file and add the configuration:vi /etc/network/interfaces
Add the following: (be sure to double check the interface name)
auto enp0s17u1u1 iface enp0s17u1u1 inet dhcp
-
Bring the network interface up with
ifup
and the interface name. Ignore any errors fromrun-parts
about directories not existing.Run:
ifup enp0s17u1u1
This should tell you something about discovering the network interface and assigning it an IP address (using DHCP). -
You can now test that your card is setup properly by running
ping xx.xx.xx.xx
on the Edison's IP address from your host Linux machine. -
You must now either run
edison_configure --setup
but do not enable wifi. You will be asked to give a root password and name your Edison. If you do not provide a root password, you will have to edit the/lib/systemd/system/sshd.socket
file, as shown below:Allowing ssh without a root password:
vi /lib/systemd/system/sshd.socket
In this file, comment out the line:
BindToDevice=usb0
using a#
.Then reboot by running:
reboot
.(more info here).
-
You should now be able to ssh into your Edison!
Bonus: Running
edison_configure
sets up your Edison to broadcast it's hostname, so instead of ssh'ing into your Edison's IP address, try using<your hostname>.local
, e.g.,edison.local
Known Issue: For some reason, the Edison will not switch into USB Host mode except for every other reboot. Try doing a cold restart by unplugging and plugging power back in. (For more info, see here)