spp_counter.c (2fca4dad957cd7b88f4657ed51e89c12615dda72) spp_counter.c (8c9bb29ec24759ba592d72f79417df812fd8a97f)
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

--- 76 unchanged lines hidden (view full) ---

85static void spp_service_setup(void){
86
87 // register for HCI events
88 hci_event_callback_registration.callback = &packet_handler;
89 hci_add_event_handler(&hci_event_callback_registration);
90
91 l2cap_init();
92
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

--- 76 unchanged lines hidden (view full) ---

85static void spp_service_setup(void){
86
87 // register for HCI events
88 hci_event_callback_registration.callback = &packet_handler;
89 hci_add_event_handler(&hci_event_callback_registration);
90
91 l2cap_init();
92
93#ifdef ENABLE_BLE
94 // Initialize LE Security Manager. Needed for cross-transport key derivation
95 sm_init();
96#endif
97
93 rfcomm_init();
94 rfcomm_register_service(packet_handler, RFCOMM_SERVER_CHANNEL, 0xffff); // reserved channel, mtu limited by l2cap
95
96 // init SDP, create record for SPP and register with SDP
97 sdp_init();
98 memset(spp_service_buffer, 0, sizeof(spp_service_buffer));
99 spp_create_sdp_record(spp_service_buffer, 0x10001, RFCOMM_SERVER_CHANNEL, "SPP Counter");
100 sdp_register_service(spp_service_buffer);

--- 170 unchanged lines hidden ---
98 rfcomm_init();
99 rfcomm_register_service(packet_handler, RFCOMM_SERVER_CHANNEL, 0xffff); // reserved channel, mtu limited by l2cap
100
101 // init SDP, create record for SPP and register with SDP
102 sdp_init();
103 memset(spp_service_buffer, 0, sizeof(spp_service_buffer));
104 spp_create_sdp_record(spp_service_buffer, 0x10001, RFCOMM_SERVER_CHANNEL, "SPP Counter");
105 sdp_register_service(spp_service_buffer);

--- 170 unchanged lines hidden ---