advertise dynamic scanned data

28 posts / 0 new
最后一篇
HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
advertise dynamic scanned data

HI
我正在使用Proximity Reporter应用程序.i希望添加扫描数据(例如,数字),这将增加每个广告事件。在DA14580中可能会增加?

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
有人帮忙吗?!

有人帮忙吗?!

je_dialog.
Offline
最后一次露面:1个月1周前
职员
加入:2013-12-05 14:02
Hello HRG,我会检查

Hello HRG,我会检查this. Please be patient and allow a couple of days.

BR JE_DIALOG.

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
而且为什么adv&scan

而且还为什么adv&scan_reesp数据处于这样的格式?#define app_scnrsp_data“\ x09 \ xff \ x00 \ x60 \ x52 \ x57 \ x2d \ x42 \ x4c \ x45”??
除了制造特定数据字段之外还有任何服务数据字段吗?如果有方法如何访问它?

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
嗨对话团队我们急切地

嗨对话小组我们急切地等待响应。
谢谢

je_dialog.
Offline
最后一次露面:1个月1周前
职员
加入:2013-12-05 14:02
Hello hrg, The simplest way

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.

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
嗨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.

希望你了解我的问题。

MHv_Dialog
Offline
最后一次露面:2 months 1 week ago
职员
加入:2013-12-06 15:10
Hi Hrg,

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

我希望这有意义并解决您的要求。

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
谢谢你mhvid_dialog的

谢谢你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 ??!

MHv_Dialog
Offline
最后一次露面:2 months 1 week ago
职员
加入:2013-12-06 15:10
Hi hrg,

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

void app_adv_func(struct gapm_start_advertise_cmd *cmd)
{
//开始广告。填充gapm_start_advertise_cmd消息
cmd-> op.code = gapm_adv_non_conn;// Not connectable
cmd->op.addr_src = GAPM_PUBLIC_ADDR;//使用公共地址
cmd->intv_min = APP_ADV_INT_MIN;//最小广告间隔
cmd-> intv_max = app_adv_int_max;//最大广告间隔
cmd->channel_map = APP_ADV_CHMAP;//广告频道(7 =>所有三个使用)
cmd-> info.host.mode = gap_broadcaster_mode;// Broadcast mode (RX never open)
/*-----------------------------------------------------------------------------------
*设置广告数据和扫描响应数据
*---------------------------------------------------------------------------------*/
cmd-> info.host.scan_rsp_data_len = 0;// IBEACON中没有扫描响应
cmd-> info.host.adv_data_len = 27;// IBEACON的标准长度
// Define broadcast advertise data:
UINT8_T数据[27] = {0x1a,0xff,0x4c,0x00,0x02,0x15,// ibeacon
0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,// beacon uuid
0x00,0x00,0x00,0x00,//主要和次要密钥占位符
0xC5}, // Signal Strength at disatance of 1 meter
};
memcpy(&cmd->info.host.adv_data,&data[0],cmd->info.host.adv_data_len);
//将动态生成的主要和次要键加入IBeAcon数据集(两者都有预加载到App_Env环境)
memcpy(&cmd-> info.host.adv_data [22],&app_env.major,2);
memcpy(&cmd-> info.host.adv_data [24],&app_env.minor,2);
返回;
}

///////////代码片段结束

anthony42
Offline
最后一次露面:5年6个月前
加入:2015-07-17 08:21
嗨mhv_dialog,

嗨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,
安东尼

anthony42
Offline
最后一次露面:5年6个月前
加入:2015-07-17 08:21
嗨mhv_dialog,

嗨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,
安东尼

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
嗨Antony42,

嗨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.

anthony42
Offline
最后一次露面:5年6个月前
加入:2015-07-17 08:21
嗨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,
安东尼.

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
嗨antony42,

嗨antony42,

We will have a look and let you know as soon as we have news on this.

谢谢mt_dialog.

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
嗨antony42,

嗨antony42,

似乎在从NVDS获取扫描响应数据的过程中存在错误,这将在未来的SDK发布中修复。

谢谢mt_dialog.

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
Also one more doubt to wake

还有一个怀疑从深睡眠中醒来是一个类似于Push Button(如在Proximity_reporter_FH)的中断吗?无论如何在狭窄的时间后睡觉了?

je_dialog.
Offline
最后一次露面:1个月1周前
职员
加入:2013-12-05 14:02
Hello hrg, there are two good

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.

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
谢谢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 ??!

谢谢

MHv_Dialog
Offline
最后一次露面:2 months 1 week ago
职员
加入:2013-12-06 15:10
Hi HRG,

Hi HRG,

Please see my response above.

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
谢谢Mhv_dialog !!

谢谢Mhv_dialog !!

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
嗨对话小组

嗨对话小组

我修改了近距离应用程序,以在广告领域进行动态制造数据,并且在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.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
Dialog Team why there is no

Dialog Team why there is no response so far !?

je_dialog.
Offline
最后一次露面:1个月1周前
职员
加入:2013-12-05 14:02
HRG,你睡眠模式

HRG,您使用了什么睡眠模式?请注意,如果您使用深度睡眠,所有SRAM内容都丢失:因此您在SRAM中作为柜台保持的任何东西都将被剥离。SRAM从睡眠中从OTP重新装入OTP。

If you use extended sleep, SRAM is kept alive.

BR JE_DIALOG.

HRG.
Offline
最后一次露面:2 years 5 months ago
格鲁鲁
加入:2014-08-05 13:37
谢谢for the reply JE

谢谢for the reply JE_dialog .
你是对的 !!我使用了深度睡眠模式(默认情况下,在Proximity报道中,它是深度睡眠模式)。!我也烧掉了OTP!在OTP标题期间,我启用了JTAG.SO,我们可以通过Spota或任何其他方式将其更改为扩展睡眠模式吗?

je_dialog.
Offline
最后一次露面:1个月1周前
职员
加入:2013-12-05 14:02
你好HRG,那不是那么

你好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.

jd@exp-eng.com.
Offline
最后一次露面:2年7个月前
加入:2014-10-22 04:34
对话小组,

对话小组,

我也可以用你的帮助。我想做同样的事情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.

mt_dialog.
Offline
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
Hi jd@exp-eng,

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.