你好,
我是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.
谢谢mt_dialog.
谢谢mt_dialog为您的回复!
实际上我目前关注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 theUM-B-006有一些洞察力。关于发现的发现可能是一个应用程序或设备问题,Fyi我能够用BLE扫描仪跟踪Proximity Reporter,您是否尝试过任何其他应用程序?
谢谢mt_dialog.
嗨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.
嗨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_APP_PERITWAL可能?您应该能够在广告字符串中看到强制标志02 01 06,然后在user_advertise_data中定义的十六进制值。
谢谢mt_dialog.
嗨mt_dialog,
感谢您的回复。现在我能够使用BLE扫描仪应用程序在手机上发现该设备,但是当我尝试与设备连接时,它在建立连接后立即断开连接。这里有什么问题?
以下是我使用BLE Sniffer看到的字符串:
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.
嗨mt_dialog,
感谢您的回复,抱歉我对这篇文章的延迟回复。
现在我能够了解广告数据。但是,如果我想改变前三个字节值,呢?我的意思是不是保持它'le_general_discoverablaplapl(02)',我想使它成为'le_limited_discoverable(01)'。我怎样才能做到这一点?我试图在整个代码中找到各个宏的用法,但没有找到它。
此外,可以对可以作为广告数据发送的字节的长度有什么限制?如果是的话,它多少钱?我可以在此广告数据中添加一些自定义详细信息吗?
等待您的回复。
谢谢,
DV
嗨dv,
为了更改广告标志,您必须在广告命令中设置正确的配置。您必须在GAPM_ADV_HOST结构中设置GAP_LIM_DISCOVERABLE中的模式成员。这将在广告数据中设置标志。广告长度的限制为31个字节,但如果支持BR / EDR(由于不支持的是是的)和广告模式标志,则必须减去指示长度的3个强制性广告标志。
谢谢mt_dialog.
你好mt_dialog.,
感谢您的回复。
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.我想发送两个字节的制造商特定数据以及广告数据。所以我相应地更改了user_advertise_data,但在此之后我无法发现该设备。为什么会这样?如何添加那些额外的数据?
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. user_advertise_data填充了NVDS结构,在该功能中我提到的代码将获取数据并填充广告字符串。
2.广告字符串的广告数据空间有限,您必须检查广告数据中是否有足够的可用空间。现在,我想你有足够的空间来放置你的数据,你还必须在广告字符串中设置广告数据的大小,如果你想放置几个Etxra,那么近距离记者的当前长度是“0x09”字节(“0x55,0x55”)您必须将长度从“0x09”设置为“0x0b”
3.广告间隔位于.Intv成员中的User_undired_advertise_conf结构中的User_config.h文件中。
谢谢mt_dialog.
你好mt_dialog.,
感谢您的回复,抱歉我的延迟回复。
作为初学者,我如何知道哪个函数用于启动广告并创建广告数据字符串?它记录在某个地方吗?我如何知道广告是可连接的或不可连接的,是指向还是未定向的?在代码中定义的所有这些?
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,
关于SDK 5的唯一文件是我在秒表上建议的那些,您可以更具体地查看8.2.3.2段并检查每个操作SDK正在使用的每个操作的回调,您可以检查这些功能的定义和看看如何执行广告。
如果例如,请检查它执行的示例的广告的类型,请查看user_callback_config.h文件中的.default_operation_adv.h文件,该文件将导致您指示设备通告的功能。对于要执行的大多数函数,都有一个不同的函数,所以所有类型的函数都位于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.
据更新广告串,鞍骨牌榜样正在做同样的事情请用它作为参考。
谢谢mt_dialog.
你好
如果可以修改user_device_name,您可以建议吗?
问候
尼基
嗨Nicky.Whtsang,
是的,您可以在User_device_name定义中更改user_config.h文件中的设备名称。
谢谢mt_dialog.