how to do simple data transfer using bluetooth serail terminal?
how to do simple data transfer using bluetooth serail terminal?
app: RSSI: 206
<info> app: RSSI: 195
<info> app: RSSI: 180
<info> app: RSSI: 179
<info> app: RSSI: 164
<info> app: RSSI: 171
<info> app: RSSI: 173
<info> app: RSSI: 179
<info> app: RSSI: 174
<info> app: RSSI: 176
<info> app: RSSI: 170
<info> app: RSSI: 175
<info> app: RSSI: 177
<info> app: RSSI: 180
<info> app: RSSI: 176
<info> app: RSSI: 180
<info> app: RSSI: 180
<info> app: RSSI: 181
<info> app: RSSI: 181
<info> app: RSSI: 180
<info> app: RSSI: 182
i started measuring the rssi level when i am near to the device its showing high values but when i move away from the device its showing lower values. But in nrf connect it value is negitive and showing lower negitive values when i am near to the device. will the values returned from the rssi get function are correct?
venkatesha kj said:i want to scan the central device and check the rssi level of the central device how do i do that?
The peripheral does not do any scanning.
You can still use sd_ble_gap_rssi_get on the peripheral to retrieve the RSSI of the last connection event on the peripheral's side.
venkatesha kj said:i started measuring the rssi level when i am near to the device its showing high values but when i move away from the device its showing lower values. But in nrf connect it value is negitive and showing lower negitive values when i am near to the device. will the values returned from the rssi get function are correct?
How did you produce these values? They do not seem like any RSSI values I have ever seen before. Could it be that you have formatted or type-casted them improperly?
Best regards,
Karl
i got the output properly i am suppose to use int8_t variable
Please share the section of the code in which you did this, using the Insert -> Code option.
Best regards,
Karl
void bsp_event_handler(bsp_event_t event)
{
uint32_t err_code;
// uint8_t count = 48;
// uint8_t data_array1 = count;
// uint8_t len = sizeof(count);
char count[] = "hi serobit";
uint8_t len = strlen(count);
switch (event)
{
case BSP_EVENT_SLEEP:
sleep_mode_enter();
break;
case BSP_EVENT_DISCONNECT:
err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
if (err_code != NRF_ERROR_INVALID_STATE)
{
APP_ERROR_CHECK(err_code);
}
break;
case BSP_EVENT_WHITELIST_OFF:
if (m_conn_handle == BLE_CONN_HANDLE_INVALID)
{
err_code = ble_advertising_restart_without_whitelist(&m_advertising);
if (err_code != NRF_ERROR_INVALID_STATE)
{
APP_ERROR_CHECK(err_code);
}
}
break;
case BSP_EVENT_KEY_2:
// Set_Count(count-48);
err_code = ble_nus_data_send(&m_nus, count, &len, m_conn_handle);
// err_code = ble_nus_data_send(&m_nus, &str, &len, m_conn_handle);
default:
break;
}
}
i try to send the data when ever the button intterupt occured but not be able to see the data on nrf-connect app?