- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a problem using the BT wifi introducer demo.
If i pair a device to the board, everything is working fine. If i reboot the board, i have the event :
BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT
with the following debug :
[WiFi Introducer] Paired Device Link Keys Request Event
Key retrieval success
But after, i can't communicate to the board unless i delete the pairing on my phone. I'm pretty sure this is not the expected behavior when a device is paired.
What should i do to solve that ? I'm using SDK 3.7.0-3.
Regards,
vtunr
Solved! Go to Solution.
- Labels:
-
Wifi+Bluetooth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So if anyone have the problem than me, i fixed it.
You change what's store in the DCT by the full keys and not only a few part of it :
typedef struct{
wiced_bt_device_link_keys_t bond_info[MAX_BOND_INFO]; /* Bond information */
uint32_t current_index; /* Index of the bond info array to store */
} bt_wifi_introducer_bond_info_dct_t;
Then modify all the function to store/read the bond info to get the full key and load it
And finally :
case BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT:
{
wifi_introducer_read_link_keys(&p_event_data->paired_device_link_keys_request);
break;
}
And that should be fully working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So i'm pretty sure that there is no key retrieval since it just initialize the key_data :
case BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT:
{
WPRINT_BT_APP_INFO( ("[WiFi Introducer] Paired Device Link Keys Request Event\n") );
memset( &p_event_data->paired_device_link_keys_request.key_data, 0x00, sizeof( p_event_data->paired_device_link_keys_request.key_data ) );
WPRINT_BT_APP_INFO(( "Key retrieval success\n" ));
break;
}
So i added the key retrieval from the DCT (needed to change the function to take a pointer as arg) :
case BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT:
{
wifi_introducer_read_link_keys(&p_event_data->paired_device_link_keys_request);
WPRINT_BT_APP_INFO( ("[WiFi Introducer] Paired Device Link Keys Request Event\n") );
//memcpy( &p_event_data->paired_device_link_keys_request.key_data, 0x00, sizeof( out_device.device_link.key_data ) );
WPRINT_BT_APP_INFO(( "Key retrieval success\n" ));
break;
}
I checked that the key retrieved is the same as the one saved, which it is now that the wifi_introducer_read_link_keys function use a pointer to the key, but then, my phone still can't communicate with the BT chip
I works after the pairing but if i reboot the chip or restart the bt stack, i end up in this situation. Any help will be appreciated.
vtunr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So if anyone have the problem than me, i fixed it.
You change what's store in the DCT by the full keys and not only a few part of it :
typedef struct{
wiced_bt_device_link_keys_t bond_info[MAX_BOND_INFO]; /* Bond information */
uint32_t current_index; /* Index of the bond info array to store */
} bt_wifi_introducer_bond_info_dct_t;
Then modify all the function to store/read the bond info to get the full key and load it
And finally :
case BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT:
{
wifi_introducer_read_link_keys(&p_event_data->paired_device_link_keys_request);
break;
}
And that should be fully working.