btashton commented on pull request #1661: URL: https://github.com/apache/incubator-nuttx/pull/1661#issuecomment-695827055
> > Right now it is calling `bt_hci_recieve` which I think needs to be changed to input the data to the networking layer and let the network driver figure how to process this, right? What is the interface I should use for this? Is it `bluetooth_input`? I'm guessing `bt_netdev.c` should be extended to be able to directly receive HCI packets and not only L2CAP packets via `btnet_l2cap_receive`. > > Isn't this a problem similar to the Ethernet raw packet input? In that case, the driver does not call any of the *_input() functions, instead is calls a packet tap function (pkt_input()). The raw packet logic then decides of the packet is one that it should pick off or not. It returns an indication if the packet was consumed or not. If it was not consumed, then the network driver dispatches to a protocol-specific network stack input function. > > Can the network decide if the packet is an HCI packet based on the addressing in the packet and on some configured socket address? In Linux this is done by looking at what channel the socket is connected to via BTPROTO_HCI. RAW is basically a dumb pipe that just requires the interface to be up but you might stomp on the kernel managing it (like using i2ctool). USER actually requires the interface to be down and explicitly disconnects and other use. CONTROL implements the management API. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org