广告动态扫描数据

28篇帖子/ 0新
Last post
hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
广告动态扫描数据

你好
am using the proximity reporter application .I want to add a scanned data(eg number) which will increment for each advertising event .is it possible in DA14580 ?

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
有人能帮忙吗? !

有人能帮忙吗? !

JE_Dialog
离线
Last seen:1 month 1 week ago
Staff
Joined:2013-12-05 14:02
Hello hrg, i will check into

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

BR JE_Dialog

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
为什么要用adv&scan

为什么要用adv&scan_resp data is in such a format ?? #define APP_SCNRSP_DATA "\x09\xFF\x00\x60\x52\x57\x2D\x42\x4C\x45" ??
is there any service data field in addition to manufacture specific data field ?if there how to access it ?

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
嗨,对话小组,我们热切期待

嗨,对话小组,我们热切期待waiting for the response asap .
Thankyou

JE_Dialog
离线
Last seen:1 month 1 week ago
Staff
Joined:2013-12-05 14:02
hello hrg,最简单的方式

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

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

- You will have to set the timer to a 2152 ms (13ms *4 + 700ms *3).
注:1个广告大约需要13ms+1个广告间隔,例如700ms。

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

BR JE_Dialog

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
你好JE_Dialog thankyou for

您好,谢谢您的回复。即使我们使用定时器,我们如何更改扫描数据,因为它被定义为宏,它会在运行时被更改吗??

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

Hope you understood my question.

mhv_dialog
离线
Last seen:2个月1周前
Staff
Joined:2013-12-06 15:10
嗨HRG,

嗨HRG,

在我们大多数示例项目的函数app\u adv\u func()中设置了扫描响应数据的广告(template\u fh就是一个很好的例子)。此功能在播发开始前运行一次,加载到扫描响应和播发数据中的内容将在以后的所有播发中使用,直到停止播发为止。这个函数可以在app\u template\u proj.c中找到。

So the trick is to stop advertising, rebuild the advertising data using the app_adv_func() with your updated data (counter or whatever) and restart advertising. Stopping advertising can be done with a timer or with one of the sleep hooks if you use one of the two sleep modes. The latter method is recommended.

特定于制造商的数据使用adv\u数据类型0xFF。您可以使用定义的值GAP\u AD\u TYPE\u MANU\u SPECIFIC\u DATA而不是0xFF。假设您想将计数器值0xAA添加到扫描响应字符串中。您必须首先提供数据的总长度(包括类型)。一个字节表示类型,一个字节表示数据,即0x02。接下来,您应该提供0xFF类型,最后提供0xAA的单字节数据。整个字符串将是\0x02\0xFF\0xAA

I hope this makes sense and addresses your request.

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
Thankyou mhvid_dialog for the

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

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

mhv_dialog
离线
Last seen:2个月1周前
Staff
Joined: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 doesn't increment austomatically. Your application would have to that.

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

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

void app_adv_func(struct gapm_start_advertise_cmd * cmd)
{
// Start advertising. Fill GAPM_START_ADVERTISE_CMD message
cmd->op.code = GAPM_ADV_NON_CONN;//不可连接
cmd-> op.addr_src = gapm_public_addr;// Using a public Address
cmd-> intv_min = app_adv_int_min;//最小广告间隔
cmd->intv\u max=APP\u ADV\u INT\u max;// Maximum advertising interval
cmd-> channel_map = app_adv_chmap;// Advertising channels (7 => all threee used)
cmd->info.host.mode = GAP_BROADCASTER_MODE;//广播模式(RX从不打开)
/ * ------------------------------------------------------------------------
* Set the Advertising Data and the Scan Response Data
* ------------------------------------------------------------------------ * /
cmd-> info.host.scan_rsp_data_len = 0;// IBEACON中没有扫描响应
cmd->info.host.adv\u data\u len=27;//iBeacon的标准长度
//定义广播宣传数据:
uint8\u 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,0x58,0x58,//信标UUID
0x00,0x00,0x00,0x00, // Major and minor key placeholders
0xC5},//呈现1米的信号强度
};
memcpy(&cmd-> info.host.addata和数据[0],cmd-> info.host.adv_data_len);
// Load dynamically generated Major and Minor keys into iBeacon data set (Both previeously loaded into app_env environment)
memcpy(&cmd->info.host.adv_data[22],&app_env.major,2);
memcpy(&cmd->info.host.adv\u data[24],&app\u env.minor,2);
return;
}

///////////Code Snippet end

安东尼42.
离线
Last seen:5年6个月前
Joined:2015-07-17 08:21
嗨,MHv\U对话,

嗨,MHv\U对话,

我可以像你写的那样修改adv数据
memcpy(&cmd-> info.host.addata和数据[0],cmd-> info.host.adv_data_len);
所以我可以关闭nvds_support,
那么NVDS设计要做什么呢?

谢谢,
安东尼

安东尼42.
离线
Last seen:5年6个月前
Joined:2015-07-17 08:21
嗨,MHv\U对话,

嗨,MHv\U对话,

why the dev name and adv data from nvds is ok,
但是NVDS标签应用程序扫描响应数据不正常
(如果(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中的扫描响应数据长度是正确的,还有其他原因吗?

谢谢,
安东尼

MT_dialog
离线
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
嗨,安东尼42,

嗨,安东尼42,

NVDS是系统内存中的一个特殊区域,具有特定的结构,可以通过OTP头或使用程序中指定的代码来填充。如果从NVDS读取数据的过程成功,它将从NVDS获取adv数据,否则它将从默认值获取数据。

if(nvds\u get(nvds\u TAG\u APP\u BLE\u ADV\u DATA,&cmd->info.host.ADV\u DATA\u len,
&cmd->info.host.adv_data[0]) != NVDS_OK)

Thanks MT_dialog

安东尼42.
离线
Last seen:5年6个月前
Joined:2015-07-17 08:21
你好MT_dialog,

你好MT_dialog,

非常感谢您的回复,
adv数据来自nvds,但扫描响应数据始终来自默认宏,
.NVDS_TAG_APP_BLE_SCAN_RESP_DATA = "\x09\xFF\x00\x60\x52\x57\x2D\x42\x4C\x45",
.SCAN\u RESP\u DATA\u TAG\u LEN=10,//扫描\u RESP\u数据
那么可能导致nvds_get失败了什么?

谢谢,
安东尼。

MT_dialog
离线
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
嗨Antony42,

嗨Antony42,

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

Thanks MT_dialog

MT_dialog
离线
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
嗨Antony42,

嗨Antony42,

It seems that there is a bug in the procedure for fetching the scan response data from the nvds, this will be fixed in the future release of the SDK.

Thanks MT_dialog

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
还有一个疑问醒来

还有一个疑问醒来up from deep sleep is an interrupt like push buttton (as of in proximity_reporter_fh) mandatory ? is there anyway to wake from sleep after some confined period ??

JE_Dialog
离线
Last seen:1 month 1 week ago
Staff
Joined:2013-12-05 14:02
你好HRG,有两个好

你好HRG,有两个好documents here that will tell you how to use the sleep mode in synchronous (ble timer) and asynchronous (ext interrupt) mode.

Sleep mode configuration

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
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
谢谢你je_dialog !!

谢谢你je_dialog !!
also please respond to these questions also

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

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

Thankyou

mhv_dialog
离线
Last seen:2个月1周前
Staff
Joined:2013-12-06 15:10
嗨HRG,

嗨HRG,

请看我上面的回复。

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
谢谢你mhv_dialog !!

谢谢你mhv_dialog !!

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
你好Dialog team

你好Dialog team

I modified the proximity application to advertise dynamic manufacture data in advertising field and it was working fine in debugging mode in SRAM. The app will advertise once and goes to sleep and when i press the button K1 it will advertise again with incremented data once and goes to sleep.This was working fine in debugging mode. Now i burned the same program in OTP.The problem arised !!
它是广告良好的。但是制造数据在K1的唤醒时不会递增!!那么这里的问题是什么!??
Could you please asap explain why such problem arise ???

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
对话团队为什么没有

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

JE_Dialog
离线
Last seen:1 month 1 week ago
Staff
Joined:2013-12-05 14:02
hrg, what sleep mode do you

hrg, what sleep mode do you use ? note that if you use Deep Sleep, all SRAM contents are lost : so anything you keep as a counter in SRAM will be disapear. SRAM is re-loaded from OTP on wake from deep sleep.

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

BR JE_Dialog

hrg
离线
Last seen:2年5个月前
上师
Joined:2014-08-05 13:37
谢谢你的回复je

谢谢你的回复je_dialog。
You are right !! i used deep sleep mode (by default in proximity reporter_fh it was deep sleep mode).! I burned the otp too ! during OTP header i have enabled Jtag.So is can we change it to extended sleep mode through Spota or any other way ??

JE_Dialog
离线
Last seen:1 month 1 week ago
Staff
Joined:2013-12-05 14:02
Hello hrg, thats not so

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

BR JE_Dialog

jd@exp-eng.com
离线
Last seen:2 years 7 months ago
Joined:2014-10-22 04:34
Dialog team,

Dialog team,

I could use your help on this as well. I would like to do the same thing hrg described, however I am using the latest version of the SDK, V5.0.3.

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

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

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

MT_dialog
离线
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
嗨JD @ Exp-Eng,

你好jd@exp-eng,

When you are in development mode and your project is configured in deep sleep the 580 doesn't actually turns off its sysram so, even if you haven't saved your values in a retention memory area you should be able to see your values changing over the scan response string, if you are actually changing them. The scan response data is loaded through the NVDS in most of the 580 examples using the below command:

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); in the app_easy_gap_undirected_advertise_start_create_msg() function. Please have a look at this function and replace the command
使用字符串操作函数。

Thanks MT_dialog