воскресенье, 29 мая 2016 г.

RadioLink AT9 firmware update on Linux

DISCLAIMER: Don't blame me if you somehow ruin your transmitter (or anything else) trying to do this. Do it at your own risk.

I'm going to fly my quadcopter with RadioLink AT9. It's a great cheap-o transmitter that has 8 receiver channels and quite a lot of controls to utilize.

However, it seems that most of the time it comes flashed with an old version of firmware out of the box. Mine came with either v1.1.6 or v1.1.8 (I didn't take notice).
As you may or may not be aware, some time ago RadioLink released a new version of firmware v1.2.6. This version, besides other improvements, adds another screen that is useful for displaying various telemetry values of your aircraft, given that you have RadioLink PRM-02 module attached between your receiver and flight controller.

So I've decided to try to update my AT9's firmware from Linux.
RadioLink uses USB Device Firmware Upgrade mechanism to do firmware updates for their transmitters. On Windows, that requires installing a special driver, and using a small (and quite ugly, but maybe that's just me) utility to perform the update.

To do that on Linux, we need dfu-util package. It's there in the Arch Linux repositories (it also exists in Debian and probably other distros too), but as I've found out later, it's a bit old for our needs.

I installed the package, connected my trasmitter to USB, downloaded a new version of firmware, and tried to update it:

$ sudo dfu-util -a 0 -D "/path-to-your-firmware/AT9_RadioLink_DFU_V1_2_6(osd)_ded0.dfu"

(I'm not sure yet about what I need to do to run it without privileges, or even if I can)

Updating process went seemingly without any problems, but when I disconnected my transmitter and power-cycled it, it didn't came back to life. It seemed that it got stuck in the bootloader with red and green LEDs flashing and showing nothing.

A quick google later, I discovered this in the project history. So at this point, in order to correctly perform firmware update with this package, you need to get the latest dfu-util source and compile it. That's typical stuff:

$ cd /tmp
$ git clone git://git.code.sf.net/p/dfu-util/dfu-util dfu-util-dfu-util
$ cd dfu-util-dfu-util/
$ ./autogen.sh
$ ./configure
$ make
(at this point, you can 'cd' to 'src' directory and use compiled executables from there without installing them, just in case)
$ sudo make install

After you do that, just use the same command shown above to do the update, and everything should work just fine. I really think that once you've got fresh dfu-utils installed properly, firmware update becomes much easier on Linux than it is on Windows.

Комментариев нет:

Отправить комментарий