Skip to content

extmod/btstack: Reset pending_value_handle before calling read-done cb. #13637

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

Conversation

dpgeorge
Copy link
Member

Fixes issue #13634.

@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Feb 11, 2024
Copy link

codecov bot commented Feb 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b4f5998) 98.36% compared to head (abe43fe) 98.36%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13637   +/-   ##
=======================================
  Coverage   98.36%   98.36%           
=======================================
  Files         159      159           
  Lines       21069    21069           
=======================================
  Hits        20724    20724           
  Misses        345      345           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS

Similar to the previous commit but for MP_BLUETOOTH_IRQ_GATTC_READ_DONE:
the pending_value_handle needs to be reset before calling
mp_bluetooth_gattc_on_read_write_status(), which will call the Python IRQ
handler, which may in turn call back into BTstack to perform an action like
a write.  In that case the pending_value_handle will need to be available
for the write/read/etc to proceed.

Fixes issue micropython#13634.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the extmod-btstack-fix-resetting-pending-value-handle-2 branch from ab228f4 to abe43fe Compare February 12, 2024 00:30
@dpgeorge
Copy link
Member Author

Corresponding BLE multitest for the bug has been added, and it now passes with this PR.

@dpgeorge dpgeorge merged commit abe43fe into micropython:master Feb 12, 2024
@dpgeorge dpgeorge deleted the extmod-btstack-fix-resetting-pending-value-handle-2 branch February 12, 2024 00:55
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.

1 participant