Thursday, 28 April 2016

micro:bit Bluetooth UART service and Animal, Vegetable or Mineral

James Devine (@James_A_Devine) of Lancaster University recently implemented Nordic Semiconductor's UART service for Bluetooth low energy on micro:bit. At the time of writing the code hasn't yet been released into the world of mbed but it will, have no fear.

The UART service provides a simple emulation of serial data communications over Bluetooth low energy. It's great for exchanging arbitrary byte arrays in either direction between peer devices. In our case one of those peers is the marvellous BBC micro:bit of course.

I tested and will be documenting the new service on Lancaster University's micro:bit runtime site and have just finished implementing a classic two player guessing game "Animal, Vegetable or Mineral" for Android which makes use of the service. It worked a treat and you can see a video of the application in action on my micro:bit page.


Friday, 15 April 2016

The micro:bit digital compass over Bluetooth

The BBC micro:bit contains a digital compass or "magnetometer". You can obtain magnetometer data including the direction the micro:bit is currently facing, measured in degrees, over a Bluetooth connection. Want to see what this looks like? Of course you do!

http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html#compass


Wednesday, 6 April 2016

BBC micro:bit Bluetooth security

The BBC micro:bit uses standard Bluetooth security. It requires devices such as smartphones to have paired with it before the majority of interactions are permitted. Pairing uses "passkey authentication" which means that during the pairing process, the micro:bit will display a 6 digit random number which has to be keyed into the smartphone. Having paired, all Bluetooth characteristics become available for access, Characteristics support some combination of read, write and notify and in the greater majority of cases, the security rules stipulate that these must take place over a secure (i.e. encrypted) link. An attempt to perform such an operation without having paired should cause the smartphone OS to initiate the pairing process automatically.

I've created a video showing how to pair with your micro:bit:

http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html#pairing