panu_demo.c (e501bae08349e058caa4648e0af3dd01cbd89d20) | panu_demo.c (fb3896319c8d6fd0c347f732c9f703ed52c090cc) |
---|---|
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 --- 342 unchanged lines hidden (view full) --- 351 case BNEP_EVENT_CHANNEL_OPENED: 352 if (bnep_event_channel_opened_get_status(packet)) { 353 printf("BNEP channel open failed, status %02x\n", bnep_event_channel_opened_get_status(packet)); 354 } else { 355 bnep_cid = bnep_event_channel_opened_get_bnep_cid(packet); 356 uuid_source = bnep_event_channel_opened_get_source_uuid(packet); 357 uuid_dest = bnep_event_channel_opened_get_destination_uuid(packet); 358 mtu = bnep_event_channel_opened_get_mtu(packet); | 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 --- 342 unchanged lines hidden (view full) --- 351 case BNEP_EVENT_CHANNEL_OPENED: 352 if (bnep_event_channel_opened_get_status(packet)) { 353 printf("BNEP channel open failed, status %02x\n", bnep_event_channel_opened_get_status(packet)); 354 } else { 355 bnep_cid = bnep_event_channel_opened_get_bnep_cid(packet); 356 uuid_source = bnep_event_channel_opened_get_source_uuid(packet); 357 uuid_dest = bnep_event_channel_opened_get_destination_uuid(packet); 358 mtu = bnep_event_channel_opened_get_mtu(packet); |
359 memcpy(&event_addr, &packet[11], sizeof(bd_addr_t)); | 359 bnep_event_channel_opened_get_remote_address(packet, event_addr); |
360 printf("BNEP connection open succeeded to %s source UUID 0x%04x dest UUID: 0x%04x, max frame size %u\n", bd_addr_to_str(event_addr), uuid_source, uuid_dest, mtu); | 360 printf("BNEP connection open succeeded to %s source UUID 0x%04x dest UUID: 0x%04x, max frame size %u\n", bd_addr_to_str(event_addr), uuid_source, uuid_dest, mtu); |
361 |
|
361 /* Setup network interface */ 362 gap_local_bd_addr(local_addr); 363 btstack_network_up(local_addr); 364 printf("Network Interface %s activated\n", btstack_network_get_name()); 365 } 366 break; 367 368 /* @text If there is a timeout during the connection setup, BNEP_EVENT_CHANNEL_TIMEOUT will be received --- 85 unchanged lines hidden --- | 362 /* Setup network interface */ 363 gap_local_bd_addr(local_addr); 364 btstack_network_up(local_addr); 365 printf("Network Interface %s activated\n", btstack_network_get_name()); 366 } 367 break; 368 369 /* @text If there is a timeout during the connection setup, BNEP_EVENT_CHANNEL_TIMEOUT will be received --- 85 unchanged lines hidden --- |