Hi dialog team,
我want to read RSSI from DSPS peripheral application. I have added following code into application.
in app_task_handlers.h
EXTERN const struct ke_msg_handler app_default_state[] =
{
...
{GAPC_CON_RSSI_IND, (ke_msg_func_t)gapc_read_con_rssi_ind_handler},
...
}
and added gapc_read_con_rssi_ind_handler in app_task.c
int gapc_read_con_rssi_ind_handler(ke_msg_id_t const msgid,
struct gapc_con_rssi_ind *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
(void)param->rssi; // connection RSSI
return (KE_MSG_CONSUMED);
}
i am not receiving GAPC_CON_RSSI_IND event when ever I call "void app_read_rssi(void)" from central device after connection establishment.
can you tell me what could be the reason?
regards,
sabasit
Device:
Hi,
任何一个能回答我好吗?
regards,
sabasit
Hi dialog team,
is there some register to enable RSSI event?
regards,
sabasit
Hi There, please see the following post on how to grab the RSSI value.
BR JE_Dialog
Hi BR,
我could not found any link of post to grab RSSI value in you reply. please send me link.
thanks,
sabasit
HI Sabasit,
sorry, here is link.
http://support.dialog-semiconductor.com/da14580-expert-kit-rssireceived-...
BR JE_Dialog
Do we need to pair with DSPS peripheral to read RSSI or without pairing RSSI is accessible just after connection establishment with central device?
thanks,
sabasit
Hi JE,
我have implemented RSSI functionality in DSPS peripheral(device) and central(host) as you suggested me in above link. when ever i call app_read_rssi( ) function from host, i do not receive GAPC_CON_RSSI_IND event in peripheral.
我am reading RSSI without paring just after connection establishment. Do I need to pair the BLE devices to read RSSI?
i go trough proximity example. Monitor reads RSSI from reporter after pairing.
what you suggest?
Thanks,
sabasit
Hi,
can you answer me please?
thanks,
sabasit
Hello Sabasit, we will take a look : your question is in the backlog . BR JE_Dialog
Hi JE,
thank you. I am waiting.
thanks,
sabasit
Hi BR JE
我found that link is disconnected by sps device whenever host sends command "GAPC_GET_CON_RSSI". what is reason of disconnection?
Both device and host are running on two separate expert development kits.
thanks,
sabasit
Hi BR JE,
Have you find out the reason of disconnection link by peripheral whenever it receives "GAPC_GET_CON_RSSI" command from central?
please help me, my project is going too late.
Thanks,
sabasit
Hi dialog team,
can you answer me please?
thanks,
sabasit
Hello Sabasit, i am still waiting for response from the software team : we will chase for a response. Sorry for delay, BR JE_Dialog
Hello JE_Dialog,
Have you got any response form software team?
thanks,
sabasit
Hi Sabasit, MT_Dialog is looking at this . He will report back as soon as he has any conclusion or questions. Sorry for delay, we are super busy right now.. BR JE_Dialog
Hi sabasit
Sorry for the delay, if understand correctly you are calling from your host app_read_rssi() and you expect the indication on the device. This is not how the rssi is retrieved from a device. The rssi is stored in every packet you exchange with the host. You should implement the read_rssi() in your peripheral and call it from there in order to get the rssi value. A good place would be the app_aynch_trm() function to get values from the rssi.
uint8_t app_last_ble_evt __attribute__((section("retention_mem_area0"), zero_init));
uint8_t ble_evt;
ble_evt = app_last_rwble_evt_get(); //get last BLE event
if (ble_evt != app_last_ble_evt) // If it is not equal to the previous event
{
app_last_ble_evt = ble_evt; // update current event
if (app_last_ble_evt == BLE_EVT_END) //synch with BLE event end
{
app_read_rssi(); //your code goes here
}
}
Thanks MT_dialog
Hi MT_dialog,
thanks for response. I am implementing and I will ask you for help if I see any problem.
thanks,
sabasit