|
37 | 37 | static struct bt_conn *pairing_conn;
|
38 | 38 | #endif /* CONFIG_BT_CONN */
|
39 | 39 |
|
40 |
| -#define DATA_BREDR_MTU 48 |
| 40 | +#define DATA_BREDR_MTU 200 |
41 | 41 |
|
42 | 42 | NET_BUF_POOL_FIXED_DEFINE(data_tx_pool, 1, BT_L2CAP_SDU_BUF_SIZE(DATA_BREDR_MTU),
|
43 | 43 | CONFIG_BT_CONN_TX_USER_DATA_SIZE, NULL);
|
@@ -311,11 +311,27 @@ static struct net_buf *l2cap_alloc_buf(struct bt_l2cap_chan *chan)
|
311 | 311 | return net_buf_alloc(&data_rx_pool, K_NO_WAIT);
|
312 | 312 | }
|
313 | 313 |
|
| 314 | +#if defined(CONFIG_BT_L2CAP_SEG_RECV) |
| 315 | +static void seg_recv(struct bt_l2cap_chan *chan, size_t sdu_len, off_t seg_offset, |
| 316 | + struct net_buf_simple *seg) |
| 317 | +{ |
| 318 | + bt_shell_print("Incoming data channel %p SDU len %u offset %lu len %u", chan, sdu_len, |
| 319 | + seg_offset, seg->len); |
| 320 | + |
| 321 | + if (seg->len) { |
| 322 | + bt_shell_hexdump(seg->data, seg->len); |
| 323 | + } |
| 324 | +} |
| 325 | +#endif /* CONFIG_BT_L2CAP_SEG_RECV */ |
| 326 | + |
314 | 327 | static const struct bt_l2cap_chan_ops l2cap_ops = {
|
315 | 328 | .alloc_buf = l2cap_alloc_buf,
|
316 | 329 | .recv = l2cap_recv,
|
317 | 330 | .connected = l2cap_connected,
|
318 | 331 | .disconnected = l2cap_disconnected,
|
| 332 | +#if defined(CONFIG_BT_L2CAP_SEG_RECV) |
| 333 | + .seg_recv = seg_recv, |
| 334 | +#endif /* CONFIG_BT_L2CAP_SEG_RECV */ |
319 | 335 | };
|
320 | 336 |
|
321 | 337 | #define BT_L2CAP_BR_SERVER_OPT_RET BIT(0)
|
|
0 commit comments