2 years ago
CFG_MAX_CONNECTIONS=2 ble_app_peripheral
Posted byRoie DAHAN0 points 5 repliesHi,
I'm looking for an example code that show enable multiple connections to my ble_app_peripheral using DA14585 custom service
for example:
#define CFG_MAX_CONNECTIONS (2)
- task1 read ADC
- task2 toggle LED
while two mobile phones connected (Android/iOS)
Thanks,
Roie
2 years ago
Hi,
Thanks for the quick reply.
I'm using SDK DA14585_SDK_6.0.10.511_0 with DA14585 (complied with Keil)
The good news are after applying the changes you recommended two Mobile phones are able to get to Connected state :)
However, once i write any value the app is getting to
gapc_disconnect_ind_handler
// We are not in Connected State
--> ASSERT_ERROR(0);
can you send me your example to see what part i'm missing ?
Regards,
Roie
2 years ago
Hi Roie DAHAN,
I am not able to replicate your issue. While the DA14585 is connected with the mobile phones, I am able to write a value into the LED characteristic using both of them. Also, I used the configurations that I have mentioned in my previous post. Are you using the default ble_app_peripheral example of the SDK? The gapc_disconnect_ind_handler is triggered only if one of the mobile phones is disconnected. Also, this handler is executed only if you get a GAPC_DISCONNECT_IND message. If you found any of the above answers useful please mark one of them as accepted.
Thanks, PM_Dialog
2 years ago
Hi,
This issue is still in "Open" state since it's not usable to connect two devices and once the first byte arrives the DA14585 closes the connection.
As stated in my provisos post I'm using SDK DA14585_SDK_6.0.10.511_0 with DA14585 (complied with Keil)
The changes i made are "only" the ones mention in the post above, that is way as i asked for the Demo ("no warranty") code you tested with maybe there is some option/flag that causes a difference in behavior.
Can you send me your example to see what part i'm missing ("no warranty") ?
Regards,
Roie
2 years ago
Hi Roie DAHAN,
I used the default ble_app_peripheral example of the SDK DA14585_SDK_6.0.10.511_0 with DA14585 (complied with Keil) and the only configurations that I did are in my previous post. Could you please try it into the default ble_app_peripheral example of the SDK and let me know? Are you able to toggle the LED on the Pro DK using both of your mobile phones? Which mobile application are you using?
Thanks, PM_Dialog
2 years ago
Hi Roie DAHAN,
There isn’t any available example regarding the multiple simultaneous connections when the DA14585 acting as peripheral device. However, you can find some steps below in order to be able to connect the DA14585 with 2 mobile phones at the same time.
The central devices are two Android devices and the peripheral device is a DA14585 Pro-DK. For this demo I used the ble_app_peripheral example and I am able to switch off/on the LED on the Pro-DK with both of the mobile phones. Also, can you please let me know in which SDK version are you working on?
Thanks, PM_Dialog