22帖子/ 0新
Last post
Bendaa
Offline
Last seen:3年3个月前
Joined:2014-01-12 15:29
DSP连接

Hi,
My customer is using a DA14580 module from Murata.
它通过UART连接到他们的微观。
他们希望将数据从其系统转移到包含通过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"

Please note that when trying to connect to DA14580EVKIT with central mode the setup works fine.

请解释问题,如何解决问题。

Regards
Dan
Tritech

设备:
MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
嗨Bendaa,

嗨Bendaa,

我看不出任何明显的原因since DSPS its a fully hosted code and the external micro just sends data over the UART - if i understand correctly the implementation of the system. So i suppose that the connection is allready established by the 580 and i assume that a disconnection happens when the external micro starts sending data. So to start with, try to not to send data over the UART and check how the system behaves. Also after the disconnection happens is the 580 able to advertise again ? If yes try to check the disconnection reason in the disconnection handler.

Thanks MT_dialog

roinovi.
Offline
Last seen:3 years 9 months ago
Joined:2015-11-04 18:11
hello

hello
i am bendaa's customer.
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
please advise on what need to be done in order to connect the 580 to the tablet app
please note that with the dsps app, the 580 is abe to connect and we see our data from the micro, in the dsps app console.

Attachment:
MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
roinovi,

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.

Thanks MT_dialog

roinovi.
Offline
Last seen:3 years 9 months ago
Joined:2015-11-04 18:11
Hi

Hi
附加的PIC从我们尝试将580连接到Android平板电脑:设置 - 蓝牙
它在激活应用程序之前
我们甚至试图将其连接到正常的Android手机,在蓝牙设备中,就像将手机连接到常规BL设备一样,例如耳机
What do we need to change in the dsps_device in order for it to connect ?

MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
roinovi,

roinovi,

The same applies to the android, it requires security in order to pair to your device. You can add security in the DSPS reference design by defining the CFG_APP_SECURITY in the da1458x_confg_basic.h file, you are going to be able to connect and pair with the device, 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. But if you try to connect to any generic android application, BLE Scanner for example you are going to be able to connect and bond and exchange data normally.

Thanks MT_dialog

roinovi.
Offline
Last seen:3 years 9 months ago
Joined:2015-11-04 18:11
hello

hello
you said
“但是你不会能够保持连接到Android。一旦设备转合,Android就可以在设备上断开连接,因为它没有理由保持联系。”
why will it disconnect?
what do you mean " it has no reason to stay connected"?

MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
roinovi,

roinovi,

Android默认应用程序将与预定义的有限的设备连接,如HID,因为它等待来自那些特定设备的数据,在DSPS情况下,Android将发出断开连接,因为DSP不属于那种设备。您将能够通过自定义或通用Android应用程序在Android手机上与DSP保持联系。

Thanks MT_dialog

roinovi.
Offline
Last seen:3 years 9 months ago
Joined:2015-11-04 18:11


i have defined CFG_APP_SEC but got 8 errors as seen in the pdf attached
i did not see anything about security in the manuals/reference guides
what should i do/where should i search?
do i need to implement security on my own ? (i saw " void app_sec_init(void);" but didnt see its implementation)
b.t.w
i am currently using the dsps_device v3.150.2 because when i try to use the v5.150.2i have some problems
1)广告不稳定:大多数是DSPS在搜索它时找不到设备,但有时如果我等待很长时间,它会出现几个Secconds和脱贴。
2)if i do able to connect somehow, when ever my micro starts sending data via uart, the device disconects from the dsps app

can i fix these problems?

Attachment:
MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
roinovi,

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.

Regarding the problems you see on DSPS SDK5 we dont have any reports mentioning these kind of problems, if you use the 580 connected to your pc and not on your controller the same issues appear ? Also are you using the default pins that the DSPS uses or you have changed the pins ?

Thanks MT_dialog

嘉安
Offline
Last seen:4 years 10 months ago
Joined:2016-06-01 09:41
If the uuid is different,

If the uuid is different, will not be able to connect!

MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
嗨jitian,

嗨jitian,

它不是一个UUID的问题,但安全性问题,Android需要安全性才能连接,如果没有对安全请求的任何响应,Android中央将不会与外围设备建立连接。

Thanks MT_dialog

roinovi.
Offline
Last seen:3 years 9 months ago
Joined:2015-11-04 18:11
hello

hello
i followed the tutorial 6 and changed what is needed (using sdk5).
1 problem i encountered is when i build i get 1 error
" .\out_580\sps_device_580.axf: Error: L6218E: Undefined symbol app_advertise_complete (referred from app_task.o). "

is the syntax correct? -> ( .app_on_adv_undirect_complete = app_advertise_complete,)

how come i get "Undefined symbol" for "app_advertise_complete," ?

ROI.

MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
roinovi,

roinovi,

Is there a declaration on an included .h file for the callback that you ve assigned to the app_on_adv_undirect_complete pointer ? Also the callback assigned has to return void and have a uint8_t parameter.

Thanks MT_dialog

roinovi.
Offline
Last seen:3 years 9 months ago
Joined:2015-11-04 18:11
有一个宣言

有一个宣言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 session start or stop event handler.
* @param [in] spotar_event spotar_start / spotar_stop
* @return void
****************************************************************************************
*/

however i didnt find any other refference to this function in the project.
它奇怪,因为它是由对话框提供的SPS_DEVICE项目。
在教程中如何添加安全性,它表示TI更改回调
from
.app_on_adv_undirect_complete = default_app_on_adv_undirect_complete,

to
.app_on_adv_undirect_complete = app_advertise_complete,

我做了哪个
如何实现“void app_advertise_complete(const uint8_t);”?
where can i dind it?

MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
roinovi,

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.

Thanks MT_dialog

roinovi.
Offline
Last seen:3 years 9 months ago
Joined:2015-11-04 18:11
so basicly, i can leave the "

如此基本上,我可以离开“.app_on_adv_undirect_complete = default_app_on_add_undirect_complete,”当我根据教程6:配对,绑定和安全性实现安全性
btw dsps default_app_on_adv_undirect_complete do是什么?

tnx
ROI.

MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
roinovi,

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.

Thanks MT_dialog

roinovi.
Offline
Last seen:3 years 9 months ago
Joined:2015-11-04 18:11
好的

好的
我把它留下了“.app_on_adv_undirect_complete = default_app_on_add_undirect_complete,”并将其闪存到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?

MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
roinovi,

roinovi,

Since you applied security (are you sending from your peripheral a security request to the central ?, i suppose that you do ) if the central does respond to the request the peripheral will time out and drop the connection. If a security response is send from the central perhaps the central doesn't meet the requirements that peripheral sets. If the central sends a pairing request and you dont hava a sniffer to check the whole security procedure, you can check if the security handlers occur, for example, when the pairing request is send from the central the default_app_on_pairing_request() will occur, so try to check that function and if a reponse message is sent from the peripheral. Also you can have a look at the SDK 5.0.4 for a security example (ble_app_security).

Thanks MT_dialog

roinovi.
Offline
Last seen:3 years 9 months ago
Joined:2015-11-04 18:11
all i did is opening the dsps

all i did is opening the dsps_device project, and implement security as instructed on Tutorial 6 : Pairing , Bonding & Security.
does it sends a security request to the central?

i implemented security because i am trying to connect my device to an android app using the phones pairing mechanism (the regular procedure that can be found on the settings->bluetooth, just like connecting an earphone)
然而,它无法连接,所以我在这个论坛中问道,我回答说,Android无法连接到设备,因为Android期望安全过程(与DSPS应用程序不同)
thats why i implemented security

MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
roinovi,

roinovi,

是的,如果您遵循本教程,设备将安全请求向中央设备发送,以指示应启动配对过程。但是,DSP无法通过具有这种定义来发送这种请求。DSP在.app_on_connection回调上使用自定义函数,因此连接时它不会向中央发送安全指令。default_app_on_connection()通过使用app_easy_security_request()函数来实现。因此,如果您没有此功能,请不要向中央发送安全指示。

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).

如果您尝试连接到BLE扫描仪(通用BLE应用程序)等BLE Android应用程序,则它们不需要安全性,因此您的设备将在连接时默认说明它要求安全性或将安全级别设置为特征和配置安全级别当中央尝试访问它们时,它将看到它们受到保护并启动配对过程。

Thanks MT_dialog