Saturday, 23 July 2022

Firmware updates for v22 models

During the first six months of this year I released four new version 22 Bluefly models to complete the transition to a new processor. Read the earlier blog posts from 2022 to see what the changes are and for a more in depth description of each model. In this post I will describe the firmware update procedure for each model. There are some similarities with the v12 and earlier versions firmware update procedures, but from v22 onwards there is a custom version of ds30loader built just for the Bluefly. 

Updated firmware  

From time to time I need to fix bugs or want to add new features to the Bluefly main application. There are some subtle differences between the firmware for each of the v22 models. 

The software on the Bluefly processor includes a small ds30 bootloader and the main Bluefly application. When the processor reboots it first runs the bootloader program which checks to see if the ds30StudioPro program is trying to communicate with it. If the bootloader does not get the message, then it branches to the main application and the Bluefly will do it's thing. 

At the time of this blog post the most recent versions of the firmware include bug fixes and minor updates. I recommend updating the firmware if you are having troubles, but for many pilots if you are happy with your Bluefly the way it is then updating the firmware is probably not needed. Fixes include:

  • Fixed a bug where the processor hangs unexpectedly. 
  • Fixed a bug where the IGC memory is turned off too early during shutdown and IGC files were not being signed correctly. 
  • Minor updates to default settings. 
  • Other minor fixes. 
It is important you get the firmware built for your model. The most recent version of the v22 firmware will be uploaded here: https://www.blueflyvario.com/files/v22/

Note the numbering format: {MODEL_NAME}_{Hardware Version}.{Hardware Revision}.{Single Digit Model Code}{Two Digit Firmware Build Number}

Tools to download

You will also need the ds30StudioPro program and the latest BFVDesktop application. Get them here:
You will need a computer which can run windows applications, a USB cable (and only for the TTL_GPS model - a USB to Serial converter and some soldering skills) 

Firmware update procedure

The update procedure is similar for each model 

Step 1: Make sure you have your power and connections right.
  • BTH_USB and BTH_GPS_IGC models:
    • Both of these models have the ds30 bootloader communicating through UART1, which is the micro USB port of the Bluefly. 
    • Plug the Bluefly into your computer with a USB cable and make sure to note which COM port is listed. 
    • You might want to connect to the BFVDesktop application just to make sure you know which COM port the Bluefly is installed as. Ensure that you shutdown the BFVDesktop application before trying to update the firmware - only one application can connect to the Bluefly at a time. 
    • Shutdown the Bluefly by long pressing the button. 
    • For bricked varios that are unresponsive to button presses there are additional instructions below. 
  • USB_TTL_GPS_IGC model:
    • This model has the ds30 bootloader communicating through UART3, which is connected to the USB-C port of the Bluefly. 
    • Plug the Bluefly into your computer with a USB cable and make sure to note which COM port is listed. 
    • You will need to power this model, either by starting up the Kobo if it is connected to the TTL port of the Bluefly, or by temporarily closing the USB PWR lines (note that if you are connected to a Kobo and you do this you will damage something - see the warning in the release blog post).  
    • Shutdown the Bluefly by long pressing the button. 
  • TTL_GPS model:
    • This is quite a bit more involved. 
    • You will need to solder a USB-Serial convertor to the UART 3 connection on the back. You really only need GND, Rx and Tx connected if you are already powering it from elsewhere (like the main TTL connection connected to a Kobo).
    • Shutdown the Bluefly by long pressing the button. 
Step 2: Loading the firmware
  • Note that this will overwrite any hardware settings and they will be reset to defaults.
  • Open ds30StudioPro.
    • On the Project tab: Select the Input HEX file*.hex file for the model you are updating.
    • On the Communication tab: Set the port to the one which you know from step 1 communicates with the Bluefly, and the baud rate is set at 115200.
    • On the Bootloader tab: Make sure the Write Destination is just the main flash and not the boot flash.
  • Press the Write button
    • This will start the ds30StudioPro looking for the bootloader on the vario. If the Bluefly main application is still running then you will get an error - the Bluefly needs to be shut down before you press the Write button. 
    • Within a few seconds, press the button on the Bluefly to start it up. If everything works then the ds30bootloader on the Bluefly will communicate with the ds30StudioPro application, the firmware will start writing, and you will have new firmware in the vario in under a minute.
    • When the writing is finished the Bluefly should restart within about 10 seconds. 
    • You might get a communications error because there are some buffers that need flushing in the UART communication pipeline - if so, then shut down the vario and try again. 
    • For bricked varios: There is a special procedure for varios that are bricked (they are unresponsive to button presses to start up / shut down). For bricked varios you need to momentarily short MCLR and GND programming tabs to force a vario restart after pressing the Write button. 

Step3: Testing and Settings
  • Before you disconnect everything, open up the BFVDesktop application and connect to the Bluefly again.
  • Look at the firmware version by restarting the Bluefly and seeing the strings in the opening lines.
  • Test two way communications by sending some commands or adjusting some settings.
  • For IGC models, you might want to press the IGC button and Format the IGC memory. The default settings would have started to overwrite the IGC files at the first sector of the memory.