- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am writing code to have CCG3PA send a "dpm_pd_command" request to the end device to do a DR_SWAP (data role swap). Originally I thought that the return status (ccg_status_t) will tell me if the end device accepted or rejected the request, but it seems that the ccg status will only tell me if the request is registered or not.
How to I read the response back from the end device to see if it accepted or rejected my DR_SWAP request?
Thanks,
Jonathan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jonathan,
Two ways:
1. Add a timer (about 1s) after you sent DR_SWAP. And define a callback function after timeout. And use the callback function read status as below example.
if(resp == RES_RCVD || pkt_ptr->msg == CTRL_MSG_REJECT)
2. Add judge condition in app.c
Function: void app_event_handler(uint8_t port, app_evt_t evt, const void* dat)
case APP_EVT_DR_SWAP_COMPLETE:
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jonathan,
Two ways:
1. Add a timer (about 1s) after you sent DR_SWAP. And define a callback function after timeout. And use the callback function read status as below example.
if(resp == RES_RCVD || pkt_ptr->msg == CTRL_MSG_REJECT)
2. Add judge condition in app.c
Function: void app_event_handler(uint8_t port, app_evt_t evt, const void* dat)
case APP_EVT_DR_SWAP_COMPLETE:
Best Regards,
Lisa