Part Number:CC2650EM-7ID-RD
Hello,
I'm trying to get the direct advertising to work on my two SmartTF06 dev boards with the CC2650EM shield. But I cannot get it to work, maybe you can help me with a few questions.
- Do I have to change the mode of discovery for the central device or should the directed advertising packets be found just like the undirected? At the moment I do not receive anything from the peripheral when directed advertising is enabled.
- Should the directed advertising packet even be found by the central if there was no prior bonding? I other words, can I just use hard coded adresses on the peripheral side to address the central?
- I found some threads in the forum noting that the address given for GAPROLE_ADV_DIRECT_ADDR should be reversed, is this true?
The SDK version is "ble_sdk_2_02_02_25".
I've started with the simple_peripheral and simple central and changed the following:
Peripheral:
SimpleBLEPeripheral_init(){
... after all the GAPRole_SetParameter calls I added:
uint8_t resolvedAddr[B_ADDR_LEN] = {0x00, 0x2f, 0xdc, 0x43, 0xb4, 0xb0}; uint8_t idx = GAPBondMgr_ResolveAddr( advDirectAddrType, resolvedAddr, NULL); if ( idx < GAP_BONDINGS_MAX ){ uint8_t advDirectType = GAP_ADTYPE_ADV_LDC_DIRECT_IND; bool bIsEnabled = false; GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t), &bIsEnabled); GAPRole_SetParameter(GAPROLE_ADV_DIRECT_ADDR, B_ADDR_LEN, resolvedAddr); GAPRole_SetParameter(GAPROLE_ADV_EVENT_TYPE, sizeof(uint8), &advDirectType); //GAPRole_SetParameter(GAPROLE_ADV_DIRECT_TYPE, sizeof(uint8_t), &advDirectAddrType); bIsEnabled = true; GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t), &bIsEnabled);
Display_print0(dispHandle, 5, 1, "bonded!"); Display_print0(dispHandle, 6, 1, Util_convertBdAddr2Str(resolvedAddr)); Display_print0(dispHandle, 7, 1, "Directed");
}
Central:
#define DEFAULT_DEV_DISC_BY_SVC_UUID FALSE
For the Central the evaluation allows to list all the found MAC-Adresses but the address of the periperal device does not show up. Do you have any hints or can somebody provide a working example?
Best regards
Fabian