mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-27 15:35:30 +00:00
le_data_channel_server: add dummy ATT Server
This commit is contained in:
parent
cf9641eb81
commit
5b6326f143
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include "btstack.h"
|
#include "btstack.h"
|
||||||
|
|
||||||
#define TEST_STREAM_DATA
|
// #define TEST_STREAM_DATA
|
||||||
#define TEST_PACKET_SIZE 1000
|
#define TEST_PACKET_SIZE 1000
|
||||||
|
|
||||||
#define REPORT_INTERVAL_MS 3000
|
#define REPORT_INTERVAL_MS 3000
|
||||||
@ -66,7 +66,7 @@ const uint8_t adv_data[] = {
|
|||||||
// Flags general discoverable, BR/EDR not supported
|
// Flags general discoverable, BR/EDR not supported
|
||||||
0x02, 0x01, 0x06,
|
0x02, 0x01, 0x06,
|
||||||
// Name
|
// Name
|
||||||
0x0c, 0x09, 'L', 'E', ' ', 'D', 'a', 't', 'a', ' ', 'C', 'h', 'a', 'n', 'n', 'e', 'l',
|
0x10, 0x09, 'L', 'E', ' ', 'D', 'a', 't', 'a', ' ', 'C', 'h', 'a', 'n', 'n', 'e', 'l',
|
||||||
};
|
};
|
||||||
const uint8_t adv_data_len = sizeof(adv_data);
|
const uint8_t adv_data_len = sizeof(adv_data);
|
||||||
|
|
||||||
@ -113,6 +113,9 @@ static void le_data_channel_setup(void){
|
|||||||
// setup SM: Display only
|
// setup SM: Display only
|
||||||
sm_init();
|
sm_init();
|
||||||
|
|
||||||
|
// setup ATT server: iOS disconnects if ATT MTU Exchange fails
|
||||||
|
att_server_init(NULL, NULL, NULL);
|
||||||
|
|
||||||
// le data channel setup
|
// le data channel setup
|
||||||
l2cap_le_register_service(&packet_handler, TSPX_le_psm, LEVEL_0);
|
l2cap_le_register_service(&packet_handler, TSPX_le_psm, LEVEL_0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user