the atusb boot loader (how to use it for the first time)

Werner Almesberger werner at
Wed May 11 19:28:14 EDT 2011

In the previous mail, I described how to update the boot loader in
the atusb card. Now let's put it to good use.

Flashing the boot loader erased the application in the ATmega32U2
microcontroller on atusb. The boot loader detects that there is no
application and patiently waits for someone to send the rest of the

What you need:

- Hardware

  - an atusb board with the boot loader from ben-wpan git commit
    85f60de9d52195afb3a0232a03e850d96584bb9a or newer
  - a PC running Linux with an available USB port

- Software

  - dfu-util, running on the PC
  - the atusb application (firmware) binary

There are three ways to get dfu-util:

1) Your Linux distribution may already provide a dfu-util package, so
   just follow the package installation procedure

2) Build it from sources:

   git clone git://
   cd dfu-util
   make install

3) If you're an Openmoko veteran, you probably already have dfu-util
   installed. The atusb boot loader is compatible also with older
   versions of dfu-util.

There are two ways to get the atusb application binary:

1) Build it on your own, using these instructions:

2) Download this pre-compiled binary:

   wget -O atusb.bin \

    (Or any updated version I may put there in the future.)

Next, plug atusb into your Linux PC and wait until it enumerates
(usually takes about one second). The LED on atusb should switch on
and stay on continuously.

Run this command (*):

dfu-util -d 20b7:1540 -D atusb.bin

(*) From target "dfu" of

dfu-util should run for 1-2 seconds, then report success. About two
seconds after dfu-util is done, the atusb LED should turn off and
atusb enumerates again.

lsusb -d 20b7:1540 -v  should show

  bDeviceClass          255 Vendor Specific Class
  idVendor           0x20b7 Qi Hardware
  idProduct          0x1540 ben-wpan, AT86RF230-based
  iSerial                 1 46303334393715081003
      bInterfaceClass       255 Vendor Specific Class

Again, the serial nummer should differ between boards.

Congratulations, your atusb is now running the latest firmware and
is ready for mischief !

- Werner

More information about the discussion mailing list