- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a hello_client application with some sensors and a smartphone.
The sensors can connect with bonding without a problem,
but if I connect with a smartphone, I always get as result 1 (I think this is LESMP_PAIRING_RESULT_TIMEOUT).
Somebody a Idea how I could fix this?
Solved! Go to Solution.
- Labels:
-
Security
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Matthias,
Please add the code lesmp_setSMPRole(LESMP_ROLE_RESPONDERS); in the following line to solve this issue and connect with a smartphone.
blecen_Create();
//Add the following line
lesmp_setSMPRole(LESMP_ROLE_RESPONDERS);
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.
Thanks,
Jaeyoung
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi boont,
in lesmp.h:
typedef enum
{
LESMP_PAIRING_RESULT_FAILED,
LESMP_PAIRING_RESULT_TIMEOUT,
LESMP_PAIRING_RESULT_SUCCESS, // this does not include bonding.
LESMP_PAIRING_RESULT_BONDED // this implies pairing succes.
} LESMP_PARING_RESULT;
So timeout should be 1 and bonded should be 3.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi cgariss
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Best regards,
Gregg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gregg,
Sorry, I have no sniffer here.
I'll receive some devices I think next week. So I will try with different devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi cgariss
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Matthias, can you post a link to the code?
Gregg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can also send it to the admin alias I monitor (communities-list@broadcom.com) and I will make sure it gets to cgariss
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you specify which sensors you are connecting to the phone?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. I'll try to reproduce the scenario.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Matthias,
Please add the code lesmp_setSMPRole(LESMP_ROLE_RESPONDERS); in the following line to solve this issue and connect with a smartphone.
blecen_Create();
//Add the following line
lesmp_setSMPRole(LESMP_ROLE_RESPONDERS);
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.
Thanks,
Jaeyoung
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jaeyoung,
Seems to work now.
Thanks a lot.