How to get an internet connection with APSync on Edison using a Mac and Ethernet over USB

How to get an internet connection with APSync on Edison using a Mac and Ethernet over USB.

One of the significant values of using the APSync on the Intel Edison is that it comes preconfigured as an access point, however, changing the network setup in order to get an internet connection for loading other software proved rather difficult. I was been able to get a connection without significantly modified the setup by utilizing ethernet over USB and the Mac’s internet sharing capability. While it’s not hard to setup, it is a little flakey which I’ll note below. This example was tested using a Mac running macOS Sierra, Edison running the October release of APSync, and utilizing both the Intel mini-breakout board and the carrier board of the Pixhawk II. The only additional hardware required is a good quality USB cable.

The first step is to load an ethernet over USB driver and set up the proper ip settings for the device on the Mac as chronicled here: https://www.youtube.com/watch?v=n-ZnyhI-vNc. The basic steps are:

  1. Install the ethernet over USB driver from here: http://joshuawise.com/horndis
  2. Restart the Mac and connect a USB cable from the Mac to the Edison carrier board. The cable should be connected to the carrier board’s usb connecter which is denoted as J16 on the mini-breakout board and “debug” port on the Pixhawk II.
  3. In the Mac’s System Preferences Network pane you should see the Edison connection. Choose “Using DHCP with manual address: in the configuration and set the IP Address to any address in the range 192.168.2.1 - 192.168.2.14.

You can now test your connection by ssh’ing to apsync@192.168.2.15. (Note you need to use this address, which is the device address, not the address you specified above.)

The next step is to setup Internet Sharing.

  1. Go to the Sharing pane in System Preferences on the Mac.
  2. Select the “Internet Sharing” service on the left (if it is already on you have to deactivated it) then check the Edison Port on the right and select any active connection to the internet from the dropdown above.
  3. Activate Internet Sharing by clicking the checkbox for the service on the left.

After that you need to setup the Edison to forward ip requests to the connection you just set up.

  1. Connect to the Edison through the either the access point or the USB connection.
  2. run the command “sudo route add default gw [ip address specified in step 3]” (without the quotes) on the Edison. This will tell the Edison to use the USB connection for IP requests. Note that is a per-session setup and will need to be repeated for each session where you want an internet connection. (If you would like to try setting up permanent IP routing reference the instructions here: https://www.cyberciti.biz/faq/howto-debian-ubutnu-set-default-gateway-ipaddress/. I chose to leave the it on a per-session basis so as not to disrupt the original network setup.)

NOW HERE’S THE FLAKY PART…

My connection would not work unless I reset the the Network setup done in step 3 above. I have to go in and set it to a different ip address in the range, click apply, then set it back to the ip specified in step 8 and apply it. I have to do this every time I set the Edison to use it even though the Mac show a green (good) connection. Everything else, the internet sharing, etc. remains the same.

You should now be able to “ping google.com” from the Edison to test the internet connection.

Hope this helps.

J.

1 Like