Sunday, 14 August 2016

New BlueFly USB models released

I am pleased to release two new USB models of the BlueFly today. These models complement the Bluetooth and TTL_GPS models by providing devices which can connect via USB. Both are available for purchase on the new website http://blueflyvario.com/shop. This post is pretty long as there are many different ways you can use these two new varios.

Which BlueFly vario do you want? Choose between:
  • The Bluetooth model to connect to Android or iOS for use with flight apps.
  • The TTL_GPS model to solder to a Kobo or other device with a TTL Serial port.
  • The USB model as a stand alone audio vario; or for connection to USB ports on many devices.
  • The USB_GPS model for a wired connection to a Kobo or other device with a USB port, but without an inbuilt GPS.
BlueFlyVario_USB_v11

The new USB model is designed for use as a stand alone audio vario. In many ways it is similar to the BlueFlyVario_USB_v10. However, it now shares the more powerful battery and enclosed sky blue case as the Bluetooth model. In some ways it is a cheaper version of the Bluetooth model with a FTDI FT230X USB to serial chip instead of the more expensive Bluetooth module.


The package includes the items shown above:
  • BlueFlyVario_USB_v11 main board programmed with the latest firmware, and with a small piece of neoprene protecting the sensor.
  • 600 mAh Lithium Polymer battery.
  • 4 x 5mm nylon M3 hex standoffs and 4 x 6mm M3 nylon screws.
  • The skyblue BlueFly case.
To assemble the vario use the same procedure as the BlueFlyVario_Bluetooth_v11. The battery on the USB model should last much longer than 10 hours. The actual duration will depend on your audio settings. Charge it with a phone charger with a micro USB connection, or by connecting it to a USB port. 

For advanced users the BlueFlyVario_USB_v11 is the most hackable model yet:
  • It is compatible with the same shields as the Bluetooth_v11 model. 
  • The button and speaker both have headers underneath them if you want to remove either and wire in other components. 
  • On the PCB U2 is connected to the FT230X chip (which is then connected to the USB port), but there are exposed headers if you want to plug U2 directly into a TTL connection. 
  • You can close SJ1 if you want to power the vario directly from the USB power instead of the battery. Do not close this jumper if the battery is still connected or it will get uncontrolled voltage to the battery and it may be damaged.
  • U1 is exposed for shields or to connect to another UART device which sends NMEA strings. There is space on the USB model for a PA6H GPS, which brings us to the next model.  
  • You can close SJ2 if you want to connect VBackup of the GPS to the battery power (for the model shown below).



BlueFlyVario_USB_GPS_v11

The USB_GPS model is exactly the same circuit board as the USB model, however it has a PA6H GPS soldered in place. If you are just going to use the vario as a stand alone audio vario then the GPS adds no value. However, if you want to make a wired USB connection to an Android or Windows device which does not already have a GPS, or you want to connect to the USB port of some models of the Kobo, then this might be the vario for you. 


Note that I have not tested the USB_GPS model with a wide variety of devices. If you are considering using this vario please make sure that your device has an operating system which can access the serial output from FTDI based chips, and that xcsoar or whatever app you are going to use can find that serial output in the operating system. 

Connecting to PC

If you have either of the USB models you will probably want to connect it to a PC to adjust some hardware settings. When you connect it with a standard USB cable your PC should install the appropriate FTDI drivers in Windows 7 and 10. Use the BFVDesktop application (available in the software section of the support page) to connect to the installed serial port. 

Connecting to Android

To connect to Android you will need a USB-OTG cable and Android 4.0 or later. See the image below for an example of the connection required. You will probably use a procedure similar to that described in this blog post. You might also want to use the FTDI UART Terminal app to test the connection or send Hardware Settings as described in Annex A of the manual. That app is shown in the image below; make sure to set the baud rate at 57600. 


Connecting to Kobo with xcsoar

Establishing a connection to the Kobo USB port with the FT230X chip in the USB models is a little more involved. 
  1. First you need to modify the USB PID on the BlueFly FT230X chip. The standard PID on the FT230X is '6015'. This PID is not recognized by the standard ftdi_sio driver on the modified Kobo kernel. If you modify it to the PID associated with the FT232 chip ('6001'), then FTDI drivers work appropriately. This step is achieved by using the FT_PROG EEPROM Programming Utility from FTDI on a Windows PC. With your BlueFly connected you will 'Scan and Parse' to find the FT230X chip. Then navigate to 'USB Device Descriptor'|'VID PID', select 'Custom PID' in the drop down, change the PID from 6015 to 6001, then 'Program Devices' to write that to the BlueFly FT230X. 
  2. You need a USB OTG Y cable as shown below. The UART chip in the Kobo needs external power to work (the BlueFly does not provide it). This will work best if the BlueFly and Kobo are fully charged. If not, the external power pack will be quickly drained as both the Kobo and the BlueFly are charged from it.
  3. After you have installed xcsoar on your kobo you need to enable USB-OTG from the System menu at the start up screen. This will reboot the kobo and make its linux use a different kernel which has the ftdi_sio drivers. I have tested this step with the Kobo Mini and the Kobo Glo HD with xcsoar version 6.8.6. 
  4. In xcsoar navigate to Menu|Config|Devices|Edit, change the port to ttyUSB0, baud 57600, driver BlueFly. After clicking ok you might have to Disable and Enable a few times. Click the Monitor to see the data stream. 

If you connect the USB models to other devices please contact me and I will update this post. 

19 comments:

  1. So with the BlueFlyVario_USB_GPS_v11, I can use it as a stand alone vario, then connect it later via a wired connection to a Kobo, correct? Will the Kobo power the BlueFlyVario_USB_GPS_v11 as well? Thanks,

    ReplyDelete
    Replies
    1. Yes, you can use it as a stand alone vario, then if you have the right wires you can connect it to a Kobo (I have tested it with the Mini and the Glo HD model). However, the Kobo does not power the BlueFly. The BlueFlyVario_USB_GPS_v11 has it's own 600mA battery (see the picture above which describes what is supplied with the vario). The seperate external battery is needed to power the USB port of the Kobo.

      Delete
  2. Hi Al,
    I'm planning to build a new flying instrument starting from an e-ink device running Android 4.2. My idea was to use USB-OTG since the e-ink device doesn't have Bluetooth. It's not clear if with BFV_USB_GPS_v11 it is possible to just follow your procedure described above, and make it work over USB-OTG.
    Can you please confirm if the BFV_USB_GPS_v11 connected with USB-OTG y cable will work with XCSoar out of the box?
    Will I need also an IOIO-OTG board or some other additional hardware?

    ReplyDelete
    Replies
    1. The only additional hardware you need is cables. It is possible if you follow the procedure outlined above and linked to in the earlier blog post. You will need the MAVCell app as described in that post.

      Delete
    2. OK,

      I'm planning to use XCTrack instead of XCSoar.

      It would be good to know if the BFV_USB_GPS_v11 needs additional software like MAVCell to be recognized or detected by Android. I apologize if this is a stupid question.

      I've managed to connect a BFV_TTL to Android through an IOIO-OTG board, and to get it detected by XCTrack i just asked the developer of the app to whitelist the vendorID of the IOIO-OTG.

      My goal would be to ask the developer to whitelist the vendorID of the BFV_USB_GPS_v11 and just connect it through an USB_OTG cable.

      Will this be possible in your opinion?

      Thanks.

      Delete
    3. MAVCell provides a IP bridge to a FTDI serial port. I am not sure if XCTrack can connect to such a bridge. However, the much better solution is for XCTrack to directly connect to the FTDI serial port provided by the FT230X chip. There is a bunch of information on how to do this here: http://www.ftdichip.com/Android.htm.

      Delete
    4. Salve luppolone. Sei riuscito a far girare xctrack su un ereader e collegare il BFV _USB_GPS?

      Delete
    5. Hello,

      I still didn't manage to run BFV USB in XCTrack through USB OTG. I'm in contact with XCTrack app developer and we are looking into it. As soon as I'll have news, I'll update this "thread".

      BTW Al, did you manage somehow to make BFV USB work with XCTrack through USB OTG?
      Do you have any hint?

      Delete
    6. Sorry, I have not tried it with XCTrack through OTG. The developer should look at the information on the FTDI website. The D2XX driver can be used for Android http://www.ftdichip.com/Android.htm

      Delete
  3. Hello, I also try to operate the Bluefly via an Android E-Ink (version 4. *). Unfortunately it does not work. Android / XCTrack can not detect a signal. Connected and parameterised as suggested. I would be extremely happy if we bring the whole to work.

    ReplyDelete
    Replies
    1. I do not think xctrack on Android currently supports reading USB serial. You will have to use the Bluetooth model of the BlueFly.

      Delete
    2. Hi Al,
      sorry to correct you, but XCTrack for Android do support reading USB serial. I can see that XCTrack recognizes USB device with vendor-id 1027 and product-id 24597, that is the FTDI chip. But it doesn't receive data stream, like it does with LeBipBip or other USB devices.
      I'm in contact with Manana on paraglidingforum, and I asked him to find the root cause. Maybe you can contact him and find the solution together.

      Delete
    3. I have also emailed the xctrack developer, and am waiting for a reply. I can not find the documentation or source code which describes how xctrack uses USB OTG, so we will need to rely on the developer to help.

      Delete
  4. Hi Flying Al, I am trying to connect the BlueFlyVario_USB_GPS_v11 to a Kobo Mini exactly the way described above. At point 4 after editing the port settings and dis./enabling the device is still not recognized and the port shows N/A. Any idea what I have missed / can do?

    ReplyDelete
    Replies
    1. Please send me an email showing a photo of your setup with all of the connections, and a photo of the device configuration screen in xcsoar.

      Delete
  5. Hi, do you see a way to put all the stuff on the image above (IMG_0357.JPG) in a closed box as a knee-board ? This box should have
    only one micro-USB for charging the big battery. Also the small 750mAH-battery should be eliminated. Perhaps some additional switch or push-button would be necessary.

    I ask, because I failed with my own hardware (LPC11U24 + Navilock GPS + Bosch BMP280 + power management) for some reasons: USB is not recognised anymore after charging the Kobo Glo HD with an attached USB-device in my case (generic USB_CDC_ACM-driver). I need to reset everything in a strange way, then it will do the job again.

    I have seen, that Kobo Glo HD eats excessive power during display-refresh (about 280 mA), so i spend a flat usb-battery 5Ah, which can
    be charged and discharged at the same time.

    If you have a reliable solution, I will by your vario in September.

    ReplyDelete
    Replies
    1. I think a much better solution is to use the TTL_GPS model and solder that to an internal TTL port. It is much neater for most pilots.

      Delete
  6. Hi Al,
    because i do not want to drill holes in the Kobo, i am still looking for a solution with your USB_GPS_v11 and OTG-XCsoar.
    In meantime i found a solution with my hardware and i think this solution should be possible with yours also:

    1. configure USB_GPS_v11 as an USB-powered device without battery (possible ?)
    2. connect a 'Powerbank' by a sliding switch to USB Vdd.
    3. switching on starts the Kobo because it sees 5V on USB. The USB_GPS_v11 should start also (without the push-button ?)
    4. to switch off, shut off the sliding switch first, then exit XCsoar and shutdown Kobo by menue-button
    5. Wait about 10 Seconds (until Kobo-internal 3v3 disappears) for a new restart
    6. For charging, just the Powerbank (5Ah) will be charged. It should have no additional switch and just switch on by injecting a test current (my 'Revolt' does that).
    7. do not switch on the sliding switch during charging
    8. The Kobo-internal battery will be charged only indirectly by the powerbank during usage, so Kobo-charging-mode is avoided.

    I cannot find the schematic around the FTDI. It should be configurable as an USB-powered device in my case.

    Do you see any problems ?

    ReplyDelete
    Replies
    1. Harald, It is possible to configure as a USB powered device by closing SJ1, just make sure that you then do not plug in a battery directly into the BlueFly or it will get an uncontrolled voltage. However, the USB power will not automatically start the BlueFly, you will still need the push button (unless you do some micro soldering to remove a component, cut a trace, and add a jumper)

      Delete