Sunday, 4 August 2019

GPS Logging on the Bluefly with the XA1110

This post is about using onboard logging capability of the XA1110 GPS on the Bluefly. It gets technical, and then I finish by suggesting for most pilots that you probably do not need it.

For many years the Bluefly varios have had the ability to stream a GPS signal to an app like xcsoar or XCTrack on Android (for the Bluetooth model), or to xcsoar on the Kobo (for the TTL_GPS model). Most pilots will use the logging capabilities of those apps to keep a record of their flights or to submit them for competition flying. However, the XA1110 has a small onboard memory and can record its own log. This post tells you how to use it if you feel like experimenting.

What models does this post relate to?

Any model of the bluefly which is connected to the XA1110 GPS. This includes:


The XA1110 GPS uses the MediaTek MT3333 chipset which has the 'Locus' function that the logging is based on. If you have another GPS using this chipset, or perhaps even some other MediaTek chipset, then you might find you can interact with its Locus memory in a similar way.

Why would you want to do this?

Upfront, I would say that in many cases you probably do not want to do mess with the logging capabilities of the XA1110. For most of our flying adventures keeping a GPS track log is nice to have but is not essential. If you keep your android or iphone battery charged then it is probably better to record a log on whatever app you are using.

However, if you want a backup to your backup, then switching on the Locus of your XA1110 might be for you. One day, if the competition director is pleasant, it might be your last resort to prove that you made goal. Although, it is important to note that the IGC that you might produce from GPS Babel is unsigned.

How the XA1110 Locus GPS Log works

The Locus log is pretty simple:
  • If the GPS has a fix, and logging is 'started', then logging will begin.
  • The logging interval can be changed from 1 second to 12 hours (in theory).
  • Each log point stores time, latitude, longitude, and GPS altitude (each point uses 16 bytes).
  • The memory size is 128k, which means it can store 8192 points. At 1s track intervals that is only 2.27 hours, but at 10s intervals it provides almost 24 hours of logging. I think that is reasonable for the kind of use case I am considering in this blog post (a backup to the backup).
  • Once the log reaches the end, the GPS just begins to overwrite points from the start of the log. 
The main drawback of the log is that it is painful to access. You need to send specific commands to the XA1110 to configure, start and restart logging (see the XA1110 Software User Guide for more information). I had hoped that if we start logging that it would continue it after the GPS had rebooted, but I found this only works if VBACKUP is connected and the GPS hot starts. The log needs to be manually started on each cold start.

Firmware update 

In order to simplify the commands, a few days ago I uploaded new firmware (BlueFlyVario_12.M25). This firmware includes one new hardware setting gpsLogInterval (code BGL).

Updating the firmware on the TTL_GPS model is a pain as you will need to remove your Bluefly from the Kobo, connect it to a USB_Serial converter, then updated it using the ds30loader application from a Windows PC. It is much easier for the Bluetooth_USB model. In either case, if you manage to update your firmware then it works like this:
  • If gpsLogInterval is set to 0, then it turns off the log. 
  • In all other cases, the Bluefly sends the following commands to the XA1110 on startup (or when gpsLogInterval is changed):
    • A test command (PMTK000)
    • The command to set the log interval (PMTK187,1,{BGL Value})
    • The command to start logging (PMTK185,0)
    • The command to query the locus (PMTK183)
  • This results in an output from the Bluefly like:
$PMTK001,0,3*30
$PMTK001,187,3*3E
$PMTK001,185,3*3C
$PMTKLOG,16,0,a,31,10,0,0,0,3837,48*20
$PMTK001,183,3*3A

You can decipher this using the XA1110 Software User Guide if you feel you must, but the bottom line is that it shows that logging is happening at 10s intervals. 

BFVDesktop application update

I have also updated the BFVDesktop application. Version 0.61 includes the gpsLogInterval hardware setting. In addition, there are a few PMTK commands in the Hardware Commands drop-down to query the locus (PMTK185,0), erase the log (PMTK184,1), and download the log  (Query Locus Data - PMTK622,0). To download a log use these steps:
  • Make sure you can see GPS sentences. You might need to set uart1BRG to 16 to make sure that data rate of U1 (which the XA1110 is connected to) is set to 115200.
  • Note your outputMode setting, then adjust it to 4 (to disable the bluefly output). You should still see GPS sentences. 
  • Send PMTK622,0 to begin downloading the log. You should see sentences like:
$PMTKLOX,0,1366*6B
1563683257,2019-07-202T04:27:37Z,2,-35.39281,149.20744,681
1563683258,2019-07-202T04:27:38Z,2,-35.392807,149.20744,681
$PMTKLOX,1,0,0100000A,1F000000,01000000,00001F0A,00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000001F,FFFFFFFF,FFFFFFFF,FFFFFFFF,000C8C14,B9E9335D,023D920D,C21B3515,43A9028F,BAE9335D,023C920D,C21B3515,43A9028D*5F
1563683259,2019-07-202T04:27:39Z,2,-35.39281,149.20744,681
1563683260,2019-07-202T04:27:40Z,2,-35.39281,149.20744,681
1563683261,2019-07-202T04:27:41Z,2,-35.39281,149.20744,681
1563683262,2019-07-202T04:27:42Z,2,-35.392803,149.20744,681
1563683263,2019-07-202T04:27:43Z,2,-35.392803,149.20746,681
1563683264,2019-07-202T04:27:44Z,2,-35.392803,149.20746,681
$PMTKLOX,1,1,BBE9335D,023D920D,C21B3515,43A9028D,BCE9335D,023D920D,C21B3515,43A9028A,BDE9335D,023D920D,C21B3515,43A9028B,BEE9335D,023B920D,C21B3515,43A9028E,BFE9335D,023B920D,C21C3515,43A90288,C0E9335D,023B920D,C21C3515,43A902F7*5B
1563683265,2019-07-202T04:27:45Z,2,-35.392807,149.20746,681
1563683266,2019-07-202T04:27:46Z,2,-35.39281,149.20746,681
1563683267,2019-07-202T04:27:47Z,2,-35.39281,149.20746,681
1563683277,2019-07-202T04:27:57Z,2,-35.39282,149.20746,681
  • Note the PMTKLOX sentences are from the XA1110 GPS in the funky 6 x 16 byte format. The other sentences are CSV separated interpretations from the BFV Desktop application.
  • It takes about 1 minute to download the log over a 115200 connection. 
  • You will find two files in your BFVDesktop folder. 
    • locus_record.csv is all valid track points that were decoded from the locus log. You might use this to view the points in excel
    • locus_record.mtk are the complete log PMTKLOX sentences. Use GPSBabel to convert that 'MediaTek Locus' file to any tracklog format you want (like FAI/IGC...). 
    • Note that the points are not ordered by date. You will probably need to do some manual editing to create a log that makes sense. 
    • Also note that the points are not split into flights. Again, some manual editing will be required to work out when your flight started and finished (remember, this is the backup to the backup...)
  • When you are done, set your outputMode back to whatever you started with. 
Notes for a Kobo

I have not tested this on a Kobo yet. However, if you have a TTL_GPS setup on a Kobo (with the updated firmware), and you want to get your locus record, then I would experiment with the following procedure:
  • Create a custom xci file to create some menu options send the appropriate commands to the Bluefly. 
  • Turn on NMEA logging to record the raw output from the Bluefly. 
  • Send the PMTK622,0 command to begin downloading the PMTKLOX. 
  • Copy the NMEA log, and edit it excel to copy all of the PMTKLOX sentences to a new file. 
  • Convert that file using GPS Babel. 
If updating the firmware is beyond you, then you might be able to create some other mechanism to send the appropriate commands to commence logging when xcsoar events occur. 

The bottom line

If you have read this far, then you probably have worked out that the XA1110 Locus thing with the Bluefly is probably to much hard work for not much benefit. I really just did this to prove to myself that I could. If you really want to do it then I suggest you experiment before relying on it as a backup. 

Saturday, 29 June 2019

BlueFlyVario_Bluetooth_USB_v12.2 released

The BlueFlyVario_Bluetooth_USB_v12.2 is a minor update to the previous version released a few years ago. The classic model of the Bluefly has a fancy new translucent blue case and is easier to assemble. Please read this post in conjunction with the release post for the BlueFlyVario_Bluetooth_USB_v12 to understand the changes.

Translucent Blue Case

The new translucent blue case is an upgrade on the sky blue case that has been used for the last few years. The new case includes the following improvements:

  • It incorporates stand-offs in the design, which makes the connection between the mainboard and the case more secure. 
  • Cutouts are very slightly larger. 
  • The lid is secured with different clips, which are much more secure than the older case. 


What is in the bag?

The v12 model of the BlueFly is supplied with the following components:
  • The BlueFlyVario_Bluetooth_USB_v12 mainboard. There is a small piece of neoprene covering the pressure sensor; glued at one end to hold it in place (do not remove it!)
  • The translucent blue case with four small screws (P1 screwdriver needed).
  • A 750 mAh singe cell Lithium Polymer battery.

Assembly

Assembly is pretty simple and will take most people less than 5 minutes. However, if you would prefer not to touch a screwdriver, or you want your vario configured to your custom settings, you can order the simple assembly service.

The simpler assembly method refines the steps outlined in the initial release:

Step 1 - Initial Test

Before you put the board in the case, plug in the battery, press the button, and make sure you can hear the vario beep. Also, plug in a microUSB charging cable and make sure the red LED comes on.

Step 2 - Screw the board into the case 

The small self tapping M2.5x5mm P1 screws secure the board into the case as shown below. You really only need two screws on a diagonal, but there is no harm if your use all four. Don't drive the screws home to tightly or you will strip the stand-offs in the case. Just use enough pressure to ensure that the board is secure. 

Step 3 - Ensure the button is aligned 

The button should be aligned with the center of the cutout hole. If it is off center and touching the edge of the hole then the case will interfere with the proper operation of the button. If you need to adjust it unscrew the screws by one turn or so, just enough so you can move the board around, then tighten them again. 


Step 4 - Battery and close

Plug in the battery. Place it in the case, making sure not to place it on the end of the screws. Then close the case. There is no longer any need to use tape to keep the case closed (the new lid clips are much more secure), nor any need to secure the battery (it fits snugly). 

Step 5 - Check charging works

Plug in a microUSB cable to charge the vario. The red light should come on. Cables with longer tongues work better.  

Step 6 - Velcro and/or lanyard (optional)

Many pilots will put a small piece of velcro on the back of the vario to attach it to their flight deck (this is what I do). Others will drill some small holes in the case and attach a lanyard (I do not do this anymore). 

Next Steps

After install you probably want to connect to the BFVDesktop application to adjust settings, or connect to and Android or iOS device to experiment with different apps. See the software page for more information. 

Bluefly_GPS_AddOn_v12 Released

I am pleased to be able to release the Bluefly_GPS_AddOn_v12 board today. Adding a GPS to the Bluefly has been possible for many years (see this post for an example http://blueflyvario.blogspot.com/2017/08/blueflyvariousbv12-released.html). This new board is designed especially for the Bluefly and uses the XA1110 module which offers a range of premium features.

Before reading on, why would you want to add a GPS to the Bluetooth model of the Bluefly? For many pilots the answer is you probably do not. If you are using the Bluefly in stand alone mode (just using it's audio), or if you are connecting to almost any Android or iOS device, then that device probably already has a GPS. However, there are a few Android devices that do not have GPS such as Android based eReaders that some pilots are now using with XCSoar. The Bluetooth model of the Bluefly with this new GPS board can provide the location input you need for XCSoar or other apps.

Features

The image below shows the layout of the board.


Features of the board are:

  • The XA1110 Mulit-GNSS module from Sierra Wireless
  • It's own 3.0v Voltage Regulator and conditioning components for optimal performance. 
  • The blue LED flashes once per second when the GPS has a fix. 
  • The main connectors are:
    • The U1 connections to the Bluefly for Ground, Tx, Rx and 3.3v input. 
    • RA7 enables the voltage regulator (you need the most recent version of the firmware for the Bluetooth model of the Bluefly for this to work). 
    • VBAT connects to the GPS VBACKUP for fast time-to-first-fix (about 5 seconds) and maintains other configuration settings on the GPS. You need to close the solder jumper for this to work. 
  • There are pads for a U.Fl connector for those that want to experiment with an external antenna. 

Assembly

Assembly is pretty easy if you have basic soldering skills. Before you begin read through all of these steps. If you are really uncomfortable doing this yourself then I am also able to offer an assembly service (but note that this makes the size of the package greater than can be shipped with free shipping).

Step 1 - Checking your Bluefly 

To complete your the assembly process your Bluefly will need to be removed from the case. Do this carefully by first removing the battery and any packing holding the vario in position. Next use a small flat screwdriver and gently twist between the end of the PCB and the end of the case with the USB hole. The aim is to release the end tabs of the USB connector from the hole, then press on the button to push the PCB free from the case. If you are gentle the PCB should come out easily, and you will not damage the button or the USB connector.

Next, plug the battery back in and connect to the BFVDesktop application on a windows PC. Send the 'BTN' command a few times just to make sure you have a good connection to the vario.  You need firmware version 12.423 or later for this to work.

Step 2 - Attaching the GPS_AddOn

Begin by soldering headers to U1, RA7 and VBAT as shown below (I will include a strip of 6 or more headers in the package with the AddOn board). Note that I have used right angled headers in this image, but you can also use straight headers. I strongly suggest that you trim the pin of the headers flush with the board before you solder it (not shown in this image). This will help prevent the LiPo battery from damage. Also note that the secret of all good soldering is lots of flux, a clean hot soldering iron with quality solder, and good cleaning with isopropyl alcohol after soldering.

Next, attach the AddOn board. Note that it sits flush on top of the bluetooth module shield, and slightly squishes the neoprene. Again, trim the headers before soldering. 

This final image shows the required pins soldered. Also, note that the VBAT solder jumper has been closed.

Step 3 - Configuration

At this point, before putting it in the case, it is a good idea to test to make sure it is working. Follow these steps:

  • Connect the vario to the BFVDesktop application and start it up. You should see the vario data streaming in. 
  • Adjust uart1BRG from the default of 207 to 16. That changes the U1 baud rate (the rate between the vario microcontroller and the GPS module) from 9600 to 115200. 
  • You should now see data from the GPS streaming in. Change the outputMode to 4 to disable the Bluefly sentences and you will be left with just the GPS information. 
  • Shut down and restart the Bluefly. After a few minutes, if the antenna is pointing to the sky, you should get your first fix (and the blue light on the under side of the GPS board will start to blink). 
  • Shut down and restart the Bluefly again. If you have VBAT connected correctly and the solder jumper has been closed then the time-to-first-fix should be no more than 5 to 10 seconds. 
  • Make sure to set the outputMode and outputFrequency back to whatever you want for connecting to your app.

Step 4 - Prepare the case

The Bluefly with GPS_AddOn fits in the Sky Blue or new Translucent Blue case provided you cut out a hole for the GPS.

Begin by downloading the pdf template to use to cut the hole in the right spot. The only really tricky part is to make sure you print the template at the right scale. The images below show the template and final cutout.



This final image shows the vario assembled into the older Sky Blue case.


Next Steps

Now you have a vario with working XA1110 you may want to experiment with the capabilities of that GPS module. There are many configuration options which you might find useful.

At some stage I will be blogging about configuring and using the onboard memory of the XA1110 GPS module. With a little effort the GPS can be made to continuously record the last 8186 track points (including height) in its 128k memory. This can provide a backup GPS track for the last 11 hours of GPS on time at 5 second intervals. It is not super awesome, and takes some effort to configure and download the memory, but as a backup track could make the difference for many pilots. 

Saturday, 8 June 2019

Firmware, Manual, and BFVDesktop updates

Over the last few days I have found a little time to update and rationalize the firmware for all Bluefly models, update the Hardware Settings Manual, and update the BFVDesktop app used for adjusting the settings. I do not find so much time these days to blog about little updates and improvements, but they are always happening in the background.

Firmware Updates

The latest firmware is 12.M23. I have only provided a few firmware updates since releasing each of the v12 models, and only then on a model by model basis. This firmware update consolidates bug fixes and adds a few new features.
  • There is a a new hardware setting quietStart. When set to true then the startup and shutdown beeps do not sound. 
  • The setting startDelayMS described in this post has now been included in all models. 
  • I have added an experimental outputMode (outputMode=7) to simulate the OpenVario protocol
  • A little bug with the temperature output in outputMode=6 has been fixed. 
  • RA7 for GPS reset on the Bluetooth model has been restored. 
  • Some default settings have been changed. 
  • The settings range has been expanded for many settings. 
Bluefly models shipping from mid June 2019 will include this latest firmware. 

I do not recommend updating the firmware unless you need a feature or really need to fix a bug. However, if you feel you want to then see the firmware page on the website and read the Hardware Settings Manual for instructions. After the firmware update don't forget to do the hardware reset procedure by shorting GND and SCL on startup. If you do not do that then you will find that your vario will not start. 

Hardware Settings Manual

The manual has also been updated to include this, and many other changes I did not get around to documenting. Find it here

BFVDesktop application

The BFVDesktop application is used to adjust settings. It has been updated to include the settings described above. Find it here

Wednesday, 12 December 2018

The Supair Delight 3

The Supair Delight 3 is a delightful harness - it really lives up to its name!

This post is loosely related to the Bluefly (in the video below you can see some Blueflys on the Delight 3 flight deck), but is more of a general review of paragliding gear and how it can complement each other.

During over 20 years of paragliding I have only ever purchased three harnesses for solo flying - the harness I got with my first wing, then about eight or ten years ago a Kortel Karmasutra II (I added a pod about six years ago), and now the Delight 3. In this post I hope to describe why I choose the Delight 3, and after flying it for a bit, what I think about it.

In a previous blog post I described flying my Nova Mentor 5. In that post you can read about what kind of pilot I am (classic weekend pilot, and more recently with the occasional comp), and what it is like flying around Canberra (technical, mix of mini xc and ridge soaring).

I purchased the Delight 3 from Mark at Cloudbase Paragliding. It is in his shop here. He was great to deal with and shipped it to me very quickly.

Why the Delight 3?

The decision to move away from my older Kortel Karmasutura II was motivated by its weight and bulk. It is a very comfortable harness in the air, but it is really too heavy to carry up a hill too many times. It is also pretty big, and only fits in my glider bag with a lot of squeezing during pack up. It is lovely in the air, but on launch I was annoyed that it got in the way of my helmet when looking up at the wing, and the pod knocked me in the back of the knees during take-off. I have been looking for the right harness to come along for a while.

There were a few features I was after in new harness - lightweight, pod, integrated flight deck, and good back protection. The Delight 3 had all of these. I trusted the excellent reviews by Flybubble and Ziad and decided to order one. Read those reviews as well as this to consider if this harness is for you.

First Impressions

I have the Delight 3 size M. When I first put my 180cm - 77 kg frame into it I thought I might be right near the top of the size - it was not too small, but it was a bit tight around the hips. However, I was doing the adjustments under a hang point on the ground, and the risers were not wide enough apart to simulate being under a wing. On the ground, I initially let most of the adjustments fully out.

Since then I have flown it a few times in very rough thermic conditions and very gentle smooth ridge soaring. Every flight I have adjusted everything a bit tighter and now feel that the size M is perfect for me. All of the adjustments have ended up at about the halfway point. Adjusting a harness to match your flying style can be a bit finicky, and this is especially the case for lightweight gear. Now I have tuned the adjustments, the Delight 3 is exceeding my expectations.

The video below shows the harness in the air during a very early morning ridge soar at Lake George. Please forgive my sloppy camera work and editing.



Comfort On The Ground

The harness fits nicely into the Nova glider bag with my wing, and I still have room for helmet and lots of other things. I have been really surprised the difference 4 kg makes. Sure, it is much better for hiking up a hill, but I also notice how different it is just putting the glider bag in the car and putting it away when I get home.

When strapping in ready for launch it feels much more comfortable than my old harness, although the attachment arrangements are very familiar. The integrated flight deck sits a little awkwardly prior to launch at first, but it really only took me one launch to get used to ground handling with it. Overall I can ground handle much easier, actually tilt my head to look at the wing, and the launch process feels a lot tighter.

Pleasant Flying

After launch I found it easy to get into the pod and into sitting position. I still need to adjust my pod straps a bit more to make them tighter, and this will help pull the flight deck closed a little more. The small seat board allows some weight shift control, and when I managed to work out the adjustments any tightness was gone. I like flying a little more upright than many pilots, and the semi rigid back supports that really well.

I like the extra feeling this harness provides compared to my old one. The Mentor 5 is a high end B wing, and the extra feedback through this harness allows me to squeeze a little more performance from a broken thermal. In the rougher conditions I was thrown about a little, but not too much and it actually gave me more confidence that I could fly the wing more actively.

The flight deck position is good, and as you can see in the video above is perfect for the Bluefly :)

Quality Features

This is a top quality harness with some great features.
  • Flight deck. The integrated flight deck is large enough for two main instruments, and one or two little ones. For comps I will end up flying with a Bluetooth model of the Bluefly that I will use for audio, an Android phone running xcosar, the Kobo Mini + TTL_GPS Bluefly, and a Spot. There is enough room behind the flight deck for a backup battery, radio, lunch, and other random things. I like the added extras such as the little loops and clips for attaching instruments, and the hole for a charging cable from the backup battery to the phone. 
  • Reserve. The reserve configuration appears smart and accessible. I am flying with a full size reserve, and was able to pack it so that it fits, but can still be test thrown without too much force. 
  • Pod. Nice things about the pod include the magnetic closure clips - they just seem to work. The way the speed bar is attached makes it easy to access - but is it still kept out of the way.
  • Internal pockets. The internal pockets on each side under the risers are really handy. One side has the tree attachment carabiner and cable (the one I used for the camera in my test flight), and the other is the same configuration internally but without the cable. I put my camera on a selfie stick in that side. 
  • Passive safety. I am familiar with the benefits of passive foam back and under seat protection. I am probably alive because of this kind of protection after a bad accident a few years ago. 
Overall Impressions

I am super happy with this purchase - it really is what I was after. The harness is a great match for my high end B wing, works well with my instruments, is comfortable on the ground and in the air, and has a bunch of features that I wanted. I am not sure that I could suggest any improvements to the Supair designers.





Friday, 7 December 2018

BlueFlyVario_TTL_GPS_v12 firmware update

Today I have released a firmware update for the BlueFlyVario_TTL_GPS_v12 (firmware version 12.219). This update changes the way data from the on board XA1110 GPS is cached by Bluefly processor and multiplexed with the normal Bluefly output. Updating the firmware on a Bluefly attached to a Kobo requires that it be removed, so this post also describes how you can use an xci file to adjust the GPS without having to update the firmware.

When the TTL_GPS_v12 model of the Bluefly was released the GPS module was upgraded. The new XA1110 GPS module communicates with the Bluefly processor over UART at 115200 baud. A few months ago some issues were found when using the Bluefly with LK8000 that we thought that were being caused by occasional errors in the communication. This knowledgeable article describes how to change the baud rate as a workaround.

However, additional testing discovered that in some circumstances (such as when tracking a lot of satellites), too much UART data was being sent from the XA1110 in a short time and the Bluefly could not keep up. This was causing errors in some re-transmitted GPS sentences, and some sentences were even being dropped. Location sentences are being transmitted successfully, which is why initial testing did not pick up the bug.

The firmware update described in this blog post allows the Bluefly processor to cache the GPS data in a more robust way. Many hours of testing suggests that all GPS sentences will now be transmitted without error.

Thanks to those Bluefly users who helped us workout the bug.

What models are affected?

The bug affects BlueFlyVario_TTL_GPS_v12 (with the XA1110 GPS/GLONASS module) shipped between initial release on 7 Jul 2018 to and 27 Nov 2018. Varios shipped from 28 Nov 2018 date have the updated firmware.

This firmware update does not apply to the Bluetooth_USB or USB models of the Bluefly.

If your vario is installed on a Kobo and you are running xcsoar you can see what version of the firmware you are running by starting (or restarting) the vario while you are looking at the Device monitor (Menu|Config|Devices|Monitor). See the image below which shows the firmware loaded on this device is version 12.218.


What should I do?

If you have firmware 12.2.18 there are a few options:

Option 1 - Do nothing. If you are happy with the performance of you vario, and it is installed on a Kobo on which you are running xcsoar, then you may wish to do nothing. This will be ok for some pilots, but if you are using your GPS tracks for competitions or want increased confidence in the performance of the GPS then I recommend option 2 or 3.

Option 2 - Change the baud rate. Changing the baud rate between the Bluefly processor and the onboad XA1110 is a workaround which provides a reliable fix. If your Bluefly is soldered to your Kobo, and you are running xcsoar, then this is probably the easiest thing to do. You can change the baud rate in two ways:
  • Use the baud rate update procedure described in the knowledgebase article.
  • Use the BlueFlyDebug_28Nov18.xci file to send the same commands to the Bluefly to change the baud rate, but without  having to disconnect it from the kobo. See Nev's extensive information on xci files here for more information on how they work. To to this:
    1. First download the xci file to your pc, then get it onto the Kobo in the xcsoardata directory. 
    2. Load this xci file to create the BlueFly menu using Menu|Config|System|Language,Input|Events
    3. Restart to apply changes. 
    4. Look at the monitor (Menu|Config|Devices|Monitor) to make sure the BlueFly is running by seeing the data is streaming in. The GPS sentences are the ones starting with $G
    5. Check that your new BlueFly menu is working and that you have two way communications with the Bluefly. (Menu|BlueFly|SimulateButton). You should hear a beep as if you were pressing the button on the Bluefly. If you don't hear anything from the Bluefly then there is probably a problem with physical connection and you will need to fix that before continuing. 
    6. Go into the GPS Adjustments menu (Menu|BlueFly|GPS Adjustments). 
    7. Press Menu|BlueFly|GPS Adjustments|GPS Command Mode. That sends the command PGCMD,380,7 which puts the XA1110 GPS into command mode. Note that xcsoar adds the appropriate checksum and end of line information to the command. 
    8. Press Menu|BlueFly|GPS Adjustments|XA1110 9600 Baud. That sends the command PGCMD,231,1 which adjusts the XA1110. 
    9. Fully shutdown and restart the Kobo. This ensures that the Bluefly, and its attached XA1110 GPS, are fully powered down and restarted. The baud rate changes to the GPS do not take effect until you have done this restart. 
    10. Have a look at the device monitor again. Now you should not see any GPS sentences. We have adjusted the data rate from the XA1110, but now we need to adjust the rate of UART 1 on the Bluefly process so it picks up those sentences. If you do actually see GPS sentences before you have adjusted U1 then you might not have successfully done step 6, 7 and 8. 
    11. Change the Bluefly U1 baud rate by pressing Menu|BlueFly|GPS Adjustments|U1 Baud 9600. 
    12. Look at the monitor for the last time and you should now see GPS sentences again. The GPS Tx baud rate is 9600, the Bluefly U1 Rx baud rate is 9600, and if you have the defaults the Bluefly U2 Tx baud rate is 115200, which allows it to keep up with the GPS information. 
    13. Note that I have also included buttons for adjusting U1 back to 115200, and also for adjusting the XA1110 baud back to 115200.
Once you have done that, you are still running the older firmware, but the U1 baud rate means that the Bluefly processor with that older firmware can keep up with the GPS data sending rate without errors. 

Option 3 - Actually update the firmware. To update the firmware you will need a USB serial adapter, the Bluefly must be removed from the Kobo, and you will need the ds30 loader from the firmware page. Removing a Bluefly from a Kobo can be tricky, and if you are not very practiced with good soldering techniques then it is likely you will damage the Bluefly, the Kobo, or both.

The firmware update procedure is the same as for the v11 as described here: http://blueflyvario.blogspot.com/2016/08/firmware-update-for-v11-models.html.
Alternately, you can ship the TTL_GPS back to me and I will update the firmware for you. If you want to do that please contact me and I will send you the address and instructions.

Saturday, 7 July 2018

BlueFlyVario_TTL_GPS_v12 released

In April 2016 the v11 model of the BlueFly TTL_GPS was released. That model is now in use by many thousands of pilots around the world. Most pilots install the TTL_GPS model in a Kobo and run xcsoar. Today I am pleased to release a major update, the BlueFlyVario_TTL_GPS_v12.

Why a new model?

This update was driven by the reduced availability of the PA6H GPS used on the v11 (and all earlier BlueFly TTL_GPS models). Just over a year ago Sierra Wireless purchased GlobalTop, the manufacturer of the PA6H. For some time the PA6H module was available, but over the last few months all of my suppliers have run out of stock; I had to choose a new GPS.

I have selected the SierraWireless XA1110. From their website:

'AirPrime® XA1110 Multi-GNSS Module with Patch Antenna

Compact, high-precision, ultrafast TTFF Multi-GNSS positioning with integrated antenna. The XA1110 supports tracking of GPS+Glonass or GPS+Glonass+Galileo satellite system combinations to deliver superior positioning accuracy of <2.5m (with SBAS). Based on MediaTek's latest MT3333 engine, it’s the smallest integrated antenna multi-GNSS module on the market with an ultra-compact form factor of 12.5 x 12.5 x 6.8 mm.'


In practice, I feel that there is a significant performance improvement over the PA6H, and some better features:
  • GPS + Glonass means quicker fixes and better tracking in many parts of the world. 
  • The smaller size fits better on the board, and allows for a better ground plane layout on the PCB. However, note that the patch antenna is about 1.5mm higher than the PA6H. 
  • For advanced users, there is good documentation on the Sierra Wireless website on sending commands to GPS module to customize its performance (in our case via the BlueFly). 
  • The XA1110 default baud rate is 115200 (this has resulted in some changes outlined below). 
What is in the bag?

The v12 is supplied with the same parts as the v11:
  • The main module. The PCB size is 50mm x 17 mm which is the same as the v11. The speaker, GPS, button and header locations are in the same spot as the v11. 
  • A small piece of neoprene. This is really important. It must be placed over the pressure sensor if the sensor is exposed to any light (even light through a translucent case). The neoprene allows the air pressure through, but stops the light. Light makes the pressure sensor go crazy. It is really important to place it on the pressure sensor with the black foam side down - do not stick it to the pressure sensor - you will block the hole and it will not work!
  • Some blue PVC heat shrink cut to size. 
    • Put the neoprene on the pressure sensor, and the heatshrink evenly over the module.
    • Use a heat gun, or a hairdryer on hot setting to carefully shrink the plastic around the module.

Hardware changes

There have been a few hardware changes from the v11.
  • Much of the layout is identical, but the components around the GPS have been moved around for better positioning. 
  • The behavior of the blue LED which provides a GPS indication is now different. It is not lit to start with, and then flashes at one pulse per second when the GPS get a fix.
  • There are a few pads on the back side of the board for users who want to experiment, but I recommend leaving them alone as unless you really know what you are doing:
    • SJ1 is still used to bypass the button function for turning on the module as soon as power is supplied to Vin. I still do not recommend closing this for most installs. If you are considering using it then also consider using the new startDelayMS hardware setting. 
    • There are pads to connect a super small backup battery to the GPS VBACKUP. I feel that this is not needed for most installs, and it actually causes more problems than it solves. The pads are designed for a XH414H-IV01E battery which is currently widely available from ebay and aliexpress.  
    • There are pads for an external antenna header for the XA1110. Before you consider using this you should read the XA1110 documentation in detail so you know what kind of antenna to use. The pads are designed for a U.FL-R-SMT IPEX connector. I have not yet experimented with it very much. 


Firmware Changes

New features of the v12 firmware include:
  • There is a new hardware setting called startDelayMS
    • This adds a startup delay before data is sent to the Kobo. Some models of Kobo do not react well if data is received during the Kobo boot process. If you have closed SJ1, then you might need to adjust this setting to achieve a stable startup. 
    • You can adjust the duration of the delay by sending the command $BDM DELAY*, where DELAY is the delay in milliseconds.
    • If startDelayMS is set to anything other than zero then you will hear two very short high pitched beeps as soon as the vario is started, then the delay happens, then the normal vario start up procedure kicks in and data starts flowing from the BlueFly.  
    • The default setting is 0. 
  • Some default values for hardware settings have changed:
    • uart2BRG (BR2) = 16. The default baud rate between the BlueFly and the Kobo is now 115200, which is now the same for all of the Kobo models. 
    • uart1BRG (BRG) = 16. This sets the baud rate between the BlueFly processor and the onboad GPS to 115200. 
    • heightSeconds (BHT) = 3600. This changes the default auto power off from 600 seconds (10 minutes) to 3600 seconds (1 hour).
    • toggleThreshold (BTT) = 2000. This changes the auto toggle back on feature to react to 20 m/s lift or sink, instead of 1 m/s lift of sink. Most pilots prefer to just use the button to turn the sound on and off. 
  • The maximum value for all hardware settings is now 65534 (0xFFFE), although I am yet to update the BFV Desktop app. 
  • Some pitot related code has been updated for those advanced tinkerers who are experimenting with an airspeed sensor. 
Installation

See this previous post for an example of how to install the vario on the Kobo Glo HD. There are many links on that post that describe a few different ways to install the vario.

Also, see Nev's page for many examples of which serial port to use on different models, and for a great explanation of how to create a custom xci file.

I still feel the simple install is best. The image below shows a simple installation on the Kobo Glo HD. I normally just attach the vario to the bevel which is closest to the internal serial port. I use double sided tape to hold it in place, then encase the wires and secure around the edges with hotmelt glue. In this install the xcsoar settings have been changed to landscape orientation.

Some tips which are applicable to all installs:

  • Use the neoprene, but do not use the sticky side which would block the holes in the pressure sensor.
  • Make sure you connect the BlueFly-Tx to the Kobo-Rx, and the Kobo-Tx to the BlueFly-Rx. 
  • Set the baud rate in xcsoar to 115200. 
  • Read an earlier blog post about using xci files. That is currently the easiest way to send commands to the vario (you also need to read the hardware settings manual on the support page of the website).
  • Check your wires to ensure the solder quality is good, and that the wires are not routed next to other components on the Kobo circuit board which might pick up stray power. I like to keep the wire length less than 5cm.
  • If you get 'Waiting for GPS fix' shown in xcsoar, and after 10 minutes of the vario being on, outside, and with the antenna having a clear view of the sky, the do the following debugging:
    • Check in the Devices Monitor for incoming data from the vario.
    • Record a NMEA log and look for messages from the GPS to assess what is going on with the satellites.