广告动态扫描数据

28篇帖子/ 0新
最后一篇
HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
广告动态扫描数据

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

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
有人帮忙吗?!

有人帮忙吗?!

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

你好HRG,我会检查一下。请耐心等待几天。

BR JE_DIALOG.

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
And also why the adv & scan

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

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
你好Dialog team we are eagerly

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

je_dialog
离线
最后一次露面:1个月1周前
职员
加入:2013-12-05 14:02
hello hrg,最简单的方式

Hello HRG,实现计数器的最简单方法是实现计数器。

例如:如果您想要测量具有广告间隔的4个广告活动,则设置为700毫秒。

- 您必须将计时器设置为2152 ms(13ms * 4 + 700ms * 3)。
Note: 1 advertising takes about 13ms + 1 advertising interval which is for example 700 ms.

这可能在很长一段时间内不准确:你想要做什么准确的?

BR JE_DIALOG.

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
嗨je_dialog谢谢你

嗨je_dialog谢谢你your reply .Even if we use timer ,how can we change the scan data since it is defined as macro ,will it can be changed during runtime ??

- 即可在广告期间,我需要更新每个广告活动的扫描响应字段。
- 例如 - 在扫描数据上的电源期间,对于13ms的每个adv事件,我需要将扫描数据递增01,02 ...所以扫描响应数据字段将在广告期间宣传动态数据,直到它进入睡觉。

希望你了解我的问题。

mhv_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2013-12-06 15:10
嗨HRG,

嗨HRG,

The advertising an scan response data is set in the function app_adv_func() of most of our sample projects (template_fh is a good example of this). This function is run once before advertisement starts and the content loaded into scan response and advertisement data will be used in all future advertisements until you stop advertising. the function can be found in app_template_proj.c.

因此,诀窍是停止广告,使用您更新的数据(计数器或其他)并重新启动广告,重建App_adv_Func()重建广告数据并重新启动广告。如果您使用两个睡眠模式之一,则可以使用计时器或其中一个睡眠挂钩进行停止广告。推荐后一方法。

Manufacturer specific data uses the adv_data type 0xFF. You can use the defined value GAP_AD_TYPE_MANU_SPECIFIC_DATA instead of 0xFF. Let's say you want to add the counter value of 0xAA to your scan esponse string. You would have to provide first the total length of your data (including the type). This is one byte for the type and one byte for the data, or 0x02. Next, you should provide the type 0xFF and finally your one byte data of 0xAA. The entire string would be \0x02\0xFF\0xAA

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

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
谢谢你mhvid_dialog的

谢谢你mhvid_dialog的详细回复。
是否有任何main(),如adv_start,adv_stop等所有这些函数都被调用??因为存在恰好广告顺序操作的混淆!

而且您所说的值0xAA应该自动增量。但是由于它是一种宏定义的格式,如何在运行时更改值??!

mhv_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2013-12-06 15:10
嗨HRG,

嗨HRG,

app_adv_start()在app.c.中定义。它使用app_adv_func()来构建它最终发送到GAP堆栈的广告命令。app_adv_start()称为几个位置。它在设备配置完成后第一次调用(app_set_dev_config_complete_func())。当中央断开设备时也调用它。

0xaa不会易惯性。您的申请将不得不。

以下是在App_adv_func()函数中动态更改广告内容的示例。我用ibeacon为例,我正在加载在广告数据字符串中定义的次要密钥:

////////////代码片段开始

void app_adv_func(struct gapm_start_advertise_cmd * cmd)
{
//开始广告。填充gapm_start_advertise_cmd消息
cmd-> op.code = gapm_adv_non_conn;//不可连接
cmd-> op.addr_src = gapm_public_addr;//使用公共地址
cmd-> intv_min = app_adv_int_min;// Minimum advertising interval
cmd->intv_max = APP_ADV_INT_MAX;//最大广告间隔
cmd-> channel_map = app_adv_chmap;//广告频道(7 =>所有三个使用)
cmd-> info.host.mode = gap_broadcaster_mode;//广播模式(RX从不打开)
/ * ------------------------------------------------------------------------
*设置广告数据和扫描响应数据
* ------------------------------------------------------------------------ * /
cmd-> info.host.scan_rsp_data_len = 0;// IBEACON中没有扫描响应
cmd->info.host.adv_data_len = 27;// Standard length of an iBeacon
//定义广播宣传数据:
uint8_t data[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},//呈现1米的信号强度
};
memcpy(&cmd-> info.host.addata和数据[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);
返回;
}

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

安东尼42.
离线
最后一次露面:5 years 6 months ago
加入:2015-07-17 08:21
你好MHv_dialog,

你好MHv_dialog,

I can change the adv data as you wrote
memcpy(&cmd-> info.host.addata和数据[0],cmd-> info.host.adv_data_len);
所以我可以关闭nvds_support,
and what dose NVDS disigned to do?

谢谢,
Anthony

安东尼42.
离线
最后一次露面:5 years 6 months ago
加入:2015-07-17 08:21
你好MHv_dialog,

你好MHv_dialog,

为什么来自nvds的dev name和adv数据是可以的,
but NVDS_TAG_APP_BLE_SCAN_RESP_DATA not ok
(如果(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))
the scan response data length in nvds.c is right, any other reason?

谢谢,
Anthony

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

你好Antony42,

The NVDS is a special area in the SYSRAM with a specific structure which can be populated either by the OTP header or by using the specified code in program. If the procedure reading data from NVDS is succeeded it gets the adv data from the NVDS else it gets the data from the default values.

if(nvds_get(NVDS_TAG_APP_BLE_ADV_DATA, &cmd->info.host.adv_data_len,
&cmd-> info.host.addata [0])!= nvds_ok)

谢谢mt_dialog.

安东尼42.
离线
最后一次露面:5 years 6 months ago
加入:2015-07-17 08:21
嗨mt_dialog,

嗨mt_dialog,

非常感谢您的回复,
the adv data is from nvds,but the scan response data is always from the default macro,
.nvds_tag_app_ble_scan_resp_data =“\ x09 \ xff \ x00 \ x60 \ x52 \ x57 \ x2d \ x42 \ x4c \ x45”,
.SCAN_RESP_DATA_TAG_LEN = 10, // SCAN_RESP_DATA
那么可能导致nvds_get失败了什么?

谢谢,
安东尼。

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

嗨Antony42,

我们会看看,并在我们有新闻时立即通知您。

谢谢mt_dialog.

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

嗨Antony42,

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

谢谢mt_dialog.

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
还有一个疑问醒来

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

je_dialog
离线
最后一次露面:1个月1周前
职员
加入:2013-12-05 14:02
你好HRG,有两个好

Hello HRG,这里有两个好文件,可以告诉您如何在同步(BLE定时器)和异步(EXT中断)模式下使用睡眠模式。

睡眠模式配置

http://support.dialog-seminile.com/system/files/restricted/um-b-006.pdf.

http://support.dialog-seminiondiondiondiond.com/resource/b-026-external-wake-mechanisms.

BR JE_DIALOG.

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
谢谢你je_dialog !!

谢谢你je_dialog !!
另外,请回复这些问题

是否有任何main(),如adv_start,adv_stop等所有这些函数都被调用??因为存在恰好广告顺序操作的混淆!

而且您所说的值0xAA应该自动增量。但是由于它是一种宏定义的格式,如何在运行时更改值??!

谢谢

mhv_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2013-12-06 15:10
嗨HRG,

嗨HRG,

请看我上面的回复。

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
谢谢你mhv_dialog !!

谢谢你mhv_dialog !!

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
嗨对话小组

嗨对话小组

我修改了近距离应用程序,以在广告领域进行动态制造数据,并且在SRAM中的调试模式下工作正常。该应用程序将宣传一次并进入睡眠,当我按下按钮K1时,它将再次浏览一次递增的数据并睡觉。这在调试模式下工作正常。现在我在OTP中刻录了同一节目。出现了问题!
它是广告良好的。但是制造数据在K1的唤醒时不会递增!!那么这里的问题是什么!??
请你慢慢解释为什么这样的问题出现了???

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
对话团队为什么没有

对话团队为什么到目前为止没有回复!?

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

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

如果使用延长睡眠,SRAM保持活力。

BR JE_DIALOG.

HRG.
离线
最后一次露面:2年5个月前
Guru
加入:2014-08-05 13:37
谢谢你的回复je

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

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

你好HRG,那不是那么直的......之后实施Spota是不可能的,因为需要包括在项目构建和你的Arleady Burnt OTP中。最快的方法将与另一个设备(在电路板上交换)交换,我建议将所有内容保存在开发模式中,直到您完全确定您需要您需要的功能。或者,您可以使用闪存板上的基本开发套件,您可以使用闪存,永久使用闪存(并且只为OTP刻录Bootlader)。

BR JE_DIALOG.

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

对话小组,

我也可以用你的帮助。我想做同样的事情HRG描述了,但是我正在使用最新版本的SDK,V5.0.3。

我也在使用Proximity Reporter应用程序。

我无法在深睡眠中更新制造商的特定数据,也不是调试模式。我每一次获得默认制造商特定数据'dlg-ble'。

将极大地欣赏到这一点的更新。

mt_dialog.
离线
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
嗨JD @ Exp-Eng,

你好JD @ 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()函数中。请查看此函数并替换命令
with your string manipulation function.

谢谢mt_dialog.