Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hci: contains several corrections needed for HCI on both ninafw and cyw43439 #304

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

deadprogram
Copy link
Member

This PR contains several corrections needed for HCI to work correctly on both ninafw and cyw43439:

  • separate read and write buffers to accomodate read buffer with pending partial data to be handled
  • only read when there is data pending to avoid putting cwy43439 into forever loop
  • handle any data in buffer from read that contains data from more than 1 packet
  • skip past data for sync packets since we do not handle them anyhow
  • some better naming and comments to hopefully clarify a bit what is going on

Addresses #300

@jsoriano
Copy link

Thanks! Examples work on the Nano 33 IoT with these changes.

hci.go Outdated Show resolved Hide resolved
…yw43439

* separate read and write buffers to accomodate read buffer with pending partial data to be handled
* only read when there is data pending to avoid putting cwy43439 into forever loop
* handle any data in buffer from read that contains data from more than 1 packet
* skip past data for sync packets since we do not handle them anyhow
* some better naming and comments to hopefully clarify a bit what is going on

Signed-off-by: deadprogram <ron@hybridgroup.com>
@colececil
Copy link

Thanks so much for this fix! I was unable to enable the bluetooth adapter on my Arduino Nano 33 IoT. But after updating to your commit in my go.mod, it works! Now I'm unblocked!

@deadprogram
Copy link
Member Author

Thanks for review/testing @jsoriano and @colececil now merging.

@deadprogram deadprogram merged commit c74fb68 into dev Nov 21, 2024
4 checks passed
@deadprogram deadprogram deleted the hci-buffer-fix branch November 21, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants