Saturday, 20 February 2016

iOS support

When the BlueFly_Bluetooth_v11 was released a few months ago I promised iOS support. A busy few months have stopped me from sharing how to get the latest BlueFly working with your iPhone. Rene released version 5.0 of Flyhysky a few weeks ago which means that the most popular iOS paragliding app is now compatible with the BlueFly. Last weekend Dave (one of our local pilots) visited and we were able to do some testing and grab a few screenshots. In this post I will try to help iOS/BlueFly users.

First, a little disclaimer. I do not own any iOS devices and have never written a line of objective C for iOS apps. I know how to get Bluetooth 4.0 working on the BlueFly side, which is what the v11 BlueFly provides via the RN4677 dual mode Bluetooth module. However, we rely on others for the iOS side. I have done pretty extensive user type testing with Flyskyhy with Dave's iPhone 6.

iOS Apps

To follow this tutorial you will need two apps:
  • WFE BLE Chat is a free utility to communicate with Bluetooth LE devices. It is configured to work with the GATT profile supported by the RN4677. This allows us to see the raw text stream coming from the BlueFly, and also allows us to send text commands. 
  • Flyskyhy is a fully featured flight instrument app. A full description of its features can be found at flyskyhy.com

Initial Testing

To begin you might want to look at the stream of data coming from the BlueFly. You can skip this step and go straight to Flyskyhy if you want. 

Start the BlueFly. From the time it is started the BlueFly's bluetooth module is on for 180 seconds (by default). After that time, if no connection is established, it shuts down the bluetooth module until the BlueFly is restarted. So the connections described below need to be established within 180 seconds of the BlueFly being turned on. 

Open WFE BLE Chat and look for Peripherals Nearby. Select the device "BlueFly-XXXX" (where XXXX are the last four hexits of the mac address). You will then see a stream of data flowing from the device. 

At this point you do not need to do anything other than note that the raw data is streaming in. It should look like PRS XXXXX where XXXXX is the raw pressure in hexidecimal pascals. This is the default outputMode (0) of the device. Flyskyhy changes it.

Flyskyhy

Open the app and go to the apps settings menu. You need to swipe up near the bottom of the screen to bring up the settings. Select Vario|Model|BlueFlyVario then select the device. 

You will only need to do that the first time you connect. The volume slider now controls the volume on your BlueFly. In the app the Vario Status Element, the Lift Element and some of the Graph Elements are now informed by the data coming from the BlueFly. 

Advanced Settings

By using the WFE BLE Chat app you can adjust all of the advanced settings of the BlueFly. You should read the hardware settings manual to understand the serial protocol. When you open the WFE BLE Chat app after using Flyskyhy you can see that FlySkyHy changes the outputMode to 5 which makes the BlueFly send its Custom BFV Sentence. 


If you send the command $RSX* it reset the BlueFly to default settings (Flyskyhy will set it back). You might like to experiment with useAudioBuzzer ($BBZ 1* to turn it on, $BBZ 0* to turn it off) and the sinkThreholds (make sure you adjust both sinkThreshold and sinkOffThreshold). Please let me know what settings you would really like to see in FlySkyHy and we can ask Rene to add them. 

When I was messing around I noticed that it would be nice for the BlueFly to still make its on and off sounds even with its volume turned down in Flyskyhy. That is on my list of todo's for the next BlueFly firmware update (iOS users will need to find a pc...)

No comments:

Post a Comment