Hello,
I am using simple_broadcaster on cc2650stk and I want it to advertise every 100ms without interruptions. Do I have to do anything other than setting DEFAULT_ADVERTISING_INTERVAL to 160?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I am using simple_broadcaster on cc2650stk and I want it to advertise every 100ms without interruptions. Do I have to do anything other than setting DEFAULT_ADVERTISING_INTERVAL to 160?
Hello Panagiotis,
You've got the right idea, however you should also refer to section 5.1.8 of the CC2640 BLE Software Developer's Guide for other advertising interval values from the GAP layer. You can also refer to relevant E2E threads.
Regards,
Ryan
In my example there isn't a DEFAULT_DISCOVERABLE_MODE so I changed gapRole_AdvertData[B_MAX_ADV_LEN] in broadcast.c
static uint8_t gapRole_AdvertData[B_MAX_ADV_LEN] =
{
0x02, // length of this data
GAP_ADTYPE_FLAGS, // AD Type = Flags
// BR/EDR not supported
GAP_ADTYPE_FLAGS_GENERAL, //it was GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED originaly
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
Have I done it right?
I am using the bluepy module in order to scan for these advertisements but I get them at random intervals instead of 100ms so I'm trying to eliminate possible reasons as to why this happens.
Also the llink to the relevant E2E threads takes me to the developer guide
For simple_broadcaster, it should be located in SimpleBLEBroadcaster_init, typically just below the code you provided.
// Set advertising interval
{
uint16_t advInt = DEFAULT_ADVERTISING_INTERVAL;
GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MIN, advInt);
GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MAX, advInt);
GAP_SetParamValue(TGAP_GEN_DISC_ADV_INT_MIN, advInt);
GAP_SetParamValue(TGAP_GEN_DISC_ADV_INT_MAX, advInt);
}
You can also use Smart RF Sniffer 2 to detect advertisement packets or make assumptions based on the power consumption peaks.
Regards,
Ryan