A fully-functional BLE - Wi-Fi Bridge. Control/Access the BLE accessories in your home remotely using phone apps. If you have any BLE devices you own, simply add their BLE protocol, and any ESP32 DevKit will start acting as a BLE - Wi-Fi Bridge.
- Hardware
- ESP32
- Software
- ESP-RainMaker: Follow the ESP RainMaker Documentation Get Started section
- Download the ESP RainMaker iOS/Android phone app
$ git clone https://github.com/dhrishi/rainmaker-ble-wifi-bridge
$ cd rainmaker-ble-wifi-bridge
$ RAINMAKER_PATH=/path/to/where/esp-rainmaker/exists idf.py build flash monitor
- This is a BLE - Wi-Fi bridge that facilitates access to registered BLE accessories remotely using phone apps.
- BLE devices in the vicinity are discovered by the bridge and are represented as RainMaker devices which can be seen and controlled through the iOS/Android app.
- When a parameter update is received to ESP32 over Wi-Fi (from the iOS/Android app), it is mapped to the format accepted by the corresponding device and a characteristic write over BLE for is executed. This results into the actual action on the BLE device.
Currently supported accessories:
- Syska Light Bulb
- PLAYBULB CANDLE
- Copy files
main/accessories/sample_accessory.[ch]
and rename as per your accessory name. You may consider replacing the occurrences ofsample_accessory
in the code with youraccessory-name_type
. - Update the functions in the C source file as per the documentation and guidelines.
- Include the C header file
accessories/accessory-name_type.h
inmain/app_main.c
and add a call to the register functionaccessory-name_type_register()
beforeapp_ble_start()
- Add the entry of the source file
acessory-name_type.c
inmain/CMakeLists.txt
Notes:
- Files
main/accessories/sample_accessory.[ch]
are only for reference and are not compiled. - The total number of registered accessories you want to use at a time should not exceed
MAX_DEV
inmain/app_ble.h
. If required, you can change the default value using menuconfigComponent config -> Bluetooth -> Bluetooth controller -> BLE Max Connections
.
- The added BLE accessory should be discoverable before starting the RainMaker framework.
- For now, the BLE service and characteristic UUIDs of the parameters to be controlled should be 16 bit.
- Getting the parameter values (BLE read) from the accessory is not yet supported
Press and hold the BOOT button for more than 3 seconds to reset the board to factory defaults. You will have to provision the board again to use it.