CSR vendor-specific commands over BCSP transport



I'm looking into the feasibility of sending vendor-specific BCCMD messages
to a CSR bluetooth modem via HCI, using the BCSP transport, and handling the
vendor-specific HCI events that result.

I think this could best be done by using the HCI_CustomCode_In extension to
send the messages to the vendor-specifc opcode group. I think that's its
function, but I'm not sure if I've interpreted the documentation properly.

I also need to handle receiving vendor-specific events. Currently, the
hcibcsp.cpp implementation of HCI_ReadPacket will fail to handle these
messages (which will be received on BCSP channel 2). Returning FALSE will
cause the bluetooth stack to shut down.

It should be feasible to modify hcibcsp.cpp to handle these packets, but not
return, and wait for the next packet. My modified code could signal an event
so that my application code could do appropriate things. I can only receive
these packets if the bluetooth stack is actually blocked on HCI_ReadPacket,
but that should effectively be all the time.

Has anyone tried a similiar implementation, or have any idea if this should
work? Is there a better way to send and receive BCCMD commands through the
stack?


.