Project Overview

The goal of the project is to create a working environment which allows uploading of sketches created in the Arduino IDE over Ethernet.

Having a working trivial FTP (TFTP) upload mechanism seems to be made up of three separate deliverables:

  1. A Bootloader
  2. Preparing the compiled Arduino sketch for delivery and network access.
  3. An application with a mechanism to initiate a reset over the network and therefore a code download

The first part, the bootloader, needs to initiate a TFTP session with a configured server (i.e. stored in EEPROM), download and verify an application. This isn’t hard in the trivial case, but there are a lot of corner cases to handle. What about partial transfers? What if the host is unreachable? Have you bricked the Arduino?

The bootloader is going to boot up and get an IP address using DHCP, or use a static IP, and download a sketch from a TFTP server. Therefore, the network must support DHCP, the location and compiled sketch must be accessible on the network, and the code must be in a form that can be sent and understood by the bootloader. First we’re going to try sending the unmodified hex file – it has a fairly simple structure and is parsable; failing that we’ll come up with some other encoding. The project will be deemed a success if either DHCP or Static IP works.

Finally, supporting uploading over the net requires some application support as well. While the application is running it must be possible to command it to download a new sketch over the network. The Arduino IDE/hardware currently cleverly exploits a handshaking signal on the serial interface to initiate a reset into the bootloader, but we’ll have no such luxury in on the Ethernet interface. The plan is that any sketch that wants to support remote sketch download must implement a way to trigger a reset without having to (physically) push the reset button (e.g. set WDT and spin). How the end user implements this is completely up to her, but we’ll implement a viable canonical approach that users are free to re-use.

Bootloaders:

If you are not familiar with what an Arduino bootloader is, at a very high level it allows you to load Arduino code over USB using the Arduino environment instead of using an in system programmer and something like AVR Studio. It also does a bunch more stuff. Here is a nice tutorial on AVR bootloaders.

Q&A:

1. When are you going to release some code?
Our goal is to have a TFTP bootloader (deliverable 1) by MakerFaire NY, which is in September.

2. What license will the code be?
The bootloader will be released under the GPL.

3. Can I help?
Yes! Once we have some code, we will need people to test out the bootloader and help us find bugs. Please contact us (support AT wickeddevice DOT com) or post on the Arduino Developers mailing list.

4. What platforms are you targeting?
We would like this to work on the Nanode and Arduino Ethernet hardware. These two platforms use different chipsets, the Microchip ENC28J60 and Wiznet 5100 respectively.  We will probably start development on the Nanode, then port the physical layer code to the Arduino Ethernet. The plan to to avoid branching the code until the last possible moment and re-use as much as possible. We will consider the project successful if we have the three deliverables listed above on either of these platforms.

5. What about security?
As per discussions on the developers mailing list, the first version is going to be implemented using TFTP, which has no security built in. That discussion can take place subsequent to this project.

6. Will it work with a regular Arduino + an Ethernet shield?
Since the Ethernet Shield uses the Wiznet chipset over the SPI interface, same as the Arduino Ethernet, it should “just work.”

7.Will you succeed?
I don’t know. Failure is not an option. (wait – Failure is always an option :)

 

Note: This is not an official effort by Arduino and we are not part of the Arduino organization.

 UPDATE: A couple of people have asked if the code is available yet. I’m afraid not. Currently I would say it will be available no earlier than one month from now (so beginning November).


9 Comments on “Project Overview”

  1. a says:

    any progress?

  2. randy says:

    is the source code available to test yet?

  3. Ryan says:

    If you need testers or basic programming minions, let me know. I would love to see this project take the arduino platform to the next level. Thanks for your hard work!

  4. roger says:

    any updates?

    • Satyam says:

      I have a project coimng up where I will want to control a peripheral from an Arduino.Since it is similar to your launcher library ( mostly sending commands, not receiving info), I decided to start there.The board is a CircuitsAtHome 2.0 board.I’ve installed the USB library and it seems to work the mouse HID routine sends data.The USBHID_desc routine gives me a report OK.I set up your library and example program. It compiled OK.The first time I ran it, the launcher rotated right and stopped. Now it doesn’t respond at all.The missile launcher is OK, since it runs on a PC with the Thunder program.The program runs OK, I get:StartDevice RunningDevice Running in the monitor window.I have tried it both on a Duemilanove and a Mega.Thoughts on how to continue?

  5. admin says:

    Hi Roger,

    Yes – We are working on an app to do this via the web. It is progressing well and being worked on daily, but is also more work than we thought. I don’t have a due date for you, but please keep in touch and we will let you know as soon as we can.

    • Kuban says:

      Nikki,A great little jproect and well done encouraging others to build their own DIY duinos.Your stripboard layout could benefit from keeping the wiring to the crystal as short as possible.Insert the crystal as close to pins 9 and 10 as possible, straddling the two tracks, and then fit the caps so that they connect directly across to pin 8 which is 0V.Another tip is to link across between pins 8 and 22, which are both ground. This can be done under the socket, or on the underside of the board.It’s also good practice to fit 100nF decoupling capacitors as close to the power pins as possible i.e. between pin 7 and 8, and possibly between Avref and GND pins 21 and 22.Link AVcc to Vcc with a short link.The 28pin ATmega has an excellent pin-out ideal for short and sensible wiring, so best to make the most of it.Another good feature would be to add the 6 pin header for a FTDI serial cable. That way you can program and power the barebones over the FTDI cable. A worthwhile investment on any micro design.I’m writing a simple serial command interpreter for the Arduino, as a reusable framework for several design ideas.It allows you to use simple commands like s120, which are typed into a terminal emulator and via the serial link would move a servo to 120 degrees, but any letter and number combination can be decoded to perform a certain action in the code.I’m extending the format to allow for more flexability eg. s1,120 would move servo 1 to 120 degrees.The serial commands are an ideal way of getting numerical data into the Arduino such as programming the correct time into a real time clock application.It also allows a master Arduino to control slave Arduinos, just by linking their serial ports.

  6. [...] have been a long time coming. In my prior post covering the build of the v5 nanode kit, I included [...]

  7. Eray says:

    could certainly do the same thing with the Uno. However, if I were to do this same poecrjt again I’d look into the Freetronics EtherTen (100% Arduino compatible board). I try to stay true to the real boards when possible but this nice Freetronics offering includes the Arduino compatible board, the Ethernet connection, the Micro SD slot, and Power over Ethernet (PoE) all in one! You could power the board from the same PoE switch that’s powering the Cisco phone.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>