为什么Dest_ID的状态不是app_connectable,用于第二个设备连接!?

12 posts / 0 new
Last post
Anonymous (not verified)
为什么Dest_ID的状态不是app_connectable,用于第二个设备连接!?

Dear Dialog,
Hi,
I am trying to connect two or more peripherals to one central. Connecting with the first one is always okay and I can discover its service and the characteristics. However, I cannot enable my profile through function "app_connection_func" in handler "gapc_connection_req_ind_handler" which is called after connecting to the second device. I know that it is because that following conditional statement which says that the state of this dest_id is already set to APP_CONNECTABLE :

if (ke_state_get(dest_id) == APP_CONNECTABLE)
{
...
}

I also have used different BDs for the peripherals which must give different dest_ids when I am checking in the above if statement.
其他人在另一个论坛上询问了这样的问题,http://support.dialog-semiconductor.com/connect-two-peripherals-one-central, however there is no answer for the question.
我该如何解决我的问题?
I really appreciate your help.

此致,
Reza

Device:
MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi reza.yazdani67

Hi reza.yazdani67

Can you give me more details about what are you trying to do, on what central are you trying to connect two peripherals and what project are you running on those peripherals, is it a ref design?

您是在尝试接近ref设计和监视器吗?你是用加密狗作为一个中心吗?

Thanks MT_dialog

reza.yazdani67 (not verified)
Dear MT_dialog,

Dear MT_dialog,

Thanks for considering my case.
-I am using PAN1740 modules as central and peripherals.
- 我在每个外围设备上使用的配置文件是相同的。它收到来自不同传感器的一些数据,并通过空气向中央设备发送通知。
-Data rate of each peripheral stream is about 1 KBps.
-The base project that I use for the central device is DSPS (DA14580_DSPS_3.150.2). And yes, I am using dongle usb as central device.
What I am trying to do is to firstly connect to two devices and receive their data stream at the same time. Then, I am going to increase number of peripherals in order to find out how many devices I can connect and receive their data simultaneously.
虽然我可以连接两个第二设备,但是我无法通过第二阶段(如“gapc_connection_req_ind_ind_handler”中的条件语句定义),并在中央设备中启用配置文件,并确认我与应用程序的连接。即使我使用不同的BLE设备地址,我也不知道dest_id的状态不是app_connectable!
I appreciate your help in advance.

谢谢你。
Reza

reza.yazdani67 (not verified)
Dear MT_dialog,

Dear MT_dialog,
无论如何我可以解决这个问题!?我如何连接到模块,但是当我在gapc_connection_req_ind_handler中检查它时,它的状态不是app_connectable。是因为正在检查以前模块的状态!我相信我使用不同的BLE地址,但这两个模块仍然没有区别!
I appreciate your consideration in advance.
Thank you
Reza

reza.yazdani67 (not verified)
Dear MT_dialog,

Dear MT_dialog,

could you please send me a sample of proximity that can connect to several devices simultaneously?
My email isreza.yazdani1367@gmail.com. I appreciate your help in advance.

Thank you

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi reza.yazdani67

Hi reza.yazdani67

In the SDK DA14580_581_583_SDK_3.0.10\host_apps\windows\proximity\monitor directory there is a central project that supports up to 6 simultanious connections with the proximity reporter project.

Thanks MT_dialog

reza.yazdani67 (not verified)
Dear MT_dialog,

Dear MT_dialog,
Hi
谢谢你。您能告诉我哪个项目是这个中央项目,最多可同时支持6个连接?
The two projects that I see in the SDK are prox_monitor_ext and prox_monitor_ext_usb. But they are embedded projects and there is no file in the app section handling the connections!
Is it right that I use the app files used in DSPS project here!?

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi reza.yazdani67

Hi reza.yazdani67

该应用程序位于我在上一篇文章中写道的目录中。它是一个Windows应用程序,它使用USB棒作为中心,可以连接到多个接近传感器。您必须使用Connection Manager将Prox_Monitor_ext_Usb下载到USB棒中,然后运行此项目DA14580_581_583_SDK_3.0.10 \ host_apps \ windows \ proximity \ monitor \ host_proxm_sdk \ host_proxm_sdk.vcxproj,找到并连接到邻近传感器。

Thanks MT_dialog.

reza.yazdani67 (not verified)
So you mean there is no host

So you mean there is no host application, yes? If I want not to use connection manager, I have to modify the application and add some files in the app section, am I right!?

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi,

Hi,

There is a host application, the host application is in the directory i 've mentioned, you only have to downloadprox_monitor_ext_usb with the connection manager in order to program the usb stick. By doing this you can run the central application (from the specified directory) and issue commands through UART to the dongle. Its not an embedded solution.

Thansk MT_dialog

reza.yazdani67 (not verified)
Hi,

Hi,

谢谢你的帮助。
I am not so sure how you are saying this is a host application since you say that it needs command from a serial port (UART) to scan or connect to other devices. As I understand this kind of projects are categorized in embedded project as they rely on an external module handling them. Anyway, I really appreciate your consideration and help.

此致,
Reza

Joacimwe
Offline
Last seen:1年5个月前
格鲁鲁
Joined:2014-01-14 06:45
"Host" means a central/master

"Host" means a central/master. I think you want a central application that runs directly on the da14580 without the use of an external controller?

There are a few such sample projects, for example the serial port service project. But those assume there will always be max one connection at a time.
您必须修改应用程序结构一点以使其与多个外设一起工作。特别是,您应该删除App_state的连接状态。然后,您需要通过某种方式通过您自己跟踪最多6个连接的状态。正如我写的那样http://support.dialog-semicondiondiondum/discovering-services-ancharact ..., you must keep track of the conidx of each connection so you send messages to the right GAPC and GATTC tasks. A suggested way to handle the states is to have an array of 6 entries where each conidx (between 0 and 5) refers to an entry in your array where you can store things like mac addresses and whether the connection is active or not.