CYW20719 snip.bt.spp

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
user_3082361
Level 1
Level 1
First like received

When appear “Power mgmt status event: bd (14 5f 94 1c 5c 14 ) status:2 hci_status:0”,it often  "SPP pool count:3 free:3 flow_off:1", so the data cannot send in time.

When  appear "Power mgmt status event: bd (14 5f 94 1c 5c 14 ) status:0 hci_status:0" ,then "SPP pool count:3 free:3 flow_off:0",so data can send in time.

How can I do to keep "Power mgmt status event: bd (14 5f 94 1c 5c 14 ) status:0", Thanks!

0 Likes
1 Solution

Hi hsqyo_3082361​,

Status : 2 indicates that the device is entering to sniff mode,giving status WICED_POWER_STATE_SNIFF with status code 2.

Can you try putting following code and see if it works:

if (p_power_mgmt_notification->status == WICED_POWER_STATE_SNIFF)

        {

            result = wiced_bt_dev_cancel_sniff_mode( p_power_mgmt_notification->bd_addr );

            WICED_BT_TRACE("sniff mode cancel = %d", result);

        }

The API returns WICED_BT_PENDING after successful cancellation of sniff mode.

View solution in original post

5 Replies
user_3082361
Level 1
Level 1
First like received

    case BTM_POWER_MANAGEMENT_STATUS_EVT:

        p_power_mgmt_notification = &p_event_data->power_mgmt_notification;

        WICED_BT_TRACE("Power mgmt status event: bd (%B) status:%d hci_status:%d\n", p_power_mgmt_notification->bd_addr, \

                p_power_mgmt_notification->status, p_power_mgmt_notification->hci_status);

        //  I add some code as as below.   Every few seconds it enter status:2 again.

       // How to disable enter status:2

        if(p_power_mgmt_notification->status==2){

            if(wiced_bt_dev_cancel_sniff_mode(p_power_mgmt_notification->bd_addr)==WICED_BT_PENDING){

                WICED_BT_TRACE("success\n");

            }

            else WICED_BT_TRACE("error\n");

        }

        break;

0 Likes

Hi hsqyo_3082361​,

Status : 2 indicates that the device is entering to sniff mode,giving status WICED_POWER_STATE_SNIFF with status code 2.

Can you try putting following code and see if it works:

if (p_power_mgmt_notification->status == WICED_POWER_STATE_SNIFF)

        {

            result = wiced_bt_dev_cancel_sniff_mode( p_power_mgmt_notification->bd_addr );

            WICED_BT_TRACE("sniff mode cancel = %d", result);

        }

The API returns WICED_BT_PENDING after successful cancellation of sniff mode.

shjl  Thank you for your reply.

Yes,it works

but every few seconds it enter  WICED_POWER_STATE_SNIFF again.

how to keep in WICED_POWER_STATE_ACTIVE

Regarding the final question Roso asks, "how to keep in WICED_POWER_STATE_ACTIVE"...

Roso, did you resolve the issue?

or Sheetal, is there a recommendation. If appropriate, please re-direct to a new thread/post where the question of how to keep in WICED_POWER_STATE_ACTIVE is answered.

There is some reference inforation in the  @ API Reference: WICED Studio 6.2.1 (CYW20719) though the question isn't specifically answered.

Greg

0 Likes

Hi Greg,

Continuing this discussion on WICED_POWER_STATE_SNIFF

0 Likes