[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] Modif of function hci_receive_bcsp : strange behavior



Hi Alain,

While looking through your log, I noticed this. It's nothing to do with
your current problem, but it relates to the the problem you were
discussing in the thread "BCSP synchronisation"

> send_cmd_queue:  (7):
> 0x01 0x05 0x0c 0x03 0x00 0x73 0x60

Which decodes as:

01   HCI Command Packet
0c05 Command HCI_Set_Event_Filter
03   3 bytes of parameters
00   Clear all filters
73   *** Illegal trailing byte ***
60   *** Illegal trailing byte ***

To quote from the Bluetooth 1.1 Core spec, part H:1 section 4.7.3, page
625 (the table about filter types):

  [Filter type 0x00 means] Clear All Filters (Note: In this case, the
  Filter_Condition_type and Condition parameters should not be given,
  they should have a length of 0 bytes. Filter_Type should be the only
  parameter.)

The trailing junk is causing BlueCore to generate the hardware error
0x1c which you see later in your log. I think you're getting lucky at
the moment and the command is being processed correctly on your
firmware version (hci-12.7). I say this as I can see you get a command
complete (status success) back. In fact I think this behaviour is
wrong. In the Bluetooth 1.1 Core spec, part H:1 section 6.18, page
772, it says:

  The ’Invalid HCI Command Parameters’ error code is returned by the
  Host Controller in the Status parameter of an event when the total
  parameter length [...] does not conform to what is specified in this
  document.

So really all host controllers should be giving an error code for this
command. The fact that the bug has survived so long suggests that host
controllers do not check their command arguments rigorously.

	- Steven


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com