断开连接后获得市场经济地位sage

⚠️
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.
2 posts / 0 new
Last post
Kevleo94
Offline
Last seen:2 years 9 months ago
加入:2017-09-05 07:18
断开连接后获得市场经济地位sage

Hi, I have problem with ble program. I'm using ble peripheral example and make a few changes like receiving message, give button handler, and send message.
when I send a message to bluetooth from my android, the message is sent properly and run the action correctly. But after a few second, bluetooth disconnected from my android.
Is this caused by sleep? I did not change anything about the sleep module/function. If it is not because sleep, is there any other possibility?

Thank you

Device:
PM_Dialog
Online
Last seen:1 min 53 sec ago
工作人员
加入:2018-02-08 11:03
Hi Kevleo94,

Hi Kevleo94,

It doesn’t matter if your device is in sleep mode. The SDK should execute every connection event.
In the ble_app_peripheral example of SDK, if you send a message from your android the user_custs1_ctrl_wr_ind_handler is activated when you write the specific characteristic. Then, the app_easy_timer is called if the value is correct.
In your application, how do you handle the message you send from you android? Do you initialize a timer like ble_app_peripheral example or do you have another callback function? Probably your code is stuck somewhere and you lose all the subsequent connection events and then the device is disconnected. Please check in the ble_app_peripheral the user_custs1_ctrl_wr_ind_handler() function when you write your characteristic.

Thanks PM_dialog