Friday, 20 June 2014

TTL_GPS_v9 (rev 2)

After selling out of the first batch quickly I have got a new batch of PCBs for the BlueFlyVario_TTL_GPS_v9. The rev 2 board has a few minor changes:

  • I removed the pcb pads for the switch. 
  • It is now about 1mm less wide. This makes it fit more neatly on the Kobo bezel. 
  • I have exposed the VBACKUP pin of the GPS next to the V+ pin of the TTL connection. If you attach this to a power supply (like the battery in the Kobo) the GPS will get a fix much quicker between power cycles. It consumes very little power. See the PA6H datasheet for more information. 
See below for updated schmatics and pcb layout:

New Sleep Command

The sleep command included in the first v9 firmware ($SLP*) allows the BlueFlyVario to be woken up just by sending a character over the serial port. In rev 2 I added a command $SLX*. This puts the BlueFlyVario fully to sleep, it can then only be waked with a power cycle.  

Kobo Nickel Patch

This is for advanced users. I am sure there is a better way to do it but I am not sure how. To make these changes you can telnet in to your Kobo via Putty and edit files using vi. I posted most of this to the XCSoar dev forum but have yet to commit the changes. Once again, many of these ideas come from my power user friend Steve.

During the ongoing development of the BlueFly vario I have found it might be useful to run some additional commands when switching from the KoboMenu to Nickel. I have used it to send the new sleep command to the connected BlueFly vario so it does not consume power when using Nickel. The sole patch for XCSoar is to include this in /kobo/rcS [Update: The file path is actually /opt/xcsoar/bin/rcS]

# launch user script before nickel start
if [ -f /mnt/onboard/XCSoarData/kobo/ ]; then
source /mnt/onboard/XCSoarData/kobo/

just just prior to the call to unmount the xcsoar files and launch the original nickel rcS:

umount -l /mnt/onboard
exec /etc/init.d/rcS

My has one command:

sh /mnt/onboard/XCSoarData/kobo/bfvsleep &

This kicks off bfvsleep in the new thread that runs as Nickel is starting up. bfvsleep contains the following commands.

sleep 10
stty ospeed 57600 ispeed 57600 -F /dev/ttymxc0
stty -F /dev/ttymxc0 raw
echo '$SLX*'>/dev/ttymxc0


  1. So for v1, you can do the same, but use echo '$SLP*'>/dev/ttymxc0 ?

    1. Unfortunately SLP can be woken by sending a command over the serial port, which the Kobo does kind of randomly all of the time.

  2. Can you give a link to the post on the XCSoar forum for this?

    1. Which post on the XCSoar forum are you talking about?

  3. You mentioned "I posted most of this to the XCSoar dev forum but have yet to commit the changes."

  4. Yes. That is perhaps a little misleading. I posted the message to the XCSoar dev list. I am still yet to put the small change in to the Git repository. Too many other things to do...

  5. I've tried to follow this, as I'd like to turn off the beeping while reading a book.

    I can't find the file you mention as "to include this in /kobo/rcS". Sorry, can you be a bit more specific here? Thanks.

    1. Did you have any luck with this? I've found "rcS" files elsewhere on the device (/etc/init.d/rcS for instance), but no /kobo/rcS. Any help would be appreciated.

    2. I am sorry I was not very clear. The file path is /opt/xcsoar/bin/rcS. If you use the command 'vi rcS' from a telnet session you can edit it directly on the Kobo. I will fix the blog post.

    3. Thanks for that. One last question (I hope):

      After editing the rcS file in VI, do I create and edit files called "" and "bfvsleep" while still logged in via Telnet? Or is it ok to add these files and their contents using a text editor in windows and simply drag them across while the Kobo is connected via the USB cable? Or does it not matter either way?

    4. It should not martter either way.

    5. This comment has been removed by the author.

  6. When you telnet into the Kobo command line use ls and cd to navigate around the file structure in the console. You can edit the file rCS using vi. It is a pretty simple console based text editor - use Google to understand the commands.

  7. I implemented the sleep script on my Kobo Mini with TTL_GPS_v9 (rev 2) and it works fine. When I unter Nickel mode the varios goes silent.
    However, the blue and greed led is still on. Is it possible to modify the script so the lights goes dark?

    Keep up the good work!

    1. That is a bit strange. Could you email me a photo of your setup and I will try to work out what is going on.

    2. Thanks for helping out. Here is an album with some pictures. I don't want to remove my 3D printed case if I don't have to, but tell me if you need a picture from the soldering at this end.

      Video with sound. I'm aiming the GoPro a bit off. As you can hear the sleep script works. Really happy about that :)

      I'm running XCSoar 6.8 preview if that matters. The version found here:

  8. Any tips for soldering the gnd wire? Mine lasts about 3-5 flights and then it comes off. All the others were fairly easy but I can't seem to get the wire to bond properly. More heat just starts to melt everything. Any tips!?

    1. It is pretty tricky. I always start with GND soldering first on the Kobo. I start with a hot clean soldering iron and touch it to the GND header spot on the Kobo. After about ten seconds I feed in a blob of solder, after a little while the PCB GND hole has heated enough for the solder to stick to it. At this stage I am only trying to get a little solder sticking to the PCB GND hole. Next, I tin the bit of wire I want to solder on with a small blob of solder. To finish it off I put the tinned wire on top of the solder on the GND hole, and press the hot soldering iron on top of it. I am not trying to get the GND wire into the hole, only attach it to the solder which is already sticking to the hole. After a little time the solder on the tinned wire flows, and this causes the solder on the hole to flow a little too. I am holding the wire with tweezers so it is not getting hot in my fingers. After carefully removing the soldering iron, and being careful not to move the wire, it all gets solid and stuck together. In effect it is kind of like the way you would solder a wire to a surface mount pad.

    wrong: sh /mnt/onboad/XCSoarData/kobo/bfvsleep &
    right: sh /mnt/onboard/XCSoarData/kobo/bfvsleep &

    the "r" is missing in onboard!

  10. Anyone tryied to send sleep packet to bluefly vario with the script?
    I am trying to make this work for lk8000, where also the can be used.

    But everytime I add my script, the Kobo freeses when trying to enter KOBO mode from LK menu.