Skip to content

extmod/modbluetooth: Add gap_indicate_service_changed.#8027

Open
andrewleech wants to merge 1 commit into
micropython:masterfrom
andrewleech:bluetooth_service_changed
Open

extmod/modbluetooth: Add gap_indicate_service_changed.#8027
andrewleech wants to merge 1 commit into
micropython:masterfrom
andrewleech:bluetooth_service_changed

Conversation

@andrewleech
Copy link
Copy Markdown
Contributor

@andrewleech andrewleech commented Nov 24, 2021

This function triggers an indication on the GATT service changed characteristic.
The matching change in aioble can be found micropython/micropython-lib#467

Requires extra nimble feature at this stage: apache/mynewt-nimble#1112

I've added some extra notes to the docs to cover some idiosynchacies seen in phone (iOS / android) usage of this feature:

    Note: with an iOS client it's been seen that if this function is called greater than ~100ms 
    after a new connection is established the connection can be dropped, or the characteristics
    covered by the declared range will lock up and be no longer readable, so it's important to 
    send this command within the first few ms after a connection is made.

    Alternatively, it appears that if the start and end handles are both set to ``0x0000``, 
    the lock-up doesn't occur regardless of when the call is made. Android clients appear to 
    accept the null handles as a re-discover all, though the BLE spec makes no mention of this.

@andrewleech andrewleech force-pushed the bluetooth_service_changed branch from 81fa207 to 7444b7a Compare November 24, 2021 23:03
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 24, 2021

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.46%. Comparing base (2dc2e30) to head (0c9424e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8027   +/-   ##
=======================================
  Coverage   98.46%   98.46%           
=======================================
  Files         176      176           
  Lines       22784    22784           
=======================================
  Hits        22435    22435           
  Misses        349      349           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andrewleech andrewleech force-pushed the bluetooth_service_changed branch 2 times, most recently from 59572d9 to d4dcd95 Compare November 25, 2021 06:31
@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Nov 29, 2021
@andrewleech andrewleech force-pushed the bluetooth_service_changed branch from d4dcd95 to 2f11cb3 Compare January 24, 2022 00:41
@andrewleech andrewleech force-pushed the bluetooth_service_changed branch 2 times, most recently from c0adf9e to fc08bd3 Compare August 24, 2022 10:12
@projectgus
Copy link
Copy Markdown
Contributor

This is an automated heads-up that we've just merged a Pull Request
that removes the STATIC macro from MicroPython's C API.

See #13763

A search suggests this PR might apply the STATIC macro to some C code. If it
does, then next time you rebase the PR (or merge from master) then you should
please replace all the STATIC keywords with static.

Although this is an automated message, feel free to @-reply to me directly if
you have any questions about this.

@andrewleech andrewleech force-pushed the bluetooth_service_changed branch from fc08bd3 to e537b25 Compare May 12, 2025 05:58
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2025

Code size report:

Reference:  esp32/boards/SEEED_XIAO_ESP32C6: Add new XIAO board definition. [2dc2e30]
Comparison: extmod/modbluetooth: Add gap_indicate_service_changed. [merge of 4e966b9]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:  +168 +0.010% ESP32_GENERIC[incl +64(data)]
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@andrewleech andrewleech force-pushed the bluetooth_service_changed branch 2 times, most recently from bab4298 to 6ab336c Compare May 27, 2025 05:56
@andrewleech andrewleech force-pushed the bluetooth_service_changed branch 4 times, most recently from d3cac7d to 70502a9 Compare September 24, 2025 12:31
@andrewleech andrewleech force-pushed the bluetooth_service_changed branch from 70502a9 to 357a442 Compare October 23, 2025 01:04
@andrewleech andrewleech force-pushed the bluetooth_service_changed branch 2 times, most recently from 88ef740 to cc24e37 Compare November 2, 2025 23:52
@andrewleech andrewleech force-pushed the bluetooth_service_changed branch 5 times, most recently from ebb8d82 to 4e966b9 Compare March 30, 2026 13:24
Triggers an indication on the GATT service changed
characteristic.

Signed-off-by: Andrew Leech <[email protected]>
@andrewleech andrewleech force-pushed the bluetooth_service_changed branch from 4e966b9 to 0c9424e Compare March 30, 2026 20:39
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.

5 participants