- 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
Hello.
It's probably better to post this question on the wifi forum, since BCM94343 platform isn't supported on the Bluetooth side.
But I'll take a look at it later.
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for putting this post on wifi forum and your prompt reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps this may help: Can bt_smartbridge retrieve rssi value of connected ble devices?
I also saw a few other RSSI based Smartbridge discussions in the Wi-Fi forums in addition to this one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The link given above is for scanning as a BLE central device.
Our device is a BLE peripheral which is being connected by someone else.
I tried to search for related topics on community, but no luck.
Can anyone kindly provide more related information?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A full BLE/BT simultaneous dual mode stack is not supported within the WICED Wi-Fi SDK.
Based on my understanding, the ble_proximity_reporter app is the only one we provide which enables the peripheral mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AFAIK ble_hello_sensor is also a BLE peripheral.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"A full BLE/BT simultaneous dual mode stack is not supported within the WICED Wi-Fi SDK."
Does this mean it is impossible for a WICED BLE peripheral to retrieve RSSI of its connected peer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have sample applications in the SDK that can have the BLE on 4343W to be BLE Peripheral and BLE central. We do not have few ble api's to perform few requests you have asked for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
Is there any clue for us, so we can try to implement such functions ourselves?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you a peripheral that is connected or a peripheral that is only an advertiser? Remember that for RSSI you need to have actual RX packets.
- 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
Can you confirm that you are using the correct peer BDA in the wiced_bt_dev_read_rssi API?
Also can you try to issue an inquiry and see if you get the RSSI from the device you are interested in?
This will be in the wiced_bt_dev_inquiry_scan_result_t
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My first testing code goes like this :
void ble_slave_rssi_callback( void *p_data )
{
wiced_bt_tx_power_result_t *p_tx_power = (wiced_bt_tx_power_result_t *)p_data;
DUMP_INT(p_tx_power->hci_status);
DUMP_INT(p_tx_power->status);
DUMP_INT(p_tx_power->tx_power);
DUMP_MAC(p_tx_power->rem_bda);
}
case GATT_ATTRIBUTE_REQUEST_EVT:
{
PRINT_MAC(connection->address.bda);
RUN_AND_PRINT(wiced_bt_dev_read_rssi (connection->address.bda, BT_TRANSPORT_LE, ble_slave_rssi_callback));
gatt_result = gw_ble_slave_gatt_req_cb( &p_data->attribute_request );
break;
}
By triggering the event (on WICED peripheral) with operations on my smartphone, the UART output is :
BC F5 AC 7D 11 CB
wiced_bt_dev_read_rssi (connection->address.bda, BT_TRANSPORT_LE, (wiced_bt_dev_cmpl_cback_t *)ble_slave_rssi_callback) = 1
Note that MAC is the same as my cellphone, but outputs from ble_slave_rssi_callback are never seen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My 2nd testing code goes like this :
void inquiry_result_cback(wiced_bt_dev_inquiry_scan_result_t *p_inquiry_result, uint8_t *p_eir_data)
{
PRINT_MAC(p_inquiry_result->remote_bd_addr);
DUMP_INT(p_inquiry_result->clock_offset);
DUMP_INT(p_inquiry_result->rssi);
}
case GATT_ATTRIBUTE_REQUEST_EVT:
{
wiced_bt_dev_inq_parms_t inq_parms = {BTM_BR_INQUIRY_MASK, 3, BTM_FILTER_COND_BD_ADDR, {{0}}};
memcpy(&inq_parms.filter_cond.bdaddr_cond[0], &connection->address.bda[0], 6);
PRINT_MAC(connection->address.bda);
RUN_AND_PRINT(wiced_bt_start_inquiry (&inq_parms, inquiry_result_cback));
gatt_result = gw_ble_slave_gatt_req_cb( &p_data->attribute_request );
break;
}
By triggering the event (on WICED peripheral) with operations on my smartphone, the UART output is :
BC F5 AC 7D 11 CB
wiced_bt_start_inquiry (&inq_parms, inquiry_result_cback) = 8036
Note that the MAC is correct as 1st test, and output from the callback is not seen either.
- 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
the ble_proximity_reporter application under snip->bluetooth is similar to what you requested. Have you looked at it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply vik86
The closest thing I found in ble_proximity_reporter application is "tx_power". Literally I guess this is the transmission power from our WICED device. But how do I deduce / interpret "receiving signal strength which comes from a particular peer address" from tx_power ? Or I missed something important in ble_proximity_reporter application ?
My purpose is to guess / judge physical distance between our WICED BLE slave device and a peer mobile phone. I want to enable some functions on our device only when they are sufficiently close (signal is strong).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
xavier@candyhouse yes the ble_proximity_reporter reports the distance between our WICED BLE and a peer mobile phone. Give it a try and let us know if this is what your are looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Several things about ble_proximity_reporter :
I tried this snip but
1) cannot connect with either Android (LG G2) or iPhone (6s+), only connected successfully by MacbookPro with LightBlue app.
2) By operating with all characteristics, I cannot really interpret how "the ble_proximity_reporter reports the distance between our WICED BLE and a peer mobile phone". What does "Local TX power" here mean ? Is it determined by HCI automatically according to something ? I put my Macbook at different distances from the WICED device but it always prints "12".
============ Part of UART output of bel_proximity_reporter ==========
Bluetooth enabled (success)
Local Bluetooth Address: [43:43:A1:12:1F:AC]
---->>> New ADV state: 3
Waiting for proximity monitor to connect...
Unhandled Bluetooth Management Event: 0x14
Unhandled Bluetooth Management Event: 0x14
GATT connection to [AC:BC:32:98:EC:A0] established.
---->>> New ADV state: 0
Local TX power: 12
Link loss alert level changed to: 17
Proximity alert (level: 18)
Proximity alert (level: 19)
GATT connection to [AC:BC:32:98:EC:A0] released.
---->>> New ADV state: 3
Waiting for proximity monitor to connect...
---->>> New ADV state: 4
GATT connection to [AC:BC:32:98:EC:A0] established.
---->>> New ADV state: 0
Local TX power: 12
Link loss alert level changed to: 22
GATT connection to [AC:BC:32:98:EC:A0] released.
---->>> New ADV state: 3
Waiting for proximity monitor to connect...
GATT connection to [AC:BC:32:98:EC:A0] established.
---->>> New ADV state: 0
Local TX power: 12
GATT connection to [AC:BC:32:98:EC:A0] released.
---->>> New ADV state: 3
Waiting for proximity monitor to connect...
---->>> New ADV state: 4
---->>> New ADV state: 0
============= End of UART output =============
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
xavier@candyhouse we will look at the issue with iPhone6+ and LG G2. Meanwhile the ble_proximity_reporter being a peripheral does not say how far the central is, not the RSSI. You will need to use andorid/iOS libraries to determine the RSSI of the peripheral(WICED device).
The tx power is basically telling at what rate the tx_power is set on peripheral, hence you see that to be constant value of 12.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the "cannot connect" problem, it was with Android / iOS APP : Nordic NRF Master Control Panel.
I also tested iOS APP : LightBlue and it works fine on 6S+, so it may be APP's problem.
So is there any way to let WICED peripheral know / infer the distance between it and a connected peer ?
Just like what you said, RSSI should be closely related to this purpose.
Is it possible for a WICED peripheral to acquire RSSI information of a connected peer ?