你好,
我对DA14580和它的环境是新的。我已经购买了基本的开发工具包开始。有人能告诉我从哪里开始,这样我就可以在短时间内有很好的实践经验吗?就像-
1.代码流 - 执行序列I.E如何在main_func()中执行system_init()函数后执行的代码?
2.如果各种BLE参数初始化,如广告间隔,广告类型,广告数据,扫描响应数据等?
3.如何将设备持续宣传并在断开连接后开始通告?
4如何将角色从外围设备切换到中心设备,反之亦然?
此外,如果有人可以让我知道我需要按顺序引用的文档列表以了解开发环境。
Appreciate your quick reply.
谢谢,
DV
设备:
嗨dv,
You can start by the examples in the SDK. You can have a look at the proximity example and then to the barebone example (only the diss profile is implemented, just advertising string manipulation) then you can have a look to custom profile examples (ble_app_peripheral and ble app_profile). Also you can check the documents for the new SDK UM-B-050 and UM-B-051. Finally you can search the forum most of the questions you have are allready answered on the site.
谢谢你的对话
感谢您的回复!
实际上,我目前正在遵循UM-B-015软件体系结构7.0文档。这里,在第6节中,用邻近报告器的示例说明系统启动和系统初始化顺序。但是我认为它没有更新,因为他们在文档中提到的许多函数在应用程序代码中都不存在!!因此,我仍在努力找出设备广告从何处开始,广告参数在何处定义。你能帮我一下吗?
如果您可以快速使用来自main_func()的代码执行序列可以快速帮助我会很棒。
Also, I have BASIC development kit and I programmed it with Proximity Reporter project. So I am able discover DIALOG-PRXR device in BT Settings screen of my Nexus 5 phone, but I am not able to discover it using BLE Scanner application. Why is that so?
谢谢,
达瓦尔
嗨dv,
Since you are using the SDK 5 the only available docs are the one i mentioned in my previous post, the docs you are reading are based on SDK 3. Also to undestand the execution flow and the sleeping mechanisms i would recomend you to check UM-B-006 Sleep mode configuration. In the proximity reporter you can configure your advertising in the user_config.h file in line ~98. The advertising begins as soon as the databases are created, meaning the default_app_on_db_ini_complete() will invoke the default advertising operation. The default advertising operation can be configured in the user_callback_config,h. For the main_func check the嗯-B-006来了解一下。关于发布的发现可能是应用程序或设备问题,仅供参考,我可以用BLE扫描仪跟踪邻近报告器,您尝试过其他应用程序吗?
谢谢你的对话
嗨mt_dialog,
谢谢你的回复!
So, there is no other document for SDK 5 except UM-B-050 and 051 and I should follow only those document to understand the environment, right?
是的,我试图使用NRF主控制面板(BLE)应用程序发现该设备,但它也无法发现该设备。让我解释你的设置:
1.我与ME有DA14580DEVKT-B套件,它由连接到我的笔记本电脑的USB电缆供电。
2. I installed BLE Scanner application on my android device which has support of BLE and I am able to discover and connect to other BLE enabled devices like fitness tracker. The strange thing is the device 'DIALOG-PRXR' is discovered on BT Settings, but it is not discovered with the applications.
3. I also tried with 'ble_app_peripheral' application, but same result.
谢谢,
DV
嗨dv,
As far as the documents is concern yes, those two are the only ones for the SDK5 but since it is based on SDK3 the basic functionallity is more or less the same. For instance the UM-B-006 doc which describes the sleeping functionallity should be read in order to understand the concept of sleep. About the applications, have you tried with another phone, device?
谢谢你的对话
嗨mt_dialog,
感谢您的回复。
我在手机上安装了BLE-Checker应用程序,它说我的手机支持BLE。另一件事是,我可以连接到我的手机上使用BLE扫描仪应用程序的其他BLE设备,但我甚至无法发现设备有接近报告固件。我也尝试过其他应用程序,比如智能推送,但结果是一样的。雷竞技安卓下载
Apart from that, I sniffed the data send by the device using BLE sniffer. The advertisement data shows by that software is not matching with the 'USER_ADVERTISE_DATA' defined in user_config.h file. Why is that so?
谢谢,
达瓦尔
嗨dv,
你可以用嗅探器看到广告串,但用手机看不到?我已经检查了BLE扫描仪,它发现并连接到接近记者。你在嗅探器里看到的和广告数据不符的是什么?你有没有试过其他的例子,比如ble\u app\u外设?您应该能够在播发字符串中看到强制标志02 01 06,然后是在用户\u播发\u数据中定义的十六进制值。
谢谢你的对话
嗨mt_dialog,
感谢您的回复。现在我能够使用BLE扫描仪应用程序在手机上发现该设备,但是当我尝试与设备连接时,它在建立连接后立即断开连接。这里有什么问题?
下面是我使用BLE嗅探器看到的字符串:
02 01 06-未定义
09 03 03 18 02 18 04 18 F5 FE - defined as 'USER_ADVERTISE_DATA' in user_config.h file
0C 09 44 49 41 4C 4F 47 2D 50 52 58 52-未定义
那么你能告诉我“未定义”的广告数据是从哪里来的吗?
谢谢,
达瓦尔
嗨dv,
The first three bytes are the mandatory flags that indicate the type of the advertising message 02 - the length of the data that follows 01 - the AD tag of the data that follows and 06 - value of the flag (LE Discoverable mode and BR/EDR Not supported). The other undefined bytes is the name of your device as you specified it in your code 0C is the length and 09 is the tag for the complete local name DIALOG-PRXR. As far as the disconnection please try to check the reason of disconnection by using your sniffer i.e maybe the host is terminating the connection.
谢谢你的对话
嗨mt_dialog,
谢谢你的回复,很抱歉我在这个帖子上的回复被耽搁了。
现在我能理解广告数据了。但是如果我想改变前三个字节的值呢。我的意思是,与其保留“leu GENERAL\u DISCOVERABL(02)”,不如让它成为“leu LIMITED\u DISCOVERABLE(01)”。我该怎么做?我试图在整个代码中找出相应宏的用法,但没有找到。
此外,可以对可以作为广告数据发送的字节的长度有什么限制?如果是的话,它多少钱?我可以在此广告数据中添加一些自定义详细信息吗?
等待您的回复。
谢谢,
DV
嗨dv,
要更改广告标志,必须在广告命令中设置正确的配置。您必须在gapm\u adv\u host结构中设置GAP\u LIM\u DISCOVERABLE中的模式成员。这将在您的广告数据中设置标志。广告长度的限制是31字节,但是如果支持BR/EDR(因为不支持它,所以是yes)和广告模式标志,则必须减去指示长度的3个强制广告标志。
谢谢你的对话
您好!MT\u对话框,
感谢您的回复。
I found that 'gapm_adv_host' structure is a part of 'gapm_start_advertise_cmd' structure. And there are multiple structure variable defined in the 'app.c' file of Proximity Reporter project. Which I need to follow and modify to update the AD flags?
我有很少的疑问,如下所示:
1.在此项目中使用'user_advertise_data'的位置?
2我想发送两个字节的特定于制造商的数据以及广告数据。因此,我相应地更改了用户数据,但之后就无法发现设备。为什么会这样?如何添加这些额外数据?
3. Where is the advertising interval is defined in Proximity Reporter project? I want to change the same.
谢谢,
DV
嗨dv,
Most of the data in the advertising string are configured by the SDK in the user_config.h file. What is that you want to update ? If you check the app_easy_gap_undirected_advertise_start_create_msg() function you will see that the struct gapm_start_advertise_cmd is populated by the user_undirected_advertise_conf struct.
1用户\u advertive \u DATA填充NVDS结构,在我提到的函数中,代码将获取数据并填充广告字符串。
2.广告字符串的广告数据空间有限,您必须检查广告数据中是否有足够的可用空间。现在,我想你有足够的空间来放置你的数据,你还必须在广告字符串中设置广告数据的大小,如果你想放置几个Etxra,那么近距离记者的当前长度是“0x09”字节(“0x55,0x55”)您必须将长度从“0x09”设置为“0x0b”
3.广告间隔位于.Intv成员中的User_undired_advertise_conf结构中的User_config.h文件中。
谢谢你的对话
您好!MT\u对话框,
谢谢你的回复,很抱歉我迟了回复。
作为初学者,我如何知道哪个函数用于启动广告并创建广告数据字符串?它记录在某个地方吗?我如何知道广告是可连接的或不可连接的,是指向还是未定向的?在代码中定义的所有这些?
Along with adding few bytes in advertisement data, defined in user_config.h, I was updating the first byte accordingly, which indicates the size of the data, but still it is not working and device was not discoverable after changing the advertisement data.
谢谢,
DV
嗨dv,
关于sdk5的文档只有我在第二篇文章中建议的那些。更具体地说,您可以转到8.2.3.2段,检查SDK正在使用的每个操作的所有回调,您可以检查这些函数的定义,并查看广告是如何执行的。
例如,如果您想检查该示例执行哪种播发,请检查user\u callback\u config.h文件中的.default\u operation\u adv,该文件将引导您找到指示设备播发的函数。有一个不同的功能为每种广告你想执行的大多数功能都位于app.c文件。例如:
- app_easy_gap_undirected_advertise_start() - by invoking this function you will get an undirected advertising.
- app_easy_gap_directed_advertise_start() directed advertising
————app_easy_gap_non_connectable_advertise_start ()non - connectable advertising
You can change the parameters of the advertising procedures in the user_config.h files.
据更新广告串,鞍骨牌榜样正在做同样的事情请用它作为参考。
谢谢你的对话
您好!
如果可以修改user_device_name,您可以建议吗?
当做
尼基
嗨Nicky.Whtsang,
是的,您可以在user\u device\u name定义中更改user\u config.h文件中的设备名称。
谢谢你的对话