This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE_UUID_OUR_BASE_UUID not correct, flags not correct

Hi,

I'm using nRF52840 with SDK15.0.0 wit code from : https://devzone.nordicsemi.com/tutorials/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial

I could make the tutorial advertising works i can see my device on nRF connect application... but i have troubles with definitions :

my problem is defining 128-bit base UUIDs :

ADVERTISING :

#define BLE_UUID_OUR_BASE_UUID              {{0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x11, 0x22, 033, 0x44, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00}}

NOT ADVERTISNG :

#define BLE_UUID_OUR_BASE_UUID              {{0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x11, 0x22, 033, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}

so the problem seems to be a sequence of 6 0x00, but that's the sequence requested by my protocol...

I have another problem similar with flags :

 ADVERTSING
 init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
 NOT ADVERTISING
 init.advdata.flags                   = BLE_GAP_ADV_FLAGS_NEW_MODE;

i defined : #define BLE_GAP_ADV_FLAGS_NEW_MODE    (0x1A), requested by my protocol :

bit 0 (OFF) : LE Limited Discoverable Mode
bit 1 (ON)  : LE General Discoverable Mode
bit 2 (OFF) : BR/EDR not Supported
bit 3 (ON)  : Simultaneous LE and BR/EDR to Same Device Capable (controller)
bit 4 (ON)  : Simultaneous LE and BR/EDR to Same Device Capable (Host)

thank your for your help

Geoffroy

Parents Reply
  • for flags, in ble_advertising.c, ble_advertising_start calls sd_ble_gap_adv_set_configure and it returns :  0x0A for NRF_ERROR_INVALID_FLAGS.

    call of sd_ble_gap_adv_set_configure send  me in ble-gap.h to :

    SVCALL(SD_BLE_GAP_ADV_SET_CONFIGURE, uint32_t, sd_ble_gap_adv_set_configure(uint8_t *p_adv_handle, ble_gap_adv_data_t const *p_adv_data, ble_gap_adv_params_t const *p_adv_params));

    it's supervisor call interface but i don't know how to proceed to desactivate this control...

Children
No Data
Related