I using the Proximity project , I transmit with the reporter and receive advertising info with the monitor ,
On the monitor side I can't understand where is the specific code for receiving the advertising message and how I can catch the received data.
Tue, 2015-01-20 12:53
#1
Proximity Monitor stack
Hello Tzvika,
I am not very sure if this since I didn't test this, but I think you should look in the fileapp_task_handlers.h。去行~ 50 will find something like this:
EXTERN const struct ke_msg_handler app_default_state[] =
{
{GAPM_DEVICE_READY_IND, (ke_msg_func_t)gapm_device_ready_ind_handler},
{GAPM_CMP_EVT, (ke_msg_func_t)gapm_cmp_evt_handler},
{GAPC_CMP_EVT, (ke_msg_func_t)gapc_cmp_evt_handler},
{GAPC_CONNECTION_REQ_IND, (ke_msg_func_t)gapc_connection_req_ind_handler},
{GAPC_DISCONNECT_IND, (ke_msg_func_t)gapc_disconnect_ind_handler},
{APP_MODULE_INIT_CMP_EVT, (ke_msg_func_t)app_module_init_cmp_evt_handler},
{GAPM_ADV_REPORT_IND, (ke_msg_func_t)gapm_adv_report_ind_handler},
。..
There you see
GAPM_ADV_REPORT_IND
andGAPC_CONNECTION_REQ_IND
handler functions. If you right click corresponding handler functions in µVision, and clickGo to definition of '....'。For example, forGAPM_ADV_REPORT_IND
this will ultimately lead you to functionapp_adv_report_ind_func
in yourapp_your_project_proj.cfile. There you can add wanted functionality, or to call to your own function.I hope this helps
It's look good but , I am using SDK 3.0.6 and can't found the app_task_handlers.h file. at the monitor_fe_usb project . however, I can found this file at the reporter_fh project but it is not help me at the Monitor poject.
Hello Tzvika, I have asked Robert (who visited you) to take a look at this when he gets back to Netherlands... he will be in touch shortly.
Thankyou again Vesa for your great contribution to the DA14580 community !
BR JE_Dialog
thanks,
How to set the " app_myproject_proj.c "( um-b-003…) to works as Proximity monitor , only the scanner part , that mean how to set " app_myproject_proj.c" to work as scanner and enable receiving and manipulate the receiving advertising message
Hello Tzvika,
You can see the advertising data from the GAPM_ADV_REPORT_IND event. It has the following structure:
/// Advertising or scanning report information event
struct gapm_adv_report_ind
{
/// Advertising report structure
struct adv_report report;
};
regards,
DIALOG TEAM
My question was how to set the " app_myproject_proj.c "( um-b-003…) to works as scanner and not by defualt as reporter.
Hi,
Again, how to set the " app_myproject_proj.c "( um-b-003…) to works as scanner and not by defualt as reporter.