Hi there:
When I utilize kw36 as peripheral to connect another equipment, the two BLE boards automatically disconnected after about ten minutes, and the " BleApp_Start();" in "static void BleApp_ConnectionCallback" cannot restart the advertising. So how can I solve the problem? Thanks for any suggestions.
Hello @Enjoy,
Hope you are doing well.
Could you please help us with more details about your SDK version and MCUXpresso version?
Just to confirm, are you using any of the BLE examples from the SDK as base for your application? If so, which example project are you using? Have you modified the source code?
Could you please provide more details about the connections? Are you using a KW36-based custom board or is it a FRDM board? Are you implementing the same Profile on both your Server and Client?
Just to confirm the behavior of your application, is your board getting disconnected immediately after the connections is established? Does this event occur each and every time you try to connect it to another device or at some point the connection has been successful and your application worked properly?
Please test if your Bluetooth interface is working properly with another project. For example, you could try the hid_device example project from the SDK (KW36 SDK > wireless_examples > bluetooth > hid_device) between your board and your PC. Flash and run the application, press SW2, scan for Bluetooth devices on your PC and establish the connection (if password is required, please try 999999); you should see that the board is connected to your PC and your mouse should be moving on your screen.
Regards,
Eduardo.
Hello Eduardo:
So kind of you. I use example of hrs from SDK2.2.11, and I modified the code work as peripheral when transmiting data of 16bit to a nrf52832 via BLE. In the modified code, I only transmit the hrs data (in fact the data is voltage signal collected by a ADC and I use FRDM mkw36 to drive the ADC) and ingnore the battery info.
In the first ten minuts, the data is exchanged between MKW36 and nrf52832 normally whlie every time about ten minutes later the connection will failed and I checked the fault log, it said the disconnection was caused by 0x3e.
Another phenomenon is that if I change the sample rate of ADC (it affects the data transmitting rate of BLE) the connection will repeat between disconnection and reconnection.
So is it the transmited data blocking the BLE? And how can I fix it, besides how can I reconnect the two BLE when connection falied?
best regards
Yin
Hi,
I appreciate the details.
Could you please try this connection with a clean (not modified) version of HRS application? If both devices are implementing the same profile, this should work properly. Please, let me know your findings.
If the issue persists, please test a clean version of HRS application between your KW36 board and an Android or iOS device using IoT Toolbox app. For more information on this, please consult Bluetooth Low Energy Demo Applications User Guide (inside KW36 SDK doc folder > docs > wireless > Bluetooth), Section 4.3 Testing Devices and Section 5.1 Heart Rate Sensor.
Also, would it be possible for you to test the BLE interface between two KW36 boards? You can flash one board with Temperature Sensor (wireless_examples > bluetooth > temp_sens) and the other with Temperature Collector (wireless_examples > bluetooth > temp_coll). For more information on this, please consult Bluetooth Low Energy Demo Applications User Guide, Section 5.14 Low Power Temperature Sensor and Collector.
Just to confirm, are you increasing or decreasing the ADC sample rate?
Regards,
Eduardo.