3 Copyright (C) Dean Camera, 2010.
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
10 Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
12 Permission to use, copy, modify, distribute, and sell this
13 software and its documentation for any purpose is hereby granted
14 without fee, provided that the above copyright notice appear in
15 all copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
31 #define INCLUDE_FROM_BLUETOOTH_ACLPACKETS_C
32 #include "BluetoothACLPackets.h"
34 void Bluetooth_ACLTask(void)
36 Bluetooth_ProcessACLPackets();
38 for (uint8_t i
= 0; i
< BLUETOOTH_MAX_OPEN_CHANNELS
; i
++)
40 Bluetooth_Channel_t
* ChannelData
= &Bluetooth_Connection
.Channels
[i
];
42 bool MustSendConfigReq
= true;
44 switch (ChannelData
->State
)
46 case Channel_Config_WaitConfig
:
47 ChannelData
->State
= Channel_Config_WaitReqResp
;
49 case Channel_Config_WaitSendConfig
:
50 ChannelData
->State
= Channel_Config_WaitResp
;
53 MustSendConfigReq
= false;
57 if (MustSendConfigReq
)
59 BT_ACL_Header_t ACLPacketHeader
;
60 BT_DataPacket_Header_t DataHeader
;
61 BT_Signal_Header_t SignalCommandHeader
;
62 BT_Signal_ConfigurationReq_t ConfigurationRequest
;
64 ACLPacketHeader
.ConnectionHandle
= Bluetooth_Connection
.ConnectionHandle
;
65 ACLPacketHeader
.DataLength
= sizeof(DataHeader
) + sizeof(SignalCommandHeader
) + sizeof(ConfigurationRequest
);
66 DataHeader
.PayloadLength
= sizeof(SignalCommandHeader
) + sizeof(ConfigurationRequest
);
67 DataHeader
.DestinationChannel
= BT_CHANNEL_SIGNALING
;
68 SignalCommandHeader
.Code
= BT_SIGNAL_CONFIGURATION_REQUEST
;
69 SignalCommandHeader
.Identifier
= ++Bluetooth_Connection
.SignallingIdentifier
;
70 SignalCommandHeader
.Length
= sizeof(ConfigurationRequest
);
72 ConfigurationRequest
.DestinationChannel
= ChannelData
->RemoteNumber
;
73 ConfigurationRequest
.Flags
= 0;
75 Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE
);
78 Pipe_Write_Stream_LE(&ACLPacketHeader
, sizeof(ACLPacketHeader
));
79 Pipe_Write_Stream_LE(&DataHeader
, sizeof(DataHeader
));
80 Pipe_Write_Stream_LE(&SignalCommandHeader
, sizeof(SignalCommandHeader
));
81 Pipe_Write_Stream_LE(&ConfigurationRequest
, sizeof(ConfigurationRequest
));
85 #if (ACL_DEBUG_LEVEL > 1)
86 BT_ACL_DEBUG("Packet Sent", NULL
);
87 BT_ACL_DEBUG("-- Connection Handle: 0x%04X", (ACLPacketHeader
.ConnectionHandle
& 0x0FFF));
88 BT_ACL_DEBUG("-- Data Length: 0x%04X", ACLPacketHeader
.DataLength
);
89 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", DataHeader
.DestinationChannel
);
90 BT_ACL_DEBUG("-- Payload Length: 0x%04X", DataHeader
.PayloadLength
);
92 #if (ACL_DEBUG_LEVEL > 0)
93 BT_ACL_DEBUG(">> L2CAP Configuration Request", NULL
);
95 #if (ACL_DEBUG_LEVEL > 1)
96 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", ConfigurationRequest
.DestinationChannel
);
102 static void Bluetooth_ProcessACLPackets(void)
104 BT_ACL_Header_t ACLPacketHeader
;
105 BT_DataPacket_Header_t DataHeader
;
107 Pipe_SelectPipe(BLUETOOTH_DATA_IN_PIPE
);
110 if (!(Pipe_IsReadWriteAllowed()))
116 Pipe_Read_Stream_LE(&ACLPacketHeader
, sizeof(ACLPacketHeader
));
117 Pipe_Read_Stream_LE(&DataHeader
, sizeof(DataHeader
));
119 #if (ACL_DEBUG_LEVEL > 1)
120 BT_ACL_DEBUG("Packet Received", NULL
);
121 BT_ACL_DEBUG("-- Connection Handle: 0x%04X", (ACLPacketHeader
.ConnectionHandle
& 0x0FFF));
122 BT_ACL_DEBUG("-- Data Length: 0x%04X", ACLPacketHeader
.DataLength
);
123 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", DataHeader
.DestinationChannel
);
124 BT_ACL_DEBUG("-- Payload Length: 0x%04X", DataHeader
.PayloadLength
);
127 if (DataHeader
.DestinationChannel
== BT_CHANNEL_SIGNALING
)
129 BT_Signal_Header_t SignalCommandHeader
;
130 Pipe_Read_Stream_LE(&SignalCommandHeader
, sizeof(SignalCommandHeader
));
132 switch (SignalCommandHeader
.Code
)
134 case BT_SIGNAL_CONNECTION_REQUEST
:
135 Bluetooth_Signal_ConnectionReq(&ACLPacketHeader
, &DataHeader
, &SignalCommandHeader
);
137 case BT_SIGNAL_CONFIGURATION_REQUEST
:
138 Bluetooth_Signal_ConfigurationReq(&ACLPacketHeader
, &DataHeader
, &SignalCommandHeader
);
140 case BT_SIGNAL_DISCONNECTION_REQUEST
:
141 Bluetooth_Signal_DisconnectionReq(&ACLPacketHeader
, &DataHeader
, &SignalCommandHeader
);
143 case BT_SIGNAL_ECHO_REQUEST
:
144 Bluetooth_Signal_EchoReq(&ACLPacketHeader
, &DataHeader
, &SignalCommandHeader
);
146 case BT_SIGNAL_INFORMATION_REQUEST
:
147 Bluetooth_Signal_InformationReq(&ACLPacketHeader
, &DataHeader
, &SignalCommandHeader
);
150 #if (ACL_DEBUG_LEVEL > 0)
151 BT_ACL_DEBUG("<< Unknown Signaling Command 0x%02X", SignalCommandHeader
.Code
);
154 Pipe_Discard_Stream(ACLPacketHeader
.DataLength
);
162 Bluetooth_PacketReceived(&DataHeader
.PayloadLength
, Bluetooth_GetChannelData(DataHeader
.DestinationChannel
, true));
164 Pipe_SelectPipe(BLUETOOTH_DATA_IN_PIPE
);
165 Pipe_Discard_Stream(DataHeader
.PayloadLength
);
171 uint8_t Bluetooth_SendPacket(uint8_t* Data
, uint16_t DataLen
, Bluetooth_Channel_t
* Channel
)
173 BT_ACL_Header_t ACLPacketHeader
;
174 BT_DataPacket_Header_t DataHeader
;
176 if (Bluetooth_Connection
.IsConnected
)
177 return BT_SENDPACKET_NotConnected
;
179 if (Channel
->State
!= Channel_Open
)
180 return BT_SENDPACKET_ChannelNotOpen
;
182 ACLPacketHeader
.ConnectionHandle
= Bluetooth_Connection
.ConnectionHandle
;
183 ACLPacketHeader
.DataLength
= sizeof(DataHeader
) + DataLen
;
184 DataHeader
.DestinationChannel
= Channel
->RemoteNumber
;
185 DataHeader
.PayloadLength
= DataLen
;
187 Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE
);
190 Pipe_Write_Stream_LE(&ACLPacketHeader
, sizeof(ACLPacketHeader
));
191 Pipe_Write_Stream_LE(&DataHeader
, sizeof(DataHeader
));
192 Pipe_Write_Stream_LE(Data
, DataLen
);
196 return BT_SENDPACKET_NoError
;
199 static inline void Bluetooth_Signal_ConnectionReq(BT_ACL_Header_t
* ACLPacketHeader
,
200 BT_DataPacket_Header_t
* DataHeader
,
201 BT_Signal_Header_t
* SignalCommandHeader
)
203 BT_Signal_ConnectionReq_t ConnectionRequest
;
205 Pipe_Read_Stream_LE(&ConnectionRequest
, sizeof(ConnectionRequest
));
207 #if (ACL_DEBUG_LEVEL > 0)
208 BT_ACL_DEBUG("<< L2CAP Connection Request", NULL
);
210 #if (ACL_DEBUG_LEVEL > 1)
211 BT_ACL_DEBUG("-- PSM: 0x%04X", ConnectionRequest
.PSM
);
212 BT_ACL_DEBUG("-- Source Channel: 0x%04X", ConnectionRequest
.SourceChannel
);
217 Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE
);
220 BT_Signal_ConnectionResp_t ConnectionResponse
;
222 ACLPacketHeader
->DataLength
= sizeof(*DataHeader
) + sizeof(*SignalCommandHeader
) + sizeof(ConnectionResponse
);
223 DataHeader
->PayloadLength
= sizeof(*SignalCommandHeader
) + sizeof(ConnectionResponse
);
224 DataHeader
->DestinationChannel
= BT_CHANNEL_SIGNALING
;
225 SignalCommandHeader
->Code
= BT_SIGNAL_CONNECTION_RESPONSE
;
226 SignalCommandHeader
->Length
= sizeof(ConnectionResponse
);
228 Bluetooth_Channel_t
* ChannelData
= Bluetooth_InitChannelData(ConnectionRequest
.SourceChannel
, ConnectionRequest
.PSM
);
230 ConnectionResponse
.Result
= (ChannelData
== NULL
) ? BT_CONNECTION_REFUSED_RESOURCES
: BT_CONNECTION_SUCCESSFUL
;
231 ConnectionResponse
.DestinationChannel
= ChannelData
->LocalNumber
;
232 ConnectionResponse
.SourceChannel
= ChannelData
->RemoteNumber
;
233 ConnectionResponse
.Status
= 0x00;
235 Pipe_Write_Stream_LE(ACLPacketHeader
, sizeof(*ACLPacketHeader
));
236 Pipe_Write_Stream_LE(DataHeader
, sizeof(*DataHeader
));
237 Pipe_Write_Stream_LE(SignalCommandHeader
, sizeof(*SignalCommandHeader
));
238 Pipe_Write_Stream_LE(&ConnectionResponse
, sizeof(ConnectionResponse
));
243 #if (ACL_DEBUG_LEVEL > 1)
244 BT_ACL_DEBUG("Packet Sent", NULL
);
245 BT_ACL_DEBUG("-- Connection Handle: 0x%04X", (ACLPacketHeader
->ConnectionHandle
& 0x0FFF));
246 BT_ACL_DEBUG("-- Data Length: 0x%04X", ACLPacketHeader
->DataLength
);
247 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", DataHeader
->DestinationChannel
);
248 BT_ACL_DEBUG("-- Payload Length: 0x%04X", DataHeader
->PayloadLength
);
250 #if (ACL_DEBUG_LEVEL > 0)
251 BT_ACL_DEBUG(">> L2CAP Connection Response", NULL
);
253 #if (ACL_DEBUG_LEVEL > 1)
254 BT_ACL_DEBUG("-- Source Channel: 0x%04X", ConnectionResponse
.SourceChannel
);
255 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", ConnectionResponse
.DestinationChannel
);
259 static inline void Bluetooth_Signal_ConfigurationReq(BT_ACL_Header_t
* ACLPacketHeader
,
260 BT_DataPacket_Header_t
* DataHeader
,
261 BT_Signal_Header_t
* SignalCommandHeader
)
263 BT_Signal_ConfigurationReq_t ConfigurationRequest
;
264 Pipe_Read_Stream_LE(&ConfigurationRequest
, sizeof(ConfigurationRequest
));
266 // TODO: Process/Discard configuration options here
267 Pipe_Discard_Stream(DataHeader
->PayloadLength
- sizeof(*SignalCommandHeader
));
269 #if (ACL_DEBUG_LEVEL > 0)
270 BT_ACL_DEBUG("<< L2CAP Configuration Request", NULL
);
272 #if (ACL_DEBUG_LEVEL > 1)
273 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", ConfigurationRequest
.DestinationChannel
);
278 Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE
);
281 BT_Signal_ConfigurationResp_t ConfigurationResponse
;
283 ACLPacketHeader
->DataLength
= sizeof(*DataHeader
) + sizeof(*SignalCommandHeader
) + sizeof(ConfigurationResponse
);
284 DataHeader
->PayloadLength
= sizeof(*SignalCommandHeader
) + sizeof(ConfigurationResponse
);
285 DataHeader
->DestinationChannel
= BT_CHANNEL_SIGNALING
;
286 SignalCommandHeader
->Code
= BT_SIGNAL_CONFIGURATION_RESPONSE
;
287 SignalCommandHeader
->Length
= sizeof(ConfigurationResponse
);
289 Bluetooth_Channel_t
* ChannelData
= Bluetooth_GetChannelData(ConfigurationRequest
.DestinationChannel
, false);
291 if (ChannelData
!= NULL
)
293 switch (ChannelData
->State
)
295 case Channel_Config_WaitConfig
:
296 ChannelData
->State
= Channel_Config_WaitSendConfig
;
298 case Channel_Config_WaitReqResp
:
299 ChannelData
->State
= Channel_Config_WaitResp
;
301 case Channel_Config_WaitReq
:
302 ChannelData
->State
= Channel_Open
;
307 // TODO: Add channel config data to the tail of ConfigurationResponse
309 ConfigurationResponse
.SourceChannel
= ChannelData
->RemoteNumber
;
310 ConfigurationResponse
.Flags
= 0x00;
311 ConfigurationResponse
.Result
= (ChannelData
!= NULL
) ? BT_CONFIGURATION_SUCCESSFUL
: BT_CONFIGURATION_REJECTED
;
313 Pipe_Write_Stream_LE(ACLPacketHeader
, sizeof(*ACLPacketHeader
));
314 Pipe_Write_Stream_LE(DataHeader
, sizeof(*DataHeader
));
315 Pipe_Write_Stream_LE(SignalCommandHeader
, sizeof(*SignalCommandHeader
));
316 Pipe_Write_Stream_LE(&ConfigurationResponse
, sizeof(ConfigurationResponse
));
321 #if (ACL_DEBUG_LEVEL > 1)
322 BT_ACL_DEBUG("Packet Sent", NULL
);
323 BT_ACL_DEBUG("-- Connection Handle: 0x%04X", (ACLPacketHeader
->ConnectionHandle
& 0x0FFF));
324 BT_ACL_DEBUG("-- Data Length: 0x%04X", ACLPacketHeader
->DataLength
);
325 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", DataHeader
->DestinationChannel
);
326 BT_ACL_DEBUG("-- Payload Length: 0x%04X", DataHeader
->PayloadLength
);
328 #if (ACL_DEBUG_LEVEL > 0)
329 BT_ACL_DEBUG(">> L2CAP Configuration Response", NULL
);
331 #if (ACL_DEBUG_LEVEL > 1)
332 BT_ACL_DEBUG("-- Result: 0x%02X", ConfigurationResponse
.Result
);
336 static inline void Bluetooth_Signal_DisconnectionReq(BT_ACL_Header_t
* ACLPacketHeader
,
337 BT_DataPacket_Header_t
* DataHeader
,
338 BT_Signal_Header_t
* SignalCommandHeader
)
340 BT_Signal_DisconnectionReq_t DisconnectionRequest
;
342 Pipe_Read_Stream_LE(&DisconnectionRequest
, sizeof(DisconnectionRequest
));
344 #if (ACL_DEBUG_LEVEL > 0)
345 BT_ACL_DEBUG("<< L2CAP Disconnection Request", NULL
);
347 #if (ACL_DEBUG_LEVEL > 1)
348 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", DisconnectionRequest
.DestinationChannel
);
349 BT_ACL_DEBUG("-- Source Channel: 0x%04X", DisconnectionRequest
.SourceChannel
);
354 Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE
);
357 BT_Signal_DisconnectionResp_t DisconnectionResponse
;
359 ACLPacketHeader
->DataLength
= sizeof(*DataHeader
) + sizeof(*SignalCommandHeader
) + sizeof(DisconnectionResponse
);
360 DataHeader
->PayloadLength
= sizeof(*SignalCommandHeader
) + sizeof(DisconnectionResponse
);
361 DataHeader
->DestinationChannel
= BT_CHANNEL_SIGNALING
;
362 SignalCommandHeader
->Code
= BT_SIGNAL_DISCONNECTION_RESPONSE
;
363 SignalCommandHeader
->Length
= sizeof(DisconnectionResponse
);
365 Bluetooth_Channel_t
* ChannelData
= Bluetooth_GetChannelData(DisconnectionRequest
.SourceChannel
, true);
367 if (ChannelData
!= NULL
)
368 ChannelData
->State
= Channel_Closed
;
370 DisconnectionResponse
.DestinationChannel
= ChannelData
->LocalNumber
;
371 DisconnectionResponse
.SourceChannel
= ChannelData
->RemoteNumber
;
373 Pipe_Write_Stream_LE(ACLPacketHeader
, sizeof(*ACLPacketHeader
));
374 Pipe_Write_Stream_LE(DataHeader
, sizeof(*DataHeader
));
375 Pipe_Write_Stream_LE(SignalCommandHeader
, sizeof(*SignalCommandHeader
));
376 Pipe_Write_Stream_LE(&DisconnectionResponse
, sizeof(DisconnectionResponse
));
381 #if (ACL_DEBUG_LEVEL > 1)
382 BT_ACL_DEBUG("Packet Sent", NULL
);
383 BT_ACL_DEBUG("-- Connection Handle: 0x%04X", (ACLPacketHeader
->ConnectionHandle
& 0x0FFF));
384 BT_ACL_DEBUG("-- Data Length: 0x%04X", ACLPacketHeader
->DataLength
);
385 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", DataHeader
->DestinationChannel
);
386 BT_ACL_DEBUG("-- Payload Length: 0x%04X", DataHeader
->PayloadLength
);
388 #if (ACL_DEBUG_LEVEL > 0)
389 BT_ACL_DEBUG(">> L2CAP Disconnection Response", NULL
);
391 #if (ACL_DEBUG_LEVEL > 1)
392 BT_ACL_DEBUG("-- Source Channel: 0x%04X", DisconnectionResponse
.SourceChannel
);
393 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", DisconnectionResponse
.DestinationChannel
);
397 static inline void Bluetooth_Signal_EchoReq(BT_ACL_Header_t
* ACLPacketHeader
,
398 BT_DataPacket_Header_t
* DataHeader
,
399 BT_Signal_Header_t
* SignalCommandHeader
)
401 #if (ACL_DEBUG_LEVEL > 0)
402 BT_ACL_DEBUG("<< L2CAP Echo Request", NULL
);
407 Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE
);
410 ACLPacketHeader
->DataLength
= sizeof(*DataHeader
) + sizeof(*SignalCommandHeader
);
411 DataHeader
->PayloadLength
= sizeof(*SignalCommandHeader
);
412 DataHeader
->DestinationChannel
= BT_CHANNEL_SIGNALING
;
413 SignalCommandHeader
->Code
= BT_SIGNAL_ECHO_RESPONSE
;
414 SignalCommandHeader
->Length
= 0;
416 Pipe_Write_Stream_LE(ACLPacketHeader
, sizeof(*ACLPacketHeader
));
417 Pipe_Write_Stream_LE(DataHeader
, sizeof(*DataHeader
));
418 Pipe_Write_Stream_LE(SignalCommandHeader
, sizeof(*SignalCommandHeader
));
423 #if (ACL_DEBUG_LEVEL > 1)
424 BT_ACL_DEBUG("Packet Sent", NULL
);
425 BT_ACL_DEBUG("-- Connection Handle: 0x%04X", (ACLPacketHeader
->ConnectionHandle
& 0x0FFF));
426 BT_ACL_DEBUG("-- Data Length: 0x%04X", ACLPacketHeader
->DataLength
);
427 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", DataHeader
->DestinationChannel
);
428 BT_ACL_DEBUG("-- Payload Length: 0x%04X", DataHeader
->PayloadLength
);
430 #if (ACL_DEBUG_LEVEL > 0)
431 BT_ACL_DEBUG(">> L2CAP Echo Response", NULL
);
435 static inline void Bluetooth_Signal_InformationReq(BT_ACL_Header_t
* ACLPacketHeader
,
436 BT_DataPacket_Header_t
* DataHeader
,
437 BT_Signal_Header_t
* SignalCommandHeader
)
439 BT_Signal_InformationReq_t InformationRequest
;
441 Pipe_Read_Stream_LE(&InformationRequest
, sizeof(InformationRequest
));
443 #if (ACL_DEBUG_LEVEL > 0)
444 BT_ACL_DEBUG("<< Information Request", NULL
);
446 #if (ACL_DEBUG_LEVEL > 1)
447 BT_ACL_DEBUG("-- Info Type: 0x%04X", InformationRequest
.InfoType
);
452 Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE
);
455 BT_Signal_InformationResp_t InformationResponse
;
456 uint8_t ResponseData
[4];
459 switch (InformationRequest
.InfoType
)
462 InformationResponse
.Result
= BT_INFORMATION_SUCCESSFUL
;
465 *((uint16_t*)&ResponseData
) = 65533;
467 case BT_INFOREQ_EXTENDEDFEATURES
:
468 InformationResponse
.Result
= BT_INFORMATION_SUCCESSFUL
;
471 *((uint32_t*)&ResponseData
) = 0;
474 InformationResponse
.Result
= BT_INFORMATION_NOTSUPPORTED
;
479 ACLPacketHeader
->DataLength
= sizeof(*DataHeader
) + sizeof(*SignalCommandHeader
) + sizeof(InformationResponse
) +
481 DataHeader
->PayloadLength
= sizeof(*SignalCommandHeader
) + sizeof(InformationResponse
) + ResponseLen
;
482 DataHeader
->DestinationChannel
= BT_CHANNEL_SIGNALING
;
483 SignalCommandHeader
->Code
= BT_SIGNAL_INFORMATION_RESPONSE
;
484 SignalCommandHeader
->Length
= sizeof(InformationResponse
) + ResponseLen
;
486 Pipe_Write_Stream_LE(ACLPacketHeader
, sizeof(*ACLPacketHeader
));
487 Pipe_Write_Stream_LE(DataHeader
, sizeof(*DataHeader
));
488 Pipe_Write_Stream_LE(SignalCommandHeader
, sizeof(*SignalCommandHeader
));
489 Pipe_Write_Stream_LE(&InformationResponse
, sizeof(InformationResponse
));
490 Pipe_Write_Stream_LE(ResponseData
, ResponseLen
);
495 #if (ACL_DEBUG_LEVEL > 1)
496 BT_ACL_DEBUG("Packet Sent", NULL
);
497 BT_ACL_DEBUG("-- Connection Handle: 0x%04X", (ACLPacketHeader
->ConnectionHandle
& 0x0FFF));
498 BT_ACL_DEBUG("-- Data Length: 0x%04X", ACLPacketHeader
->DataLength
);
499 BT_ACL_DEBUG("-- Destination Channel: 0x%04X", DataHeader
->DestinationChannel
);
500 BT_ACL_DEBUG("-- Payload Length: 0x%04X", DataHeader
->PayloadLength
);
502 #if (ACL_DEBUG_LEVEL > 0)
503 BT_ACL_DEBUG(">> L2CAP Information Response", NULL
);
505 #if (ACL_DEBUG_LEVEL > 1)
506 BT_ACL_DEBUG("-- Result: 0x%02X", InformationResponse
.Result
);