PAWR prevents cancelling a pending connection

I am trying to cancel a pending connection as a workaround for  BT connection timeouts with PAWR enabled .

However when I run:

```

LOG_DBG("Peripheral connection timeout cancelling and trying later");
int err = bt_conn_disconnect(conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN);
if (err) {
LOG_WRN("Failed to disconnect from peripheral (%i)", err);
}
```

 I get:

```

rtt:~$ rtt:~$ [0:0:15.947,723] <dbg> ******: connect_timeout_workfn: Peripheral connection timeout cancelling and trying later
00> rtt:~$ [0:0:15.947,998] <wrn> bt_hci_core: opcode 0x200e status 0xc
00> rtt:~$ [0:0:15.947,998] <wrn> ******: Failed to disconnect from peripheral (-13)

```

I am running this as delayed work 10 seconds after starting a connection attempt.

When I run this with PAWR disabled it succeeds and I get a callback to bt connect callback with an error code

Parents Reply Children
No Data
Related