att_server.c (1979f09cf045e87f55a9cd8067e8ef902cc8d78b) | att_server.c (f2372b4464d65b83ce0d8c0109444cfcf21b67c0) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 1137 unchanged lines hidden (view full) --- 1146 sm_event_callback_registration.callback = &att_event_packet_handler; 1147 sm_add_event_handler(&sm_event_callback_registration); 1148 1149 // and L2CAP ATT Server PDUs 1150 att_dispatch_register_server(att_packet_handler); 1151 1152#ifdef ENABLE_GATT_OVER_CLASSIC 1153 // setup l2cap service | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 1137 unchanged lines hidden (view full) --- 1146 sm_event_callback_registration.callback = &att_event_packet_handler; 1147 sm_add_event_handler(&sm_event_callback_registration); 1148 1149 // and L2CAP ATT Server PDUs 1150 att_dispatch_register_server(att_packet_handler); 1151 1152#ifdef ENABLE_GATT_OVER_CLASSIC 1153 // setup l2cap service |
1154 l2cap_register_service(&att_event_packet_handler, PSM_ATT, 0xffff, LEVEL_2); | 1154 l2cap_register_service(&att_event_packet_handler, PSM_ATT, 0xffff, gap_get_security_level()); |
1155#endif 1156 1157 att_set_db(db); 1158 att_set_read_callback(att_server_read_callback); 1159 att_set_write_callback(att_server_write_callback); 1160} 1161 1162void att_server_register_packet_handler(btstack_packet_handler_t handler){ --- 88 unchanged lines hidden --- | 1155#endif 1156 1157 att_set_db(db); 1158 att_set_read_callback(att_server_read_callback); 1159 att_set_write_callback(att_server_write_callback); 1160} 1161 1162void att_server_register_packet_handler(btstack_packet_handler_t handler){ --- 88 unchanged lines hidden --- |