Role Switching: Peripheral connects, Discover Service and Disconnect

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
俄文chi Patel
Offline
Last seen:2 years 6 months ago
加入:2017-03-29 10:50
Role Switching: Peripheral connects, Discover Service and Disconnect

Dear Dialog_Support Team,

I am working on role switching configuration. Device is configured with extended sleep mode. Default mode of device iscentraland on button press, device switches the role toperipheral. During central mode, all operations are performed properly. But as mode is switched to peripheral and if i try to connect to the device using mobile App, it shows connecting and discover services and disconnects. Can you tell me what could be the issue?

With Regards,
俄文chi Patel

Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi Ruchi Patel,

Hi Ruchi Patel,

Well, it would help if you provide a sniffer log or a the reason that the device reports as a disconnection reason, the fact that the central connects performs a discovery and then disconnects could be anything, this could also be a command that the central itself indicates to the peripheral device or even the peripheral itself.

Thanks MT_dialog

俄文chi Patel
Offline
Last seen:2 years 6 months ago
加入:2017-03-29 10:50
Dear Dialog_Support Team,

Dear Dialog_Support Team,

I am not able to find out the reason of disconnection. As a central, i am usingBLE扫描仪App. As a peripheral, i am using the device which has role switch(role is switched to peripheral) program.

With Regards,
俄文chi Patel

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi Ruchi Patel,

Hi Ruchi Patel,

You will be able to find the disconnection reason from your peripheral as well, you will need to "catch" the device upon disconnection in the user_app_disconnect() and check the reason of the disconnection in the reason member of the gapc_disconnect_ind structure. Also a sniffer log would help.

Thanks MT_dialog