aeksco / lyrebird

:bird: Impersonate USB devices over Bluetooth LE
MIT License
9 stars 2 forks source link

Flash firmware with Node.js? #5

Closed aeksco closed 8 years ago

aeksco commented 8 years ago

The core feature of our desktop application will be flashing new firmware to the Lyrebird USB device. Ideally this is something we can accomplish entirely in Node.js as it will enable us to use NodeWebKit for cross-platform desktop builds.

After doing some research it appears that we can flash firmware to AVR microcontrollers in Node.js using the STK500 protocol - there's even a reasonably well-maintained library we can use.

@AaronPerl the answer to this question is really more in your wheelhouse - if the Atmel 32u2 is STK500 compliant (v1 or v2) and we can write / source a supporting bootloader we'll be in fantastic shape in regards to firmware updates.

aeksco commented 8 years ago

There are some additional AVR & Node.js resources here.

AaronPerl commented 8 years ago

By default the USB Atmel chips come installed with a USB DFU bootloader, so putting an STK500 one on would require soldering an ISP header to every board since you can only put new bootloaders on with an ISP programmer. Also, there's no implementation of STK500 on top of USB so it would also require breaking out a serial port on every unit as well; DFU is the best option by far for programming.