Saturday 27 May 2023

BlueFlyVario v23 models released

Today we announce the release of two new Bluefly v23 models. These have actually been shipping for a few weeks now. The BlueFlyVario_Bluetooth_v23 is the latest version of the classic Bluefly. The BlueFlyVario_Bluetooth_GPS_IGC_v23 includes an onboard GPS and IGC tracklog recording. 

The new Bluefly v23 models look the same.

What is new?

These models are an evolution of the v22 models. The main processor is the same and the firmware is almost exactly the same as the v22. Firmware updates will continue to be made for both v22 and v23. 

The main changes are:

  • USB-C charging and serial port interface. The shift from micro-USB to USB-C reflects the standard most devices are adopting, and the physical port is more robust. 
  • The GPS version now uses the L96 GPS module instead of the XA1110. The latter is no longer available and the L96 has better performance, in my experience. 
    • The good news is that the GPS is now entirely inside the case - no more protruding antenna.
    • The downside to this GPS module is that the chip antenna is very sensitive to placement of other components. This was overcome in the v23 model by putting the GPS module on a small board and raising it just a few mm further away from the battery. The end result is a much cleaner layout, albeit that the manufacturing time per device is a bit longer. 
BlueFlyVario_Bleutooth_GPS_IGC_v23 internals, showing GPS module antenna slightly above the base board.
What is in the box?

Both models are shipped fully assembled and ready to use. Simply remove the tape and cover protecting the clear button, press the button and your vario should come to life. Some tips:

Monday 6 February 2023

Firmware Update x68

The latest firmware for all v22 models has been uploaded

Changes include:

  • Fixed a bug with button performance. The button was not as responsive to a press as it should be during lift or sink. 
  • Fixed a bug for GPS models that very occasionally interleaved the PRS and B Record sentence, which might have caused issues for XCTrack users who configured to use external GPS. 

Follow the firmware update procedures described in this earlier blog post

Saturday 8 October 2022

More firmware updates x66

The latest firmware for all v22 models has been uploaded

Changes include:

  • Fixed a significant bug with IGC file recording which was inadvertently introduced in x63 firmware for the models which include IGC memory. If you update to this new x66 firmware make sure to clear your IGC memory by formatting it through the BFVDesktop application.
  • The $XCTOD,Battery%,TempDegC* sentence was added some time ago to improve integration with XCTrack, but I think this is the first time I have documented it. 
    • The sentence is sent from the BlueFly once every ten seconds. 
    • This allows you to add widges in XCTrack for Bluefly battery percent and Bluefly Temperature in Degrees C (as measured by the pressure sensor).
    • See here for how to use this.
  • Minor bug fixes with output text processing. 
  • Little tweaks to improve shutdown performance. 

Follow the firmware update procedures described in this earlier blog post

Saturday 20 August 2022

Kobo Nia Install

This post outlines how to install the BlueFlyVario_USB_TTL_GPS_IGC_v22 on the Kobo Nia. This combination of the best TTL_GPS Bluefly and the cheapest current model Kobo will give you a fully featured xcsoar based flight instrument. 

Make sure you read to the end of the post before you begin. The Nia makes a good flight instrument, but there are some limitations.

There are many other models of Kobo and many ways to install a Bluefly. See BlueFlyVario_TTL_GPS_v11 Assembly with the Kobo Glo for an example and links to many other blog posts for other models. Also, see Nev’s page for much more information:


Order your Bluefly from the shop. This assembly shows the USB_TTL_GPS_IGC model, but you could also use the cheaper TTL_GPS model. The main advantage of the more expensive model is onboard IGC recording and easier Bluefly firmware upgrades. 

Get a Kobo Nia from your local retailer or the internet. 

Download a few things:

  • xcsoar. The latest releases are not compatible with the Nia and at the time of writing this post you need to use a 6.8 version. I used 6.8.17
  • The 3d printable files for the new v22 TTL_GPS case, lid and button. 
    • This is optional, but does make the install a bit neater. 
    • I printed these items in PLA on an old 3d printer and there was a little clean up with a knife required to make them fit, especially around the button. 
  • Get this Bluefly.xci file for the xcsoar menu
Make sure you have the latest firmware update for the Bluefly. See here

Prepare the Nia

Before anything, make sure you Nia is working normally as an ebook. Create a Kobo account, do the suggested firmware updates, then shut it down.

Take the back cover off the Nia. You should be able to pry it loose around the edge. It will look like this:

Backup the sdcard by creating a full disk image with of it with win32diskimager. See step 3 here.

Install xcsoar: replace the sdcard, start the kobo, connect a USB cable, in the kobo app press connect to show the drive on your computer, then copy KoboRoot.tgz as described in the Kobo xcsoar installation instructions

Install the Bluefly 

I like to remove the couple of screws near the edge of the boar and pry up the PCB to keep it clear of the underlying metal when soldering. 

Wires are soldered onto the TTL port. In this example I have used solid core 30AWG winding wire. Use a hot soldering iron but work quickly so you don't damage the PCB. Check carefully for jumped solder tracks. Note the small 3mm hole drilled through the bezel of the kobo that all of the wires go through. I could have made this smaller. 

Solder each of the wires to the Bluefly. Make sure that the connections are:
  • Kobo GND - Bluefly GND
  • Kobo RX - Bluefly Tx
  • Kobo TX - Bluefly Rx
  • Kobo V - Bluefly V
Put the neoprene on the pressure sensor of the Bluefly (black squishy side on the sensor - do not remove the sticky part or you will block the holes). Use the heatshrink to hold it in place (shrink with a hairdryer or hot air gun). 

The case is placed so it hangs over the edge of the kobo bezel (so the GPS antenna works). In this install I used quality black double sided tape to secure the case to the bezel. The final result is shown below. 

Configure XCSoar

In the devices menu of xcsoar  (Menu|Config|Devices) edit device A with the following settings:
  • Port: ttymxc0
  • Baud rate: 115200
  • Driver: Bluefly
Click Monitor to see the data flowing in from the Bluefly. It will take a few minutes of the vario sitting outside with a clear view of the sky and no interference to get a GPS fix. 

Quit xcsoar and at the boot menu press Nickel to boot to the Kobo erReader mode. Connect your the kobo to a computer and upload the Bluefly.xci file you downloaded earlier to the xcsoar directory. Disconnect the cable and reboot back to xcsoar. 

Back in xcsoar add the xci file to create the Bluefly menu (Menu|Config|System|Look|Language,Input|Events) (you will need to be using Expert mode). You will need to quit and restart xcsoar for it to take effect. 
  • The xci file adds a bunch of menu options which send commands and settings to the Bluefly. 
  • It also adds a special gce event which restarts the Bluefly when the xcsoar detects a landing. This forces the IGC file on the Bluefly to be saved. 
Now, Menu|Bluefly|Simulate Button to check it is working. This is the same as short pressing on the button of the Bluefly to toggle the sound on and off. 

Next, Menu|Bluefly|Bluefly Config then set outputMode to LX at 5Hz. 

Finally, Menu|Bluefly|Devices|Edit and change the driver to LXNAV. 

The reason for the last two steps is to send $LXWP0 messages from the Bluefly for alt and vario information (instead of the default Bluefly PRS output mode). It reduces the loads on the processor (I think). Also these sentences have a checksum so if the there is a transmission error you will not get funky altitude/vario information. 

Limitations of the Nia

I really like the screen on the Nia. If you do the installation as described in this post then it will work for you, but there are some technical limitations that you should be aware of if you decide to do things a little differently:
  • There is not a specific version of xcsoar that has been built for the Nia. xcsoar kobo versions try to work out what model of kobo it is running on during startup then selects particular linux drivers and a bunch of other kobo linux things. The 6.8 versions work, and I expect that a future 7.x version will work, but at the moment suggested fixes have not been included in a release. 
  • The underlying kobo linux operating system uses the ttl serial port we connect the Bluefly to during the device boot process. If it reads characters from the Bluefly at a critical point in the first few seconds then the boot will hang (this is why there is is nothing sent from the Bluefly until after startDelayMS). Additionally, there are around 2500 characters sent from the kobo to the Bluefly in the first 10 seconds. The most recent firmware on the Bluefly addresses both of these issues. 
  • The kobo linux serial processing driver only has so much capacity and it is possible that from time to time there will be buffer overflows on the kobo side. Practically, this results in characters not being received by xcsoar. By using sentences with a checksum bad sentences are just ignored and we can recover gracefully. 
Further Steps

While the Kobo is on, connect the Bluefly to the BFVDesktop application via USB-C cable. You should be able to see the data and configure many more settings on the Bluefly than are able to be set up from the xci file. The default startDelayMS is 2000, but for most users I recommend increasing this to 10000 to more fully avoid the start up process. You can also download igc files from the Bluefly using the BFVDesktop application or GPSDump. 

In addition, you should be able to download xcsoar's igc files from the Kobo eReader application when the kobo is connected to a computer.

There is a lot more information on configuring XCSoar on the web, and Nev's page has great tips

Friday 12 August 2022

v22 TTL_GPS firmware updates

This is just a quick post to announce new firmware has been release for the v22 TTL_GPS models:

The update involves a pretty comprehensive rewrite of the serial data processing code to improve performance and remove some bugs. This was needed to ensure compatibility with the Kobo Nia and restore some functions on other Kobo models. The updates include:
  • The Bluefly was overwhelmed with data from the Kobo during startup, which switched off further command processing capacity. This has been fixed and the Bluefly should be responsive. 
  • The Kobo startup code on some models was interfered with by the Bluefly. The startup procedure no sends not data from the Bluefly at all until after the startDelayMS time (default of 2 seconds after power on). 
  • Other minor bug fixes including LX mode output, outputFrequency restoration and shutdown reliability.   
See here for firmware update procedures. 

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:

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. 

Sunday 29 May 2022

BlueFlyVario_USB_TTL_GPS_IGC_v22 and BlueFlyVario_TTL_GPS_v22 released

The TTL_GPS model of the Bluefly is designed to add a vario and GPS to a Kobo running xcsoar by soldering it to an internal UART serial port. For technically savvy pilots this has been a popular way to build a powerful and reliable flight instrument. The previous TTL_GPS model was released in late 2021, but the chip crisis has meant that the main processor is no longer available. The new v22 TTL_GPS models use the same PIC32MM processor as the earlier v22 bluetooth models and share most of the same codebase. 

Today I release two v22 TTL_GPS models: a base model BlueFlyVario_TTL_GPS_v22 to replace the v12.2 version released last year, and a new enhanced model BlueFlyVario_USB_TTL_GPS_IGC_v22 which adds a USB interface and onboard IGC memory recording. 

Base Model BlueFlyVario_TTL_GPS_v22 Hardware Design

Most people installing the Bluefly on a Kobo will want this base model. It is cheaper and offers the same functionality as earlier versions. 

The base model TTL_GPS_v22 is functionally very similar to the last v12.2 model. It has the same L96 GPS, shares the same form factor, and primary TTL_GPS pinouts. Most users will connect it to the Kobo via the UART 1 TTL port. Other noteworthy elements of the hardware design are:

  • It uses the new PIC32MM microcontroller as the other v22 models. 
  • There is a new all metal button that is more robust, but still needs to be used carefully. Most users will not use the button as the vario powers on as soon as the TTL port has power from the Kobo. 
  • On the back the RST and GND pads can be shorted while the vario is powered on to reset all settings to default. Make sure to deliberately power it off using the button to save the new settings. 
  • There are a few ways to use V_Backup if you really think you need it, but I do not recommend connecting it or closing the solder jumper unless you have read the L96 datasheet and know what you are doing. 
  • The programming pads are also connected to UART 2, which caries the serial communication from the microcontroller to the GPS. 
  • The UART 3 pads on the back provide another TTL input/output like UART1. If I release firmware updates you will need to interface with these to update the firmware.
  • There are quite a few components not populated as the USB_TTL_GPS_IGC uses the same board.  

Enhanced Model BlueFlyVario_USB_TTL_GPS_IGC_v22 Hardware Design

There are a few reasons why you might want the enhanced model:

  • The addition of onboard IGC recording means that you can record a signed IGC file while the vario is connected to your Kobo. You might use this for a backup, or even as your primary file. This is able to be downloaded via the USB port using the BFVDesktop application or GPSDump. Read earlier blog posts about the Bluetooth models to understand how IGC recording works on the Bluefly.
  • Some pilots might want to connect the Bluefly via the USB port to a windows or android device running xcsoar or xctrack. You can close the USB PWR header to enable the vario to be powered from the USB port. 
    • However, warning: If you close this header and power the Bluefly from the USB-C interface while the Bluefly is connected to the Kobo, but the Kobo is powered down, then you will fry either the Kobo or the Bluefly. I recommend only closing this header if you do not intend to connect the Bluefly to a Kobo. 
    • It is ok to have your Bluefly connected to and powered from the Kobo via UART 1, and then plug in a USB cable to the USB-C interface on the Bluefly (but with USB PWR not closed) This will allow you to transfer data from the Bluefly via the USB-C interface (adjusting the settings, downloading IGC files, updating firmware). 
  • Some pilots might want to use this model connected via a USB cable to an external battery to use as a stand alone vario without a display. You could solder a switch across USB_PWR. 

Like the base model, most users will connect it to a Kobo via the UART 1 TTL port. Other noteworthy elements of the hardware design are:

  • The USB-C interface connected to UART 3 mirrors UART 1. 
  • The USB power connection to V-Backup is only for advanced users that know how the L96 V_Backup works. 

Firmware changes

The firmware builds on the earlier v22 models. It is functionally very similar to earlier versions. 

What is in the bag

The bag for both models contains only vario module, a small piece of neoprene, and some heatshrink to hold the neoprene in place. 

You will need to add your own wires and enclosure (if you want one).


See the assembly instructions for the previous version