Note: I have not been using this BLE expansion board, since its pin assignment does not allow me to add another wireless module such as X-NUCLEO-NFC04A1(ST25DV04K). I have been using Microchip's RN4020 instead.
[Android smart phone]<--BLE-->[X-NUCLEO-IDB05A1][NUCLEO-F401RE]
The aim of this template project is to add BLE to edge AI developed with X-CUBE-AI.
==> Code
This is a simpler version of ApplicationSample project generated by "X-CUBE-BLE1/Application", but this one excludes dependencies on "X-CUBE-BLE1/Application".
Just use "X-CUBE-BLE1/Wireless" (w/o "X-CUBE-BLE1/Application") to generate a template, then do the following:
- Copy "inference_service.c" and "inference_service.h" from this project into the new project.
- Copy "app_x-cube-ble1.c" from this project into the new project (or cut & paste the code into the generated "app_x-cube-ble1.c").
Those codes include a minimal implementation of notifying (tx) an edge AI inference result to the central every second.
BLE-based beacon will not come into wide use. Let's study NFC tag instead of beacon!
Reference: https://9to5google.com/2018/10/25/google-killing-location-notifications/
==> Code
Modify the following part in :
eddystone_beacon.h
:
(Remove '//' to define EDDYSTONE_URL_BEACON_TYPE)
#define EDDYSTONE_BEACON_TYPE (EDDYSTONE_URL_BEACON_TYPE) /* defined in configuration options */
:
#define PHYSICAL_WEB_URL "goo.gl/viVrdi"
//#define PHYSICAL_WEB_URL "www.st.com"
Use BLE Scanner to read the URI.