[Video] BLE, C++, Notifications and Web Bluetooth
Posted: Thu Jul 06, 2017 3:23 am
In this technical video we look into using C++ classes in conjunction with BLE on the ESP32. In this instance, the ESP32 is acting as a BLE Peripheral (server). When a BLE peer connects to our ESP32, the goal is to have our ESP32 start issuing notification messages to "push" value changes to the partner. This sample illustrates push notification.
As if that wasn't fun enough ... we also illustrate the use of "Web Bluetooth". If you aren't familiar with that concept, it is the idea that a browser (Chrome in this case) can act as a BLE Central. When I first heard that notion, I had to think about that for a moment ... so here is the broken down scoop.
Imagine a browser. Imagine a browser downloading a web page (HTML). Imagine the HTML containing JavaScript. Imagine the JavaScript scanning BLE, finding a peripheral, connecting to it ... and then reading values, writing values or receiving notifications. Again ... no C, no C++, no other fancy coding ... just HTML and JavaScript in the browser.
https://www.youtube.com/watch?v=WGozJXuQ8dY
As if that wasn't fun enough ... we also illustrate the use of "Web Bluetooth". If you aren't familiar with that concept, it is the idea that a browser (Chrome in this case) can act as a BLE Central. When I first heard that notion, I had to think about that for a moment ... so here is the broken down scoop.
Imagine a browser. Imagine a browser downloading a web page (HTML). Imagine the HTML containing JavaScript. Imagine the JavaScript scanning BLE, finding a peripheral, connecting to it ... and then reading values, writing values or receiving notifications. Again ... no C, no C++, no other fancy coding ... just HTML and JavaScript in the browser.
https://www.youtube.com/watch?v=WGozJXuQ8dY