Hi ,Dialog Engineers:
I'm study the dsps_host project and have done some modification on it. I have start a passive scan using 100% dutycycle (scan interval= scan window = 50), and then start a timer of 10s to cancel the scan. I can get the scanned device bd address on the callback user_on_adv_report_ind(), I print the bdaddr using arch_printf(). and I have save 5 of their information including the bdaddr and the address type.
and user input from the uart is choosed to be connected, I get out the relative bdaddr and device type, and use app_easy_gap_start_connection_to_set() api to start a gapm_connect_start cmd, thus to establish a connection request? is that right? but nothing happened? If failed I should get at user_on_connect_failed() and if success I should get at user_on_connection(), but none of them are catched?
did I have missed somthing to do to start a connection? much of your advice will be much appreciated!
Thu, 2017-03-02 10:04
#1
Nothing happened after dsps_host start a connection?
Device:
嗨chris0409,
Sorry for the late response, first of all you dont have to set a timer to cancel the scanning procedure, if you are scanning in GAP_GEN_DISCOVERY the procedure will end after approximatelly 10 seconds (so you can remove that timer and just restart the scanning the user_on_scanning_completed). Besides that when you invoke the app_easy_gap_start_connection_to_set() make sure that the bd address that you are passing to the command has the value of the device that you would like to connect to and something else isn't passed to that variable. Check if the connection is established in the gapc_connection_req_ind_handler() (this is handler that indicates the connection and after that the function on the user workspace is triggered). Additionally in order to debug this, check the GAPM_CMP_EVT that will be returned from the connection command that you have issued, you will be able to catch that in the gapm_cmp_evt_handler(), check the operation that is the value of the connection code that you 've used and the status of the command returned.
Thanks MT_dialog