Correct me if I didn't get you right but I was checking hello_client.c and the below stated that it should return 1 for successful
bonding. I couldn't locate "LESMP_PAIRING_RESULT_TIMEOUT".
if(result == LESMP_PAIRING_RESULT_BONDED)
// if bonding is successful register with the server to receive notification
UINT16 u16 = 1;
bleprofile_sendWriteReq(HANDLE_HELLO_SENSOR_CLIENT_CONFIGURATION_DESCRIPTOR, (UINT8 *)&u16, 2);
LESMP_PAIRING_RESULT_SUCCESS, // this does not include bonding.
LESMP_PAIRING_RESULT_BONDED // this implies pairing succes.
So timeout should be 1 and bonded should be 3.
Can you provide more details on this scenario? It's not clear what steps would be to reproduce this. Which smartphone and OS for example. Can you describe the procedure? Do you have an air trace or HCI trace from the smartphone?
the error occurred while connecting other hello_sensors to my client.
At the moment I can't reproduce the error. Now I connect 4 sensors at the same time but never had this again.
But I get disc_reason 3e sometimes. Which means CONNECTION FAILED TO BE ESTABLISHED.
Could this be a problem?
How could I fix this?
HI, this may or may not be a problem f it is only occasional in that there could be outside factors like interference causing a connection failure. It's difficult to tell without an over the air trace from a bluetooth sniffer. Is it possible for you to try testing maybe one sensor, see if the issue is reproducible, add the next sensor, test again etc.... to see if there is a way you can repeatably cause the issue?
Sorry, I have no sniffer here.
I'll receive some devices I think next week. So I will try with different devices.
I have tested now with two sensors and also one TAG board (BCM920737TAG). I also tested with two phones (both with Android, one with 4.4.2, the other with 5.1.1).
Always with the same result: bonding always failed.
I removed most parts of my application, so I could send it to you. Perhaps you could check it?
Hi Matthias, can you post a link to the code?
Can you specify which sensors you are connecting to the phone?
As hardware we use the BCM920736S (the module), but the Software I sent is running on the TAG-Board with the same result.
The smartphone should just edit some settings on the board and perhaps read current measured values.
OK. I'll try to reproduce the scenario.
2 of 2 people found this helpful
Please add the code lesmp_setSMPRole(LESMP_ROLE_RESPONDERS); in the following line to solve this issue and connect with a smartphone.
//Add the following line
Also, in the settings of your smartphone check if the device is already showing on the list. This will cause a problem as it will not attempt to pair again. You need to "forget the device" for hello_client and attempt a fresh pair. For instance, in an iOS device go to Settings->Bluetooth->My devices and select the information for the hello_client device->select"Forget This Device". Then using LightBlue when you select the hello_client device it will pop up the option to pair or not. Once you click pair the bonding should go through successfully.