Final Prototype Assembly

bluez   bluetooth   gatt   accelerometer   compass   raspbian   raspberry-pi  

With the first regatta of 2016 only 2 weeks away, I'm finally getting the latest revision of Mr. Gibbs to the point where it's ready to actually throw on the boat and sail. The major development of late has been revisions of the PCBs for Mr. Gibbs, as well as "The Crows Nest" aka the mast mounted anemometer & wind vane. It took 3 tries to get things positioned right on Mr. Gibbs, but I did manage to get a functional Crows nest on the first try. Both boards showed up this week.

You'll note that it's still using the MPU-6050 Accelerometer/Gyro and HMC5883L Magnetometer rather than the newer MPU-9250 that has both combined in one breakout. There are 2 reasons for this decision, first is cost, the combo of 6050+5883L cost less than a 9250, and second is that I simply don't have the time right now to code the necessary bits for the 9250 given that the other arrangement is working fine.

I will still probably tweak the designs a bit more, there are a few problems still, but they are relatively minor. On Mr. Gibbs, the power input is near the 5883L, the problem this presents is that most power regulators I'm buying have a magnet around the wiring to remove noise, this magnet is obviously going to affect my compass readings, for now I will likely just remove the magnet.

On the Crows nest there are 2 problems with the LEDS. First, mounting them on the back has proven to be a dumb idea, they would be better mounted between the Blend Micro and the MPU-6050 in the blank space, or at the end. Second, they are too close together so right now I can't mount the vane LED at all. Again, minor, but annoying nonetheless.

The good news is that despite these flaws both boards work fine. I was able to receive wind data via BLE, as well as read data from the GPS, Accelerometer, and Compass. Finally, both devices run on the 18650 Lithium batteries as planned (though I have not tested for how long yet)

For enclosures, the previously blogged 2.5" PVC pipe is still the plan for Mr. Gibbs, and I have built a mast head mount for the crows nest which will hold both the PCB, 1 18650 battery, and the Peet Bros anemometer.

Now the bad news. On Raspbian Jessie the built-in BlueZ version does not appear to support Gatt via dbus even with the experimental flag enabled. The obvious solution was to upgrade BlueZ, I did this by adding debian stretch sources and leaving jessie as the default and then updating BlueZ via apt that way. Success! Gatt seemed to be working.

And then I ran Mr. Gibbs and it failed to connect to a Pebble. A quick glance at dmesg yeilded Bluetooth: SMP security requested but not available. It appears that there is a kernel bug in that version of the kernel which prevents the pairing from occuring. Running rpi-update does not appear to resolve the issue (that would have been too easy). So I'm left with using old blueZ (which can't use gatt) or new blueZ (which can't pair).

It appears my next step is to compile a more modern kernel to hopefully resolve the SMP issue. We're about to find out how deep the rabbit hole goes.

comments powered by Disqus
Comments powered by Disqus