Hi,
My customer is using a DA14580 module from Murata.
It is connected it to their micro via uart.
They want to transfer data from their system to a tablet which contains their own application via ble.
their system is sending data over the BLE (set as device) to a tablet as the data receiver.
The problem is that the tablet can't connect to the DA14580 device with the following error: "can not connect to device"
请注意,尝试使用中央模式连接到DA14580EVKIT时,安装工作正常。
Please explain the problem and how they can solve it.
Regards
担
TRITECH
Device:
Hi Bendaa,
由于DSPS它是一个完全托管的代码,外部微型刚刚通过UART发送数据,因此我无法看到这种情况发生的任何明显的原因 - 如果我理解系统的实现,则会通过uart发送数据。所以我想通过580确立的连接,我假设在外部微型开始发送数据时会发生断开连接。所以要开始,请尝试不要通过UART发送数据并检查系统的行为方式。还要在断开连接后,580可以再次宣传吗?如果是,请尝试检查断开连接处理程序中的断开连接原因。
谢谢mt_dialog.
hello
我是Bendaa的客户。
we have the 580 which is connected to our micro via uart.
we want to transfer data via ble to our app in a tablet, but it can seem to connect as seen in the pic attached
请告知要将580连接到平板电脑应用程序需要做些什么
请注意,使用DSPS应用程序,580是ABE连接,我们在DSP应用控制台中查看了我们的数据。
Hi roinovi,
Thats a more accurate problem description, the custom android application seems to require to bond with the 580, so it starts a paring procedure, the DSPS application doesn't implement security, and the DSPS anroid application doesn't require any security from the 580 in order to connect. So i suppose, that the custom android application initiates a security procedure but the 580 never gives a response and the link is dropped.
谢谢mt_dialog.
Hi
The pic attached is from our attempt to connect the 580 to the android tablet in :settings-bluetooth
Its before we activated the app
We even tried to connect it to a regular android phone, in the bluetooth devices, just like you connect your phone to a regular bl device, like an earset for example
我们需要在DSPS_DEVICE中更改什么,以便它连接?
Hi roinovi,
这同样适用于Android,它需要安全性才能配对您的设备。您可以通过在DA1458x_confg_basic.h文件中定义CFG_APP_Security来添加DSP参考设计中的安全性,您将能够与设备连接和配对,但您无法保持连接到Android。一旦设备获得配对,Android将从设备断开连接,因为它没有理由保持联系。但是,如果您尝试连接到任何通用Android应用程序,例如,BLE扫描仪例如您将能够正常连接和绑定和交换数据。
谢谢mt_dialog.
hello
你说
"but you are not going to be able to stay connected to the android. The android disconnects from the device as soon as the device gets paired, since it has no reason to stay connected."
why will it disconnect?
what do you mean " it has no reason to stay connected"?
Hi roinovi,
The android default application will stay connected with a predefined limited subset of devices like HID since it waits data from those specific devices, in the DSPS case, the android will issue a disconnection since the DSPS doesn't belong to that kind of devices. You will be able to stay connected with a DSPS on an android phone only via a custom or a generic android application.
谢谢mt_dialog.
嗨
我已经定义了cfg_app_sec,但在附带的pdf中看到了8个错误
我没有看到关于手册/参考指南的安全性的任何内容
我该怎么办/我应该在哪里搜索?
do i need to implement security on my own ? (i saw " void app_sec_init(void);" but didnt see its implementation)
顺便提一句
我目前正在使用dsps_device v3.150.2,因为当我尝试使用v5.150.2i时有一些问题
1)the advertising is not stable: mostly the dsps doesnt find the device when i search for it, but sometimes if i wait a long time it does appear for a few secconds and disapears.
2)if i do able to connect somehow, when ever my micro starts sending data via uart, the device disconects from the dsps app
我可以解决这些问题吗?
Hi roinovi,
Since you are using the DSPS on SDK3 you will have to implement the security functions yourself since there is no security implementation on DSPS SDK3 version. You can check the Smart Tag that implements security or you can have a look at the security implementation on SDK5 DSPS. Also you can have a look at the Software and tools tab in the tutorial section, tutorial 6 explains the security feature, perhaps you will find it usefull.
关于您在DSPS SDK5上看到的问题,我们没有提及这些问题的任何报告,如果使用连接到您的PC,而不是在控制器上出现同样的问题?您还使用DSP使用的默认引脚或者您已更改引脚?
谢谢mt_dialog.
If the uuid is different, will not be able to connect!
Hi jitian,
Its not a matter of UUID but a matter of security, the android requires security in order to connect, if there isn't any response to the security request, the android central will not establish a connection with the peripheral.
谢谢mt_dialog.
hello
i followed the tutorial 6 and changed what is needed (using sdk5).
我遇到的1个问题是我构建时我得到1个错误
“。\ out_580 \ sps_device_580.axf:错误:l6218e:未定义的符号app_advertise_complete(从app_task.o中提到)。”
语法是否正确?- >(.app_on_adv_undirect_complete = app_advertise_complete,)
我如何获得“app_advertise_complete”的“未定义的符号”?
roi
Hi roinovi,
包含在App_On_Adv_undirect_Complete指针的回调中包含的.h文件的声明吗?分配的回调也必须返回void并具有uint8_t参数。
谢谢mt_dialog.
there is a declaration on the same user_callback_config.h where the ".app_on_adv_undirect_complete = app_advertise_complete, " exists
this is it:
void app_advertise_complete(const uint8_t);
/ **
****************************************************************************************
* @brief spotar会话开始或停止事件处理程序。
* @param[in] spotar_event SPOTAR_START/SPOTAR_STOP
* @return void.
****************************************************************************************
*/
however i didnt find any other refference to this function in the project.
its strange because its the sps_device project supplied by dialog.
and in the tutorial on how to add security, it says ti change the callback
从
.app_on_adv_undirect_complete = default_app_on_adv_undirect_complete,
至
.app_on_adv_undirect_complete = app_advertise_complete,
which i did
how come there is no implementation of the "void app_advertise_complete(const uint8_t);" ?
where can i dind it?
Hi roinovi,
我明白你的意思,我可以告诉isn't any implementation of the app_advertise complete. The DSPS project uses the default_app_on_adv_undirect_complete() function to be executed when the advertising operation finishes. I suppose that the app_advertising_complete is just a placeholder for any alternative user specified function to be executed after finishing the advertising.
谢谢mt_dialog.
so basicly, i can leave the ".app_on_adv_undirect_complete = default_app_on_adv_undirect_complete," when i implement security according to the Tutorial 6 : Pairing , Bonding & Security
btw what does the dsps default_app_on_adv_undirect_complete do?
tnx
roi
Hi roinovi,
Yes you can leave the default callback. In the DSPS example the default_app_on_adv_undirect_complete() doesn't do anything, is just an empty function since the only reason for the DSPS to stop advertising is when he accepts a connection from a central. Other applications, for example an application that changes the advertising string in that callback would restart advertising.
谢谢mt_dialog.
ok
i left it like " .app_on_adv_undirect_complete = default_app_on_adv_undirect_complete," and flashed it to the da14580.
now i can see the da advertising but i cant connect to it, i have tried connecting it to my computer and to the lightblue app but on both i am getting a connection error
on the computer i am getting an authentication error (it doesnt pop up a pincode screen) and in the lightblue app it just timesout.
what can be the problem?
Hi roinovi,
自应用安全(您是从外设发送到中央的安全请求吗?,我想你这样做)如果中央确实响应请求外围设备将超时并放下连接。如果从中央发送安全响应,则中央不符合外设集的要求。如果中央发送配对请求并且您不存在嗅探器来检查整个安全过程,则可以检查安全处理程序是否发生,例如,当配对请求从中央发送默认_App_On_Pairing_Request()时,请尝试检查该功能,如果从外设发送响应消息。您也可以查看SDK 5.0.4以获取安全示例(BLE_APP_SECURY)。
谢谢mt_dialog.
我所做的就是打开DSP_device project, and implement security as instructed on Tutorial 6 : Pairing , Bonding & Security.
它是否向中央发送了安全请求?
我实现了安全性,因为我试图使用手机配对机制将我的设备连接到Android应用程序(可以在设置 - >蓝牙上找到的常规过程,就像连接耳机)
however it couldnt connect, so i asked in this forum and i was replied that the android cant connect to the device because the android expects a security procedure (unlike the dsps app)
thats why i implemented security
Hi roinovi,
是的,如果你跟随本教程设备发送a security request to the central device, in order to indicate that the pairing procedure should be started. But the DSPS can't send this kind of request just by having this kind of definition. The DSPS uses a custom function on the .app_on_connection callback so when connected it doesn't send a security instruction to the central. The default_app_on_connection() does that by using the app_easy_security_request() function. So if you dont have this function you dont send a security indication to the central.
In the DSPS at SDK5 as is, if you just define the CFG_APP_SECURITY in the da1458x_config_basic.h you will be able to pair with the android application since as mentioned above, if you try to connect to your android application (the application that android has) it demands for the other device to have security in order to bond, but will not stay connected, it will just connect for a short period of time in order to pair and disconnect, the android will issue a disconnect command (check my #6 comment).
If you try to connect to a BLE android application like BLE scanner (a generic BLE application) etc, they dont demand security, so your device will have either to explictly say upon connection that it demands security or set a security level to the characteristics and when the central tries to access them it will see that they are protected and start the pairing procedure.
谢谢mt_dialog.