BLE ISO channel send error when updating from 3.0.2 to 3.1.0

Hi,

We are getting packets a count mismatch error immediately after first successful bt_iso_chan_send() call, preventing ISO communication that worked in 3.0.2.

This is our settings:


static struct bt_iso_chan_io_qos cen_iso_tx = {
     .sdu = 155,
    .phy = BT_GAP_LE_PHY_2M,
    .rtn = 2,
};

static struct bt_iso_chan_io_qos cen_iso_rx = {
    .sdu = 155,
    .phy = BT_GAP_LE_PHY_2M,
    .rtn = 2,
};

static struct bt_iso_chan_qos iso_qos = {
    .tx = &cen_iso_tx,
    .rx = &cen_iso_rx,
};

static void iso_connected(struct bt_iso_chan *chan) {
    LOG_INF("ISO Channel connected");
    k_work_submit(&iso_load_SDU_work); // Send single packet
}

static void iso_sent(struct bt_iso_chan *chan) {
    LOG_INF("ISO sent callback");
    // No additional sends - just one packet triggers the bug
}

static struct bt_iso_chan_ops iso_ops = {
    .connected = iso_connected,
    .sent = iso_sent,
};

void iso_load(struct bt_iso_chan *iso_chan, uint16_t seq_num, uint64_t clock) {
    uint8_t buf_data[8];
    struct net_buf *buf;

    memcpy(buf_data, &clock, sizeof(clock));

    buf = net_buf_alloc(&tx_pool, K_NO_WAIT);
    if (buf != NULL) {
        net_buf_reserve(buf, BT_ISO_CHAN_SEND_RESERVE);
        net_buf_add_mem(buf, buf_data, sizeof(clock));

        int ret = bt_iso_chan_send(iso_chan, buf, seq_num);
        if (ret < 0) {
            net_buf_unref(buf);
       }
       // ERROR OCCURS HERE - immediately after successful send
    }
}

// CIG creation with standard parameters
struct bt_iso_cig_param param = {
    .cis_channels = channels,
    .num_cis = 1,
    .sca = BT_GAP_SCA_UNKNOWN,
    .packing = BT_ISO_PACKING_SEQUENTIAL,
    .framing = BT_ISO_FRAMING_UNFRAMED,
    .c_to_p_latency = 60,
    .p_to_c_latency = 60,
    .c_to_p_interval = 10000,
    .p_to_c_interval = 10000,
};

This is the CONFIG setting:

CONFIG_BT=y

CONFIG_BT_ISO=y

CONFIG_BT_ISO_CENTRAL=y

CONFIG_BT_ISO_TX_MTU=155

Please let me know if you require further information.
It may be there is something we needed to do in the move from 3.0.2 to 3.1.0

Thanks

James

Parents Reply Children
No Data
Related