- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wrote a custom firmware for CY-434206 using the latest WICED SDK and Modus Toolbox.
I use wiced_bt_start_inquiry to enumerate BT devices and then parse their EIR data to retrieve a user-friendly name.
Unfortunately this does not work with one of the devices I need to support. In its EIR reply it does not return a name (field 8 or 9). I see that some devices (not all) can enumerate it showing the expected name (it's the same for all devices).
I suppose that they send a LMP_name_req PDU to retrieve this information.
Is there a way to send such a request and collect a reply using the WICED API? I couldn't find any function related to LMP, but I may have been looking in the wrong places...
The remote device supports only BT/EDR-classic, so no there is no way to retrieve the name using GATT profiles.
Solved! Go to Solution.
- Labels:
-
AIROC™ Bluetooth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @VM ,
You can try the below method as a workaround for now to use this API . Please try this and let me know if this helps.
In the mtb workspace, locate the 20703_ram_ext.sym file in either:
mtb_shared/wiced-btsdk/dev-kit/baselib/20706A2/COMPONENT_20706A2/internal/20706A2/wiced_uart/bld/A_20703A2
or
mtb_shared/wiced-btsdk/dev-kit/baselib/20706A2/COMPONENT_20706A2/internal/20706A2/wiced_spi/bld/A_20703A2
depending on whether UART or SPI transport is used.
Edit that file and append this line:
wiced_bt_dev_get_remote_name = 0x07a337
Then, edit the header to add a prototype:
mtb_shared/wiced-btsdk/dev-kit/baselib/20706A2/COMPONENT_20706A2/include/wiced_bt_dev.h
/**
* Function wiced_bt_dev_get_remote_name
*
* Get BT Friendly name from remote device.
*
* @param[in] bd_addr : Peer bd address
* @param[in] p_remote_name_result_cback : remote name result callback
*
* @return wiced_result_t
*
* WICED_BT_PENDING if successfully initiated
* WICED_BT_BUSY if already in progress
* WICED_BT_ILLEGAL_VALUE if parameter(s) are out of range
* WICED_BT_NO_RESOURCES if could not allocate resources to start the command
* WICED_BT_WRONG_MODE if the device is not up.
**/
wiced_result_t wiced_bt_dev_get_remote_name (wiced_bt_device_address_t bd_addr, wiced_bt_remote_name_cback_t *p_remote_name_result_cback);
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @VM ,
Can you please clarify which chip you are using?
There is an API to get the remote device name - wiced_bt_dev_get_remote_name( ) . Please let us know if this helps.
Note: If you are using any chip / module of CYW20706 , then this API will be available only from BTSDK 3.3 (which will be released soon) version on MTB.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using a CY-434206 module that uses the chip you mentioned.
Is there an availability date for the new release or a chance to test a beta version to see if it solves our issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @VM ,
You can try the below method as a workaround for now to use this API . Please try this and let me know if this helps.
In the mtb workspace, locate the 20703_ram_ext.sym file in either:
mtb_shared/wiced-btsdk/dev-kit/baselib/20706A2/COMPONENT_20706A2/internal/20706A2/wiced_uart/bld/A_20703A2
or
mtb_shared/wiced-btsdk/dev-kit/baselib/20706A2/COMPONENT_20706A2/internal/20706A2/wiced_spi/bld/A_20703A2
depending on whether UART or SPI transport is used.
Edit that file and append this line:
wiced_bt_dev_get_remote_name = 0x07a337
Then, edit the header to add a prototype:
mtb_shared/wiced-btsdk/dev-kit/baselib/20706A2/COMPONENT_20706A2/include/wiced_bt_dev.h
/**
* Function wiced_bt_dev_get_remote_name
*
* Get BT Friendly name from remote device.
*
* @param[in] bd_addr : Peer bd address
* @param[in] p_remote_name_result_cback : remote name result callback
*
* @return wiced_result_t
*
* WICED_BT_PENDING if successfully initiated
* WICED_BT_BUSY if already in progress
* WICED_BT_ILLEGAL_VALUE if parameter(s) are out of range
* WICED_BT_NO_RESOURCES if could not allocate resources to start the command
* WICED_BT_WRONG_MODE if the device is not up.
**/
wiced_result_t wiced_bt_dev_get_remote_name (wiced_bt_device_address_t bd_addr, wiced_bt_remote_name_cback_t *p_remote_name_result_cback);
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for the help.
Just to provide full information to people that may find this thread in the future, you may need to re-declare also the callback and the struct passed as argument to it:
/******************************************************************************
* Callback Name: wiced_bt_remote_name_cback_t
***************************************************************************//**
*
* Remote name result callback.
*
* \param p_remote_name_result Remote name result data
*
* \return void
*
******************************************************************************/
typedef void (wiced_bt_remote_name_cback_t) (wiced_bt_dev_remote_name_result_t *p_remote_name_result);
/**
* Function wiced_bt_dev_get_remote_name
*
* Get BT Friendly name from remote device.
*
* @param[in] bd_addr : Peer bd address
* @param[in] p_remote_name_result_cback : remote name result callback
*
* @return wiced_result_t
*
* WICED_BT_PENDING if successfully initiated
* WICED_BT_BUSY if already in progress
* WICED_BT_ILLEGAL_VALUE if parameter(s) are out of range
* WICED_BT_NO_RESOURCES if could not allocate resources to start the command
* WICED_BT_WRONG_MODE if the device is not up.
**/
extern wiced_result_t wiced_bt_dev_get_remote_name (wiced_bt_device_address_t bd_addr, wiced_bt_remote_name_cback_t *p_remote_name_result_cback);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content