https://bertrandmartel.github.io/bluetooth-remote-control
Bluetooth Low Energy remote control based on DK51 board from Nordic Semiconductor with ST7735 1.8 Oled LCD from Adafruit
-
HID Service BLE over GATT for full compatibility with Android TV :
-
keyboard control :
- up / down / left / right
- escape (back)
-
consumer control :
- AC Search
- AC Home
- Play/Pause (Android custom keycode)
-
Custom Display Service used to receive a compressed bitmap over GATT :
-
compressed bitmap is stored temporarily on device flash & removed afterward
-
bitmap format is 128*160 fastlz compressed with block of 4096 octet
-
regular characteristic write is used (not long write)
-
Android application can be used to test :
-
hid keys notification
-
command led states on DK51 board
-
send a bitmap to be displayed on adafruit OLED module
-
works fine on Android / Android TV
-
works on Apple TV but some keycode differ (consumer control)
-
this project doesn't implement any Audio Service for Voice Search
You can't combined Mode 1 & Mode 2 simultaneously.
- /firmware - microcontroller code written for NRF DK51 board
- /android - android application to control device
- NRF51 DK board
- nrf51822 chipset based on an ARM Cortex M0 processor (128kB flash memory / 16kB RAM)
- Adafruit 1.8" Color TFT Shield with Joystick
RST
is linked to VDD
git clone git@github.com:bertrandmartel/bluetooth-remote-control.git
cd bluetooth-remote-control
git submodule update --init --recursive
- armgcc toolchain
- sofdevice s130
- nRF5 SDK 11.0.0
-
follow SDK/Toolchain Installation steps section of this tutorial
-
specify NRF51 SDK directory with :
export NRF51_SDK_DIR=/path/to/sdk
cd firmware
make
make flash_softdevice
make flash
cd android
./gradlew build
- NRF 51 SDK 11.0.0 : https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF5-SDK
- fastlz compression library : https://github.com/ariya/FastLZ
- Integration of Adafruit OLED ST7735 1.8 display on NRF51 DK board : https://github.com/bertrandmartel/adafruit-oled-st7735-dk51
- Android crop image library : https://github.com/lvillani/android-cropimage
- Simple vertical and horizontal color picker : https://github.com/DASAR/ShiftColorPicker
- fastlz compression library : https://github.com/ariya/FastLZ
- appcompat-v7, design & recyclerview-v7
- USB HID keycode : http://www.freebsddiary.org/APC/usb_hid_usages.php
- Android HID keycode/keyevent mapping : https://source.android.com/devices/input/keyboard-devices.html
The MIT License (MIT) Copyright (c) 2016 Bertrand Martel