-Actually i need to update the scan response field for each advertising event during advertising. -say for example- during power on the scan data is 00 so for each adv event of 13ms i need to increment the scan data like 01,02 ... So the scan response data field would advertise dynamic data during advertising till it goes to sleep.
谢谢你mhvid_dialog的详细回复。 Is there any main() where all these functions like adv_start ,adv_stop are called ??Because there exists a confusion where the advertising sequential operation happens !!
And also as you said the value 0xAA should increment automatically .but since it is a macro defined format how to change the values during runtime ??!
app_adv_start() is defined in app.c. It uses the app_adv_func() to build the advertisment command that it finally sends to the the GAP stack. app_adv_start() is called several places. It is called the first time right after the device configuration has completed (app_set_dev_config_complete_func()). It is also called when a central disconnects from the device.
0xaa不会易惯性。您的申请将不得不。
Below is an example of changing the content of advertising dynamically inside the app_adv_func() function. I am using the iBeacon as an example, and I am loading the minor and major keys defined elsewhere into the advertising data string:
Is there any main() where all these functions like adv_start ,adv_stop are called ??Because there exists a confusion where the advertising sequential operation happens !!
And also as you said the value 0xAA should increment automatically .but since it is a macro defined format how to change the values during runtime ??!
我修改了近距离应用程序,以在广告领域进行动态制造数据,并且在SRAM中的调试模式下工作正常。该应用程序将宣传一次并进入睡眠,当我按下按钮K1时,它将再次浏览一次递增的数据并睡觉。这在调试模式下工作正常。现在我在OTP中刻录了同一节目。出现了问题! It is advertising well .but the manufacture data is not incrementing upon wakeup by the K1 !!. So what is the problem here !?? 请你慢慢解释为什么这样的问题出现了???
你好HRG,那不是那么straight forward ... implementing SPOTA afterwards is not possible since that needs to be included within the project build and you arleady burnt OTP. The quickest approach will be to swap with another device (swap out on the board) and i'd recommend to keep everything in development mode until you are completely sure you have the functioanlity you need. Alternatively you can use the BASIC development kit which has a FLASH on board, there you can use the FLASH memory and either permanently use FLASH (and only burn bootlader into OTP for example).
I am using the proximity reporter application as well.
I am UNABLE to update the Manufacturer Specific Data in deep sleep nor debug mode. I get the default manufacturer specific data '?DLG-BLE' every single time.
有人帮忙吗?!
Hello HRG,我会检查this. Please be patient and allow a couple of days.
BR JE_DIALOG.
而且还为什么adv&scan_reesp数据处于这样的格式?#define app_scnrsp_data“\ x09 \ xff \ x00 \ x60 \ x52 \ x57 \ x2d \ x42 \ x4c \ x45”??
除了制造特定数据字段之外还有任何服务数据字段吗?如果有方法如何访问它?
嗨对话小组我们急切地等待响应。
谢谢
Hello hrg, The simplest way to implement a counter would be to implement a counter.
For example : if you want measure 4 advertising events with an advertising interval is set to 700 ms.
- 您必须将计时器设置为2152 ms(13ms * 4 + 700ms * 3)。
注意:1广告需要大约13毫秒+ 1广告间隔,例如700毫秒。
This may not be whollly accurate over a long period of time : how accurate do you want to make this ?
BR JE_DIALOG.
嗨JE_DIALOG谢谢你的回复.Even如果我们使用计时器,我们如何更改扫描数据,因为它被定义为宏,它可以在运行时更改吗?
-Actually i need to update the scan response field for each advertising event during advertising.
-say for example- during power on the scan data is 00 so for each adv event of 13ms i need to increment the scan data like 01,02 ... So the scan response data field would advertise dynamic data during advertising till it goes to sleep.
希望你了解我的问题。
Hi Hrg,
广告扫描响应数据设置在大多数示例项目的函数app_adv_func()中(template_fh是这个的一个很好的例子)。在广告开始之前运行此功能,并且加载到扫描响应和广告数据的内容将在所有将来的广告中使用,直到您停止广告。该功能可以在App_Template_Proj.c中找到。
因此,诀窍是停止广告,使用您更新的数据(计数器或其他)并重新启动广告,重建App_adv_Func()重建广告数据并重新启动广告。如果您使用两个睡眠模式之一,则可以使用计时器或其中一个睡眠挂钩进行停止广告。推荐后一方法。
制造商特定数据使用ADV_DATA类型0xFF。您可以使用定义的值Gap_ad_type_manu_specific_data而不是0xFF。假设您希望将0xAA的计数器值添加到Scan Esponse String。您必须先提供数据的总长度(包括类型)。这是类型的一个字节,以及数据的一个字节,或者为0x02。接下来,您应该提供0xFF,最后是0xAA的一个字节数据。整个字符串将是\ 0x02 \ 0xFF \ 0xAA
我希望这有意义并解决您的要求。
谢谢你mhvid_dialog的详细回复。
Is there any main() where all these functions like adv_start ,adv_stop are called ??Because there exists a confusion where the advertising sequential operation happens !!
And also as you said the value 0xAA should increment automatically .but since it is a macro defined format how to change the values during runtime ??!
Hi hrg,
app_adv_start() is defined in app.c. It uses the app_adv_func() to build the advertisment command that it finally sends to the the GAP stack. app_adv_start() is called several places. It is called the first time right after the device configuration has completed (app_set_dev_config_complete_func()). It is also called when a central disconnects from the device.
0xaa不会易惯性。您的申请将不得不。
Below is an example of changing the content of advertising dynamically inside the app_adv_func() function. I am using the iBeacon as an example, and I am loading the minor and major keys defined elsewhere into the advertising data string:
///////////Code Snippet start
///////////代码片段结束
嗨mhv_dialog,
我可以在写入时更改ADV数据
memcpy(&cmd->info.host.adv_data,&data[0],cmd->info.host.adv_data_len);
so can I switch off NVDS_SUPPORT,
什么剂量的nvds要做什么?
Thanks,
安东尼
嗨mhv_dialog,
为什么来自nvds的dev name和adv数据是可以的,
但是nvds_tag_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))
nvds.c中的扫描响应数据长度是对的,任何其他原因?
Thanks,
安东尼
嗨Antony42,
NVDS是Sysram中的特殊区域,具有特定结构,可以通过OTP报头或使用指定的程序中的指定代码填充。如果成功读取来自NVDS的程序数据,它会从其他值获取来自默认值的NVDS ears的adv数据。
if(nvds_get(nvds_tag_app_ble_adv_data,&cmd-> info.host.adv_data_len,
&cmd-> info.host.addata [0])!= nvds_ok)
谢谢mt_dialog.
嗨mt_dialog,
Thank you very much for your reply,
ADV数据来自NVDS,但扫描响应数据始终来自默认宏,
.nvds_tag_app_ble_scan_resp_data =“\ x09 \ xff \ x00 \ x60 \ x52 \ x57 \ x2d \ x42 \ x4c \ x45”,
.can_resp_data_tag_len = 10,// scan_resp_data
那么可能标出se the nvds_get failed?
Thanks,
安东尼.
嗨antony42,
We will have a look and let you know as soon as we have news on this.
谢谢mt_dialog.
嗨antony42,
似乎在从NVDS获取扫描响应数据的过程中存在错误,这将在未来的SDK发布中修复。
谢谢mt_dialog.
还有一个怀疑从深睡眠中醒来是一个类似于Push Button(如在Proximity_reporter_FH)的中断吗?无论如何在狭窄的时间后睡觉了?
Hello HRG,这里有两个好文件,可以告诉您如何在同步(BLE定时器)和异步(EXT中断)模式下使用睡眠模式。
睡眠模式配置
http://support.dialog-semiconductor.com/system/files/restricted/UM-B-006.pdf
http://support.dialog-semiconductor.com/resource/b-026-external-wake-mechanisms
BR JE_DIALOG.
谢谢je_dialog.!!
另外,请回复这些问题
Is there any main() where all these functions like adv_start ,adv_stop are called ??Because there exists a confusion where the advertising sequential operation happens !!
And also as you said the value 0xAA should increment automatically .but since it is a macro defined format how to change the values during runtime ??!
谢谢
Hi HRG,
Please see my response above.
谢谢Mhv_dialog !!
嗨对话小组
我修改了近距离应用程序,以在广告领域进行动态制造数据,并且在SRAM中的调试模式下工作正常。该应用程序将宣传一次并进入睡眠,当我按下按钮K1时,它将再次浏览一次递增的数据并睡觉。这在调试模式下工作正常。现在我在OTP中刻录了同一节目。出现了问题!
It is advertising well .but the manufacture data is not incrementing upon wakeup by the K1 !!. So what is the problem here !??
请你慢慢解释为什么这样的问题出现了???
Dialog Team why there is no response so far !?
HRG,您使用了什么睡眠模式?请注意,如果您使用深度睡眠,所有SRAM内容都丢失:因此您在SRAM中作为柜台保持的任何东西都将被剥离。SRAM从睡眠中从OTP重新装入OTP。
If you use extended sleep, SRAM is kept alive.
BR JE_DIALOG.
谢谢for the reply JE_dialog .
你是对的 !!我使用了深度睡眠模式(默认情况下,在Proximity报道中,它是深度睡眠模式)。!我也烧掉了OTP!在OTP标题期间,我启用了JTAG.SO,我们可以通过Spota或任何其他方式将其更改为扩展睡眠模式吗?
你好HRG,那不是那么straight forward ... implementing SPOTA afterwards is not possible since that needs to be included within the project build and you arleady burnt OTP. The quickest approach will be to swap with another device (swap out on the board) and i'd recommend to keep everything in development mode until you are completely sure you have the functioanlity you need. Alternatively you can use the BASIC development kit which has a FLASH on board, there you can use the FLASH memory and either permanently use FLASH (and only burn bootlader into OTP for example).
BR JE_DIALOG.
对话小组,
我也可以用你的帮助。我想做同样的事情HRG描述了,但是我正在使用最新版本的SDK,V5.0.3。
I am using the proximity reporter application as well.
I am UNABLE to update the Manufacturer Specific Data in deep sleep nor debug mode. I get the default manufacturer specific data '?DLG-BLE' every single time.
An update to this would be greatly appreciated.
HiJD @ Exp.-Eng,
当您处于开发模式并且您的项目在深睡眠中配置580时,580实际上并没有关闭其Sysram,因此即使您还没有在保留存储区域中保存您的值,您应该能够看到您的值更改扫描响应字符串,如果您实际上更改它们。使用以下命令,在580个示例中的大多数示例中,扫描响应数据通过NVDS加载:
app_easy_gap_adv_read_from_nvds(&cmd-> info.host.scan_rsp_data_len,&cmd-> info.host.scan_rsp_data [0],scan_rsp_data_len,scan_rsp_data_len + 1,
nvds_tag_app_ble_scan_resp_data);在app_easy_gap_undirected_advertise_start_create_msg()函数中。请查看此函数并替换命令
使用您的字符串操作功能。
谢谢mt_dialog.