6 years, 3 months ago.

BLE_HeartRate_IDB0XA1 - GATT_Init failed. GAP_Init failed.

Hi, I'm testing BLE with the X-NUCLEO-IDB05A1 on NUCLEO-F446RE, and imported the this code into the compiler: https://os.mbed.com/teams/ST/code/BLE_HeartRate_IDB0XA1/

For the BLE shield to work with this platform, I patched D3 to D13, so CLK is on SPI1, like MOSI and MISO (and I also moved the 0 Ohm resistor from R4 to R6 on the BLE shield), like documented here: https://os.mbed.com/teams/ST/code/X_NUCLEO_IDB0XA1/ Also, I defined another (unused) output for the LED, as the on-board LED would be on D13 by default, which now is SPI1 CLK, and should therefore no longer be driven.

The shield seems to work, the BLE advertising starts with the correct device name, as set in main.cpp.

I turned on DEBUG in ./X_NUCLEO_IDB0XA1/x-nucleo-idb0xa1/bluenrg-hci/ble_debug.h, so I can see the messages in the console.

When I compare output to the screenshot on the webpage, I notice there is no 'Auth Req set successfully.' line. Also I noticed the output has errors, like 'GATT_Init failed.' and 'GAP_Init failed.'. I added a few lines for debugging purpose, so it also lists hw and fw versions.

Could it be a firmware issue on the X-NUCLEO-IDB05A1?

Any help would be much appreciated! Thank you very much! Jack

console output for BLE_HeartRate_IDB0XA1

BLE_HeartRate_IDB0XA1
btleInit>>
hwVersion: 0x31, fwVersion: 0x0711
versionString: ST BLE4.1 HW v3.1 FW v7.1
bnrg_expansion_board: IDB05A1
CONFIG_DATA_ROLE: 0x2d, CONFIG_DATA_ROLE_LEN: 0x01, STACK_MODE: 0x04
Setting address succeeded.
aci_gatt_init(void)
GATT_Init failed.
CONFIG_DATA_RANDOM_ADDRESS_IDB05A1: 0x80, BDADDR_SIZE: 6, data_len_out: 1
GAP_Init failed.
bleInitComplete..........
AddService(): Type:0
aci_gatt_add_serv UUID_TYPE_SHORT ret=71
BlueNRGGap::setAdvertisingData
setAppearance= 0x2 0x0
setAppearance failed (ret=0x47)!!
adData[0].length=2
adData[0].AdType=0x1
BlueNRGGap::setAdvertisingData
setAppearance= 0x2 0x0
setAppearance failed (ret=0x47)!!
adData[0].length=2
adData[0].AdType=0x1
adData[1].length=3
adData[1].AdType=0x3
BlueNRGGap::setAdvertisingData
setAppearance= 0x3 0x40
setAppearance failed (ret=0x47)!!
adData[0].length=2
adData[0].AdType=0x1
adData[1].length=3
adData[1].AdType=0x3
adData[2].length=3
adData[2].AdType=0x19
Advertising type: APPEARANCE
input: deviceAppearance= 0x3 0x40
setAppearance= 0x3 0x40
setAppearance failed (ret=0x47)!!
BlueNRGGap::setAdvertisingData
setAppearance= 0x3 0x40
setAppearance failed (ret=0x47)!!
adData[0].length=2
adData[0].AdType=0x1
adData[1].length=3
adData[1].AdType=0x3
adData[2].length=3
adData[2].AdType=0x19
Advertising type: APPEARANCE
input: deviceAppearance= 0x3 0x40
setAppearance= 0x3 0x40
setAppearance failed (ret=0x47)!!
adData[3].length=10
adData[3].AdType=0x9
 setting scan response data (_scanResponseLen=0)
advInterval=1600 advType=0

I combined the shield with a Nucleo-F401RE to be able to perform a firmware update on the BLE shield (there is only a firmware updater bin file for the F401RE, hence the SPI CLK pin should not be patched). The firmware update from v7.1a to v7.2c worked and fixed the problem. Here is how I updated the firmware: http://www.emcu.eu/how-to-update-fw-via-gui-on-the-bluenrg-bluenrg-ms-or-spbtle-rf-bluenrg-ms-module/

posted by Jack Berkhout 21 Jan 2018

HI I am a novice and I have the same problem than you do you find a solution ? Just where can I change the LED on BOARD ? thanks

posted by Dominique Certon 16 Apr 2018
Be the first to answer this question.