v01d commented on pull request #2302:
URL: https://github.com/apache/incubator-nuttx/pull/2302#issuecomment-748105378


   > > > @v01d and @btashton NuttX native bluetooth stack is broken now. I 
think we should restore the functionality before we find a better solution. 
It's wrong to support nimBLE but break the native stack for the long time.
   > > 
   > > 
   > > The fact that the NuttX stack broke was not due to a mistake during 
previous PR, which this PR attempted to fix. As @btashton considered the change 
to not be fully correct this PR was not merged, until he could look into the 
problem. It is not a matter of prioritizing nimBLE over NuttX stack.
   > 
   > I think current NuttX stack is broken by this patch:
   > 
   > ```
   > commit 5386f972fa8020b69798ab70325b7f4df0f20cf3
   > Author: Matias N <mat...@protobits.dev>
   > Date:   Sun Sep 20 16:45:09 2020 -0300
   > 
   >     bluetooth: Add support for HCI RAW channel; make host layer optional
   > ```
   > 
   > HCI RAW socket is selected by WIRELESS_BLUETOOTH_HOST, but the right 
implementation should enable RAW mode per socket instance. If we look at how 
Linux bluetooth stack work, the RAW bluesocket don't require us to remove 
bluetooth stack and recompile kernel, so the RAW bluetooth socket and NuttX 
native bluetooth stack isn't mutually exclusive.
   
   That is indeed another option, to support this per-socket. I personally 
don't think that makes much sense in an embedded system were you will have one 
BLE stack (why would you want to support RAW sockets to be used by an external 
stack and still have NuttX stack enabled?). In other words, I don't oppose to 
doing that but I would maintain the option to disable NuttX stack as it would 
otherwise be wasteful when an external stack is used.
   
   Anyway, this goes beyond the fix that is needed for the problem mentioned in 
this PR, which is relatively simpler compared to that. I think we need to break 
down this as follows:
   - fix the buffer freeing and restore NuttX current BLE stack functionality 
(@btashton are you able to look into this as you mentioned?)
   - have a discussion on what do we want to do with NuttX BLE stack to 
properly support it using sockets (modify it? replace it?)
   - continue improving BTPROTO_* socket handling in NuttX (Brennan had further 
plans with this)
   
   Meanwhile, having nimBLE supported at least gives us a mature stack exposed 
via sockets in NuttX.


----------------------------------------------------------------
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


Reply via email to