These seems a bug in "DA14580_DialogBeacon_3.40.6" reference designs

9 posts / 0 new
Last post
iamadog3333
Offline
Last seen: 5 years 4 months ago
Joined: 2014-07-30 03:56
These seems a bug in "DA14580_DialogBeacon_3.40.6" reference designs

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!

gl_dialog
Offline
Last seen: 3 years 1 month ago
Staff
Joined: 2014-02-07 13:35
Hi,

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.

 

iamadog3333
Offline
Last seen: 5 years 4 months ago
Joined: 2014-07-30 03:56
Thanks to gl_dialog.

Thanks to gl_dialog.

iamadog3333
Offline
Last seen: 5 years 4 months ago
Joined: 2014-07-30 03:56
problem sovled.

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)

iamadog3333
Offline
Last seen: 5 years 4 months ago
Joined: 2014-07-30 03:56
problem sovled.

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)

gl_dialog
Offline
Last seen: 3 years 1 month ago
Staff
Joined: 2014-02-07 13:35
Hi,

Hi,

Using the SW "out of the box", the line:

    if (app_advertise_mode == GAPM_ADV_UNDIRECT)

 

was included.

regards,

DIALOG_TEAM

 

hardy.chen
Offline
Last seen: 1 year 5 months ago
Joined: 2015-03-13 04:20
Hi,

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?

MT_dialog
Offline
Last seen: 2 weeks 3 days ago
Staff
Joined: 2015-06-08 11:34
Hi hardy.chen,

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

hardy.chen
Offline
Last seen: 1 year 5 months ago
Joined: 2015-03-13 04:20
Ok! Well noted!

Ok! Well noted!

Anyway, I've done implementation of our beacon based on 'empty_peripheral_template' which is not having this issue.

Thanks!

Topic locked