たれぱんのびぼーろく

わたしの備忘録、生物学とプログラミングが多いかも

esp32で心拍を測る

esp-idfのexampleに、GATT profile tableを使ったheart rate計測デモがある.
こやつを解析する.

GATT “Heart Rate”

Heart Rate serviceを利用.
16bit uuid: 0x180D
Viewer | Bluetooth Technology Website

gatts_table_create_demo.c

uuid変数

static uint8_t heart_rate_service_uuid[16] = {
    /* LSB <--------------------------------------------------------------------------------> MSB */
    //first uuid, 16bit, [12],[13] is the value
    0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x18, 0x0D, 0x00, 0x00,
                                                                          //  here    //
};