Thanks to visit codestin.com
Credit goes to github.com

Skip to content

extmod/modbluetooth: Add gap_indicate_service_changed. #8027

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewleech
Copy link
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

codecov-commenter commented Nov 24, 2021

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.54%. Comparing base (2dada06) to head (6ab336c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8027   +/-   ##
=======================================
  Coverage   98.54%   98.54%           
=======================================
  Files         169      169           
  Lines       21898    21898           
=======================================
  Hits        21579    21579           
  Misses        319      319           

☔ 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
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
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_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 from e537b25 to bab4298 Compare May 21, 2025 12:04
This function triggers an indication on the GATT service changed characteristic.
@andrewleech andrewleech force-pushed the bluetooth_service_changed branch from bab4298 to 6ab336c Compare May 27, 2025 05:56
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