Just bringing this to your attention. This has been an issue since at least 2.6.1, and appears to still be a problem in main.
| static void connected(struct bt_conn *conn, uint8_t err) { if (err) { printk("Connection failed, err 0x%02x %s\n", err, bt_hci_err_to_str(err)); } else { printk("Connected\n"); } |
should be
|
static void connected(struct bt_conn *conn, uint8_t err) |
to avoid taking a reference of a failed connection attempt.
I'm not blocked by this.