test/pts: add l2cap_test.md

This commit is contained in:
Matthias Ringwald 2021-05-17 17:45:15 +02:00
parent 2cdc82cc65
commit c50d0fce00
2 changed files with 16 additions and 1 deletions

View File

@ -65,7 +65,8 @@
static void show_usage(void);
// static bd_addr_t remote = {0x04,0x0C,0xCE,0xE4,0x85,0xD3};
static bd_addr_t remote = {0x00, 0x1B, 0xDC, 0x07, 0x32, 0xef};;
// static bd_addr_t remote = {0x00, 0x1B, 0xDC, 0x07, 0x32, 0xef};;
static bd_addr_t remote = {0x00, 0x1B, 0xDC, 0x08, 0xe2, 0x72};
static uint16_t handle;
static uint16_t local_cid;
@ -152,6 +153,7 @@ static void show_usage(void){
printf("s - send some data\n");
printf("S - send more data\n");
printf("p - send echo request\n");
printf("i - send connectionless data\n");
printf("e - optional ERTM mode\n");
printf("E - mandatory ERTM mode\n");
printf("b - set channel as busy (ERTM)\n");
@ -188,6 +190,10 @@ static void stdin_process(char buffer){
printf("Send more L2CAP Data\n");
l2cap_send(local_cid, (uint8_t *) "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", 100);
break;
case 'u':
printf("Send connection-less L2CAP Data\n");
l2cap_send_connectionless(handle, 0x0002, (uint8_t *) "0123456789", 10);
break;
case 'd':
printf("L2CAP Channel Closed\n");
l2cap_disconnect(local_cid, 0);

9
test/pts/l2cap_test.md Normal file
View File

@ -0,0 +1,9 @@
# L2CAP Test
# Sequences
- L2CAP/COS/ECH/BV-02-C: c, p, t
- L2CAP/COS/IEX/BV-01-C: c, t
- L2CAP/CLS/CLR/BV-01-C: c, u, t
- L2CAP/FIX/BV-01-C:
- L2CAP/EXF/BV-05-C: