Hi,
I am new to DA14580 and it's environment. I have purchased BASIC development kit to start with. Can some one please let me know from where I need to start, so that I have good hands on experience in a short time? Like -
1.代码流 - 执行序列I.E如何在main_func()中执行system_init()函数后执行的代码?
2.如果各种BLE参数初始化,如广告间隔,广告类型,广告数据,扫描响应数据等?
3.如何将设备持续宣传并在断开连接后开始通告?
4. How to switch roles from peripheral to central and vice versa?
此外,如果有人可以让我知道我需要按顺序引用的文档列表以了解开发环境。
感谢您的快速回复。
谢谢,
DV.
设备:
嗨dv,
您可以从SDK中的示例开始。您可以查看邻近示例,然后查看鞍骨筒示例(仅限散布配置文件,只是广告字符串操作),那么您可以查看自定义配置文件示例(ble_app_peripheral和ble app_profile)。此外,您还可以检查新的SDK UM-B-050和UM-B-051的文档。最后,您可以在网站上搜索您的大多数问题。
Thanks MT_dialog
Thanks MT_Dialog for your reply!
Actually I am currently following UM-B-015 Software Architecture 7.0 document. Here in section 6, system startup and system initialization sequence is explained with the example of Proximity Reporter. But I think it is not updated, as many of functions they have mentioned in the document is not exist in the application code!! So I am still struggling to find out from where the device advertisement starts and where the advertisement parameters are defined. Can you please help me with that?
如果您可以快速使用来自main_func()的代码执行序列可以快速帮助我会很棒。
此外,我还有基本的开发套件,我将它与Proximity Reporter项目进行编程。因此,我能够在我的Nexus 5手机的BT设置屏幕中发现对话框 - PRXR设备,但我无法使用BLE扫描仪应用程序发现它。为什么会这样?
谢谢,
Dhaval
嗨dv,
由于您使用的是SDK 5唯一可用的文档是我上一篇文章中提到的那个,您正在阅读的文档基于SDK 3.也是未能的执行流程和睡眠机制,我会推荐您检查UM-B-006睡眠模式配置。在Proximity Reporter中,您可以在Line〜98中的User_config.h文件中配置广告。创建数据库后,广告从vifult_app_on_db_ini_complete()一旦创建了数据库,就会开始默认的广告操作。默认的广告操作可以在user_callback_config中配置h。对于main_func检查UM-B-006 to have some insight. About the discovery issued maybe is an application or a device issue, fyi i am able to track the proximity reporter with BLE scanner, have you tried any other application ?
Thanks MT_dialog
嗨mt_dialog,
Thanks for your reply!
因此,除UM-B-050和051之外,SDK 5还没有其他文档,我应该只遵循这些文档来了解环境,对吧?
是的,我试图使用NRF主控制面板(BLE)应用程序发现该设备,但它也无法发现该设备。让我解释你的设置:
1.我与ME有DA14580DEVKT-B套件,它由连接到我的笔记本电脑的USB电缆供电。
2.我在我的Android设备上安装了BLE扫描仪应用程序,该设备具有支持,我能够发现并连接到适用于健身跟踪器等其他BLE的设备。奇怪的是在BT设置上发现了设备'Dialog-PRXR',但没有发现应用程序。雷竞技安卓下载
3.我也尝试过'BLE_APP_PERITELAL'应用程序,但结果相同。
谢谢,
DV.
嗨dv,
就文件而言,这两个是SDK5的唯一一个,但由于它基于SDK3,基本功能或多或少相同。例如,应该读取描述睡眠功能的UM-B-006 Doc以了解睡眠的概念。关于应用程序,您是否雷竞技安卓下载尝试过另一个电话,设备?
Thanks MT_dialog
嗨mt_dialog,
感谢您的回复。
I installed BLE Checker application on my phone, and it says that BLE is supported on my Phone. Another thing is I am able to connect other BLE enabled devices on my phone using BLE scanner application, but I am not even able to discover the device having Proximity Reported firmware. I have tried other applications too like Smart Nudge, but the result is same.
除此之外,我将使用BLE Sniffer嗅探设备发送的数据。该软件的广告数据显示与user_config.h文件中定义的'user_advertise_data'不匹配。为什么会这样?
谢谢,
Dhaval
嗨dv,
You can see the advertising string with a sniffer but you can't with your phone ? I ve checked with BLE Scanner it discovers and connects to the proximity reporter. What is that you see in your sniffer and doesn't match the advertising data ? Have you tried with any other example the ble_app_peripheral perhaps? You should be able to see in the advertising string the mandatory flags 02 01 06 and then the hex values defined in the USER_ADVERTISE_DATA.
Thanks MT_dialog
嗨mt_dialog,
感谢您的回复。现在我能够使用BLE扫描仪应用程序在手机上发现该设备,但是当我尝试与设备连接时,它在建立连接后立即断开连接。这里有什么问题?
Following is the string I am seeing using BLE Sniffer:
02 01 06 - Undefined
09 03 03 18 02 18 04 18 FE - 定义为user_config.h文件中的“user_advertise_data”
0C 09 44 49 41 4C 4F 47 2D 50 52 58 52 - undefined
So can you please let me know where the 'undefined' advertisement data came from?
谢谢,
Dhaval
嗨dv,
前三个字节是指示广告消息02的类型的强制标志 - 下面的数据的长度 - 遵循的数据的广告标记和标志的06值(LE可发现模式和BR / EDR不支持)。其他未定义的字节是您在代码0C中指定的设备的名称是长度,09是完整的本地名称对话框-PRXR的标签。尽管断开连接,请尝试通过使用嗅探器即可检查断开的原因。如果主机正在终止连接。
Thanks MT_dialog
嗨mt_dialog,
Thanks for your reply and sorry for my delayed response on this post.
Now I am able to understand the advertisement data. But what if I want to change the first three bytes value. I mean instead of keeping it 'LE_GENERAL_DISCOVERABL(02)', I want to make it 'LE_LIMITED_DISCOVERABLE(01)'. How can I do that? I tried to find out usage of the respective macro throughout the code, but didn't find it.
此外,可以对可以作为广告数据发送的字节的长度有什么限制?如果是的话,它多少钱?我可以在此广告数据中添加一些自定义详细信息吗?
等待您的回复。
谢谢,
DV.
嗨dv,
为了改变广告旗,你必须设置the correct configuration in your advertising command. You have to set in the gapm_adv_host struct the mode member in GAP_LIM_DISCOVERABLE. This will set the flag in your advertising data. The limitation of the advertising length is 31 bytes but you have to subtract the 3 mandatory AD flags that indicate the length, if the BR/EDR is supported (which is yes since its not supported) and the advertising mode flag.
Thanks MT_dialog
嗨mt_dialog,
感谢您的回复。
我发现'GAPM_ADV_HOST'结构是'GAPM_START_ADVERTERS_CMD结构的一部分。并且在“App.c'文件”文件中定义了多个结构变量。我需要遵循和修改以更新广告标志?
我有很少的疑问,如下所示:
1.在此项目中使用'user_advertise_data'的位置?
2. I want to send two bytes of Manufacturer Specific data along with Advertise Data. So I changed the USER_ADVERTISE_DATA accordingly, but after that I was not able to discover the device. Why is that so? How can I add those extra data?
3.在邻近记者项目中定义了广告间隔在哪里?我想改变同样的事情。
谢谢,
DV.
嗨dv,
广告字符串中的大多数数据由SDK配置在User_Config.h文件中。你想更新什么?如果检查app_easy_gap_undirected_advertise_start_create_msg()函数,则会看到struct gapm_start_advertise_cmd由user_undircted_advertise_conf struct填充。
1. The USER_ADVERTISE_DATA populates the NVDS structure, in the function i mentioned the code will get the data and populate the advertising string.
2.广告字符串的广告数据空间有限,您必须检查广告数据中是否有足够的可用空间。现在,我想你有足够的空间来放置你的数据,你还必须在广告字符串中设置广告数据的大小,如果你想放置几个Etxra,那么近距离记者的当前长度是“0x09”字节(“0x55,0x55”)您必须将长度从“0x09”设置为“0x0b”
3.广告间隔位于.Intv成员中的User_undired_advertise_conf结构中的User_config.h文件中。
Thanks MT_dialog
嗨mt_dialog,
Thanks for your reply and sorry for my delayed response.
作为初学者,我如何知道哪个函数用于启动广告并创建广告数据字符串?它记录在某个地方吗?我如何知道广告是可连接的或不可连接的,是指向还是未定向的?在代码中定义的所有这些?
随着在user_config.h中定义的广告数据中添加了几个字节,我正在相应地更新第一个字节,这表示数据的大小,但仍然不起作用,并且在更改广告数据之后,设备不会发现设备。
谢谢,
DV.
嗨dv,
The only documents regarding SDK 5 are the ones that i ve suggested on my seconds post more specific you can go to the 8.2.3.2 paragraph and check all the callbacks for every operation the SDK is using, you can check the definitions of those functions and see how the advertising is performed.
If you want for example to check what kind of advertising the example it performs please check the .default_operation_adv in the user_callback_config.h file that will lead you to the function that instructs the device to advertise. There is a different function for every kind of advertising you want to execute most of the functions are located in app.c file. for example:
- app_easy_gap_undircated_advertise_start() - 通过调用此功能,您将获得一个无向广告。
- app_easy_gap_dircated_advertise_start()定向广告
- app_easy_gap_non_connectable_advertise_start() - 不可连接的广告
您可以更改user_config.h文件中的广告过程的参数。
据更新广告串,鞍骨牌榜样正在做同样的事情请用它作为参考。
Thanks MT_dialog
Hi
如果可以修改user_device_name,您可以建议吗?
Regards
Nicky
嗨Nicky.Whtsang,
Yes you can change the device's name in the user_config.h file at the USER_DEVICE_NAME definition.
Thanks MT_dialog