Skip to content

extmod/modbluetooth: Misc fixes and improvements #5211

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

Closed
wants to merge 8 commits into from

Conversation

jimmo
Copy link
Member

@jimmo jimmo commented Oct 14, 2019

  • Avoid confusing ENOMEM raised from gap_advertise if there is currently an active connection. This refers to the static connection buffer pre-allocated by Nimble (nothing to do with MicroPython heap memory). Fixed by increasing the max number of connections from 1 to 4 (which is a worthwhile fix anyway).
  • Clarify behaviour of adv_data and resp_data params to gap_advertise.
  • Fix IRQ_GATTS_WRITE having conn_handle and value_handle the wrong way around in the data tuple.
  • Address some issues with the ringbuf handling avoiding a potential overflow.
  • Pin the NimBLE task on ESP32 to the app core (see commit for more info).
  • Misc documentation fixes.
  • Make gap_connect return bool rather than raising OSError(MP_ENOTCONN) when already disconnected.

jimmo added 6 commits October 14, 2019 15:39
Make it clear that the previous adv_data will be reused.

Minor other improvements.
No need to share the irq_data buffer with addresses. Split them into
two separate buffers and manage their max length independently.
Prevents issues with concurrent access to the ringbuf.
MICROPY_BEGIN_ATOMIC_SECTION is only atomic to the same core. We could
address this with a mutex, but it's also not safe to call
mp_sched_schedule across cores.
jimmo added 2 commits October 15, 2019 10:10
Previously it raised OSError(MP_ENOTCONN) if the conn_handle was
already disconnected. Now it returns True/False.
@dpgeorge
Copy link
Member

Thank you! Merged in 418f12c through 36502bd

@dpgeorge dpgeorge closed this Oct 15, 2019
@dpgeorge dpgeorge added bug extmod Relates to extmod/ directory in source and removed bug labels Oct 15, 2019
tannewt added a commit to tannewt/circuitpython that referenced this pull request Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extmod Relates to extmod/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy