събота, 1 юли 2017 г.

HEXIWEAR and MLT-BT05 bluetooth (BLE) connection

The HEXIWEAR is an IoT wrist watch with OLED display, BLE interface, 6x capacitive buttons, accelerometer, gyroscope, air pressure sensor, blood pressure sensor and other manufactured by MikroElektronika.

I bought it several months ago, because it integrates soo many sensors inside but especially because of the Bluetooth 4.x and of course - it's open-source and anyone can upgrade it.

The MLT-BT05 is very cheap and easy-to-use BLE module with UART interface (9600 bauds by default).  If this is not the device you have, then make sure it supports Master mode. (For example HC-06 (linvor1.8) doesn't support Master mode and can't connect to the HEXIWEAR.)

Having the HEXIWEAR, my first task was to write additional menu to set the time and date manually, because in the 1.0 stock SW this option is not included and that's done only at sync time with the phone. You can imagine my smartphone doesn't support Bluetooth 4.x, that's why I needed this menu, aand also that's the reason I didn't connect to the watch from the first time - there was no other device around to show me the MAC! :|

The second thing I do is to pair the device with Arduino board over the BLE interface.

What is needed:
- HEXIWEAR wrist watch
- MLT-BT05
- USB-to-Serial convertor
- breadboard or direct connection between the convertor and the MLT-BT05

In the sequence I present below will be assumed we'll make the connection with a PC, which sends commands to the MLT-BT05 over USB-to_Serial convertor (in my case FTDI-board). The commands I send over command line from my Ubuntu laptop.

1. Enable the bluetooth on the HEXIWEAR
2. Connect the MLT-BT05
3. Set up the MLT-BT05 for Master mode
4. Connect MLT-BT05 to the HEXIWEAR
- don't search for the HEXIWEAR with AT+INQ - doesn't work. Connect directly by MAC address

This is my first blog post on HEXIWEAR and BLE. In the following weeks I will set up Arduino-based system, which connects automatically with my HEXIWEAR when I come home and does some automated stuff :)

Special thanks to Arik Yavilevich, who helped me make the first connection, when I was desperate because the HEXIWEAR wasn't visible with the AT+INQ command.

Additional sources of information:
- http://blog.yavilevich.com/2017/03/mlt-bt05-ble-module-a-clone-of-a-clone/
- http://www.martyncurrey.com/bluetooth-modules/

Няма коментари:

Публикуване на коментар