mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-01 01:13:23 +00:00
sm_pairing_central: add dummy GATT DB
This commit is contained in:
parent
f4cac3dd72
commit
e5779dd230
@ -207,8 +207,8 @@ hog_mouse_demo: hog_mouse_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SER
|
|||||||
sm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} sm_pairing_peripheral.c
|
sm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} sm_pairing_peripheral.c
|
||||||
${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
||||||
|
|
||||||
sm_pairing_central: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} sm_pairing_central.o
|
sm_pairing_central: sm_pairing_central.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} sm_pairing_central.o
|
||||||
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
${CC} $(filter-out sm_pairing_central.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
||||||
|
|
||||||
le_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} le_streamer.c
|
le_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} le_streamer.c
|
||||||
${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "btstack.h"
|
#include "btstack.h"
|
||||||
|
#include "sm_pairing_peripheral.h"
|
||||||
|
|
||||||
|
|
||||||
// We're looking for a remote device that lists this service in the advertisement
|
// We're looking for a remote device that lists this service in the advertisement
|
||||||
@ -91,6 +92,10 @@ static void sm_pairing_central_setup(void){
|
|||||||
sm_event_callback_registration.callback = &packet_handler;
|
sm_event_callback_registration.callback = &packet_handler;
|
||||||
sm_add_event_handler(&sm_event_callback_registration);
|
sm_add_event_handler(&sm_event_callback_registration);
|
||||||
|
|
||||||
|
// setup ATT server
|
||||||
|
att_server_init(profile_data, NULL, NULL);
|
||||||
|
att_server_register_packet_handler(packet_handler);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Choose ONE of the following configurations
|
* Choose ONE of the following configurations
|
||||||
*/
|
*/
|
||||||
|
7
example/sm_pairing_central.gatt
Normal file
7
example/sm_pairing_central.gatt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
PRIMARY_SERVICE, GAP_SERVICE
|
||||||
|
CHARACTERISTIC, GAP_DEVICE_NAME, READ, "SM Pairing Central"
|
||||||
|
|
||||||
|
// Dummy Service
|
||||||
|
PRIMARY_SERVICE, 0000FF10-0000-1000-8000-00805F9B34FB
|
||||||
|
// Dummy Service, Characteristic, with read and notify + authentication
|
||||||
|
CHARACTERISTIC, 0000FF12-0000-1000-8000-00805F9B34FB, READ | ENCRYPTION_KEY_SIZE_16, "Secure :)"
|
Loading…
x
Reference in New Issue
Block a user