Hi,
I am trying the reference design "DA14580_DialogBeacon_3.40.6". I want the ibeacon both send advtisement data and scan response data.
So I made a little change in the reference:
In "app_dialog_beacon_proj.c"
In "app_adv_func" function:
...
// Scan Response Data
#if (NVDS_SUPPORT)
// This line was added by me, so as to read out the response data from NVDS.C
cmd->info.host.scan_rsp_data_len = NVDS_LEN_APP_BLE_SCAN_RESP_DATA; //by zhang 201501
if(nvds_get(NVDS_TAG_APP_BLE_SCAN_RESP_DATA, &cmd->info.host.scan_rsp_data_len,
&cmd->info.host.scan_rsp_data[0]) != NVDS_OK)
#endif //(NVDS_SUPPORT)
...
In debug mode, I could see the content in “cmd”.
cmd->info.host.scan_rsp_data_len was expected.
cmd->info.host.scan_rsp_data also was expected.
But then the program runs, these is no scan response data, even these is no adv data emitted!
Hi,
- In order to change the scan response data, please have a look at in the app_dialog_beacon_proj.h. You will find the following:
#define APP_SCNRSP_DATA "\x02\xFF\x00"
- In order to run the code in the DA14580 from KEIL, you have to do the following stesp:
1) Press the DEBUG Button
2) Press RUN
3) Press the DEBUG Button AGAIN
Having done that, you will see your device advertising.
regards,
DIALOG_TEAM.
Thanks to gl_dialog.
problem sovled.
// Scan Response Data
#if (NVDS_SUPPORT)
if(app_advertise_mode == GAPM_ADV_UNDIRECT) //without it, beacon even not advertise.
{cmd->info.host.scan_rsp_data_len = NVDS_LEN_APP_BLE_SCAN_RESP_DATA; }
if(nvds_get(NVDS_TAG_APP_BLE_SCAN_RESP_DATA, &cmd->info.host.scan_rsp_data_len,
&cmd->info.host.scan_rsp_data[0]) != NVDS_OK)
problem sovled.
// Scan Response Data
#if (NVDS_SUPPORT)
if(app_advertise_mode == GAPM_ADV_UNDIRECT) //without it, beacon even not advertise.
{cmd->info.host.scan_rsp_data_len = NVDS_LEN_APP_BLE_SCAN_RESP_DATA; }
if(nvds_get(NVDS_TAG_APP_BLE_SCAN_RESP_DATA, &cmd->info.host.scan_rsp_data_len,
&cmd->info.host.scan_rsp_data[0]) != NVDS_OK)
Hi,
Using the SW "out of the box", the line:
if (app_advertise_mode == GAPM_ADV_UNDIRECT)
was included.
regards,
DIALOG_TEAM
Hi,
I got similar issue while trying to generate type ADV_SCAN_IND.
According to section 4.7.1 of document 'RW-BLE-GAP-IS', I suppose that the way to make such advertising packet type is to set *non-zero* data to field 'scan_rsp_data' and 'scan_rsp_data_len'.
But it seems that the target device will *crash* after couple packets (1 ~ 2) been generated.
With mode 'GAPM_ADV_UNDIRECT' set to cmd->op.code instead, it work well. (advertising and scan response generated continuously)
Would you help me on finding?
Hi hardy.chen,
You can try this on an empty project, if you define your scan response data and set your device in role GAP_PERIPHERAL_SLV and in non connectable mode you will see the ADV_SCAN_IND, the beacon project is optimized so if you want this configuration on your beacon you will have to comment out the following line in the app_sleep.h file.
if (app_advertise_mode == GAPM_ADV_NON_CONN)
ble_advtim_set(500);
Thanks MT_dialog
Ok! Well noted!
Anyway, I've done implementation of our beacon based on 'empty_peripheral_template' which is not having this issue.
Thanks!