Saturday, 27 August 2016

Firmware update for v11 models

Last weekend I was able to release a new firmware for the v11 models of the BlueFly. The v11 models have a different processor (the PIC24F32KA302 instead of the PIC24F32KA301) which uses different pins for most of the hardware functions. As a consequence there is a slightly different bootloader on the vario, although you do use the same ds30loader program on the PC side.

Firmware updates for BlueFlyVario started with v10, and you can still download the latest firmware for the v10 models from the firmware page of the website. For the v10 models you should follow the instructions in this previous blog post.

Do I need to update the firmware?

If you are happy with the performance of the BlueFly, and you do not need any of the features of the new firmware, then I strongly urge you to leave it alone. Although it only takes me a minute or two, many pilots find it tricky. If you are going to do it then the first step is to check what firmware you currently have.

The firmware for the initial release of the Bluetooth, TTL_GPS and USB models was 11.M09, 11.M10, and 11.M11 respectively. Although I only released the 11.M12 firmware last weekend, I have actually been shipping it with new varios for some weeks. You can see what version of the firmware your device has by using the BFVDesktop app and connecting to your device. That will be tricky if your TTL_GPS model is soldered to the Kobo. For that model try starting up the vario while you are looking at the monitor in xcsoar and read the message from the BlueFly. The first line includes the firmware version.

Key changes in 11.M12

The primary reason for releasing a new verison of the firmware is to support some changes for the Bluetooth model, although there are some other changes as well. In summary the changes are:
  • A new command designed which enables you to change settings on the RN4677 blueotooth model. Read the hardware settings manual to understand how to send a command. The command is:
    • $RNC ABC*, where ABC is the command to send to the RN4677. 
    • When you send that command to the BlueFly it sends back some serial signals to the RN4677 in the following manner:
      • Turns on the BlueFly green LED.
      • Sends $$$ to the RN4677, which puts it into command mode. This stops the BlueFly sending data. 
      • Waits 1000 ms.
      • Sends ABC to the RN4677 followed by the \n character. In most cases ABC is an individual RN4677 command you choose from it's user guide to adjust a setting on the module 
      • Waits 500 ms. 
      • Sends R,1\n to the RN4677 to restart the RN4677 and store the setting.  
      • Waits 500 ms. 
      • Turns of the BlueFly green LED. 
      • Restarts the BlueFly. 
    • It is really possible to screw up the RN4677 by doing this if you are not sure what you are doing. I will be posting some examples in a separate blog post. 
  • The new firmware maintains the volume of start and shutdown beep, regardless of the volume settings.
  • The RSX command now also sends $PMTK104*37 to U1. On the TTL_GPS model that forces the GPS to ditch its ephemeris data (satellite data) and restart. This can be used to recover a GPS which may be stuck in some kind of bad data loop. 
Bootloader changes

There are minor changes to the bootloader procedure for the v11 models. The procedures described in this previous blog post for the v10 still apply, but with the following changes:
  • Step 1 - Get the software: No change, the same ds30loader software is used. 
  • Step 2 - Prepare the hardware: On the v11 you now short the pins below (GND and SDA) to enter the bootloader mode. The names of these pins are shown on the bottom of the board. 


  • Step 3 - Open the ds30laoder application: Use the following different settings for v11, all of the others are the same as v10
    • Model: 32KA302
    • Baud: 115200
  • Step 4 - Start up the Bluefly in bootloader mode: No change; other than the different pins as shown above in step 2. 
  • Step 5 - Program the device: No change
Hardware Settings Reset

After updating the firmware I recommend that you execute a full hardware settings reset. On the v11 models you do that by shorting GND and SCL then starting the vario while the short is in place. Once you hear the high pitched fast beeps you can release the short and all of the settings will be back to the defaults.

TTL_GPS model addendum for the Kobo

Tyson let me know he has been working on updating the firmware on the BlueFlyVario_TTL_GPS with it still connected to the Kobo. In his words:

"Thought you might be interested in this small program I wrote. Converts the hex files into a shell script that can be directly run on the kobo to do the flash upgrade.

https://github.com/twhitehead/blueflyvario-hex2sh

Just finished using it to upgrade to the latest firmware for my BlueFlyVario_TTL_GPS_v10 model. Seemed to go good."

I am still waiting to find time to try it out. Let me know how much success you have.


No comments:

Post a Comment