Easy Uploading to the Intel Edison

The most powerful feature of the Intel Edison is the wireless connectivity. Once the Intel Edison is setup, you can plug it into power and then easily connect to it to upload a new or updated program. This is especially nice for me since only one of my USB cords works with it.

The easiest way to use this feature is with JavaScript and pairing it with Gulp or Gist and Visual Studio. Unfortunately, I don’t know JavaScript at all, so any time I start looking at programming the Intel Edison I inevitably get lost in all the tutorials and projects surrounding Node.js and JavaScript.

I am comfortable in C and while at some point I want to be proficient in JavaScript, right now I want to play with my hardware toys and the JavaScript is just a distraction. The downside of C is that it became much harder to upload sketches and it is frustrating after getting use to how easy it was before. There are a couple of ways to make it automatic, but I decided to make a little program to make it automatic for me no matter what IDE or computer I am using.

So I sat down for a late night of hacking and the result was EdisonUploader and my first project on Github. Check it out.

The first time you launch it, you get a settings panel. Type in the name or IP of your Edison, as well as, the username and password, save it so it won’t ask again and click OK.

Settings Dialog
Settings Dialog

Hit the Test Connection button and make sure it works.

Edison Uploader
Edison Uploader

Next press Set Watch. This is going to watch a directory (recursively) for any new or modified .elf files. It defaults to the Arduino location: C:\Users\<USERNAME>\AppData\Local\Temp. If you are using Visual Micro in Visual Studio the location is C:\Users\<UserName>\AppData\Local\V.Micro\Arduino\Builds\.

If you are using different software, build the project with verbose mode enabled and determine where the elf file is being placed. Next build a complete new project and were where that file is placed. The path you want for the watch is the root path that is common between those two locations.

Once the watch is set every time the sketch is compiled a message window will pop up asking if you want to upload that sketch. Click Yes and it will fill in the path (you can also manually browse to an elf file). Press Upload ELF and it will upload that sketch to the Intel Edison.

Easy to setup and use: Compile->Yes->Upload ELF.

Release on Github

Getting Started with the Intel Edison

Intel gave Quelab several Edisons and I was able to borrow one with an Arduino breakout board to play with. I was excited to give it a try and expected it to be as easy to setup as my Netduino, but it took quite a bit to get it going. I seemed to have some unique problems with my setup that took most of my time up that I will document below/

The first problem I ran into was getting power through the USB. The light would power on and the computer would do the USB plugged in chime. Then I would hear the USB unplugged chime and the lights would turn off. This would continue to loop forever. The Edison was not getting the power it needed through the USB, I expected this from my laptop. I hunted through all my power adapters and found a 12v 1500 ma power supply from an external hard drive that seemed to do the trick, no more rebooting and a solid light.

This is what the reboot loop looks like:

EdisonLoop

Unfortunately, I was then stuck trying to figure out why the Edison wasn’t being detected. No drive showed up in Windows and nothing was displayed in device manager. I tried different USB ports, restarted on a different computer, installed all the software and couldn’t get anything. I had actually given up and gone to bed when I decided the only thing I didn’t try was the USB cables. So I went through every micro USB cable I had in the house and on the 5th cable it mounted and worked fine! Only 1 of my 5 cables works. These aren’t bad cables, I can use them to connect cell phones to computers just fine. I still have no idea why they don’t work or why my cables have such problems and I haven’t found others with this issue, so I guess I just got all the Edison incompatible cables.

Finally, I went to get it on my network…my WEP protected network. This became another frustrating project. I ran through many guides and countless forum topics and could just never get it working. Why WEP? Well when my network was setup my family had several Nintendo DS systems that we used and those only works with WEP. Since then I forgot my password to my router and so it has stayed. I eventually bit the bullet and decided I would reset my router, it was past time to get off WEP anyways. As it turned out it took little time to reset my router, redo all my configuration, and reconnect all my devices. A fraction of the time I spent trying to get the Edison on WEP. The general solution to getting the Edison connected to a WEP network seems to be…don’t.

Now it is simple and amazing. There are so many ways to connect to it. I have used the Arduino IDE, Intel XDK IoT, and just copying over Node.js (I don’t know to program with any of these items right now btw). I think the Visual Studio hook up is most enticing and some great tutorials for getting everything setup are by Jeremy Foster.

With everything setup and on the network it is convenient to be able to just plug the power in and start writing programs for it from any computer. The only issue I have no is it doesn’t appear to always use the program I expect.

Sometimes it is running Node.js sometimes it is running an Arduino sketch and it isn’t always obvious to me why it chose that. I guess that is what happens switching between all the different possibilities.