Skip to content

Latest commit

 

History

History

BLE

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

X-NUCLEO-IDB05A1 Bluetooth Low Energy expansion board

==> STMicro's web site

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.

Setup

   [Android smart phone]<--BLE-->[X-NUCLEO-IDB05A1][NUCLEO-F401RE]

Template project for simple TX and RX

The aim of this template project is to add BLE to edge AI developed with X-CUBE-AI.

Config on CubeMX

Code generated by X-CUBE-BLE1 with some modification

==> 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.

Beacon (EddyStone)

Note: let's study NFC tag instead of BLE-based beacon

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 generated by X-CUBE-BLE1

==> Code

Changing the advertized URI

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"

Confirmation

Use BLE Scanner to read the URI.