Why state of the dest_id is NOT APP_CONNECTABLE for the second device connection!?

12 posts / 0 new
Last post
Anonymous (not verified)
Why state of the dest_id is NOT APP_CONNECTABLE for the second device connection!?

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.
Someone else has asked such question in the other forum,http://support.dialog-semiconductor.com/connect-two-peripherals-one-central, however there is no answer for the question.
How can I resolve my problem?
I really appreciate your help.

Best Regards,
Reza

Device:
MT_dialog
Offline
Last seen:2 weeks 2 days 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?

Are you trying with the proximity ref design and monitor ? Are you using the dongle as a central ?

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.
-The profile which I am using on each peripheral is the same. It receives some data from different sensors and send them through the air with a notification for the central device.
-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.
Although I can connect two the second device, I can't go through the second phase (as defined through the conditional statement in "gapc_connection_req_ind_handler") and enable a profile in the central device and also confirm my connection to the application. I don't know the state of dest_id is not APP_CONNECTABLE even though I use different BLE device addresses!
I appreciate your help in advance.

Thank you.
Reza

reza.yazdani67 (not verified)
Dear MT_dialog,

Dear MT_dialog,
Is there anyway I can resolve this problem!? How is it possible that I connect to the module but its state is not app_connectable when I check it in gapc_connection_req_ind_handler!? Is it because that the state of previous module is being checked!? I am sure that I use different BLE addresses, however still these two modules are not distinguished from each other!
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:2 weeks 2 days 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
Thank you. Could you please tell me which project is this central project that supports up to 6 simultaneous connections?
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:2 weeks 2 days ago
Staff
Joined:2015-06-08 11:34
Hi reza.yazdani67

Hi reza.yazdani67

The application is located in the directory i wrote in the previous post. Its a windows application that uses the usb stick as central and can connect to multiple proximity sensors. You have to downoload the prox_monitor_ext_usb in your usb stick with the connection manager and then run this project DA14580_581_583_SDK_3.0.10\host_apps\windows\proximity\monitor\host_proxm_sdk\host_proxm_sdk.vcxproj to locate and connect to the proximity sensors.

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:2 weeks 2 days 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,

Thanks for your help.
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.

Best Regards,
Reza

Joacimwe
Offline
Last seen:1 year 3 months ago
Guru
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.
你需要修改应用程序的结构make it work with multiple peripherals. Especially, you should remove the connected states of APP_STATE. You then need to keep track by yourself the states for the up to 6 connections in some other way. As I wrote inhttp://support.dialog-semiconductor.com/discovering-services-and-charact..., 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.