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

There is mistake in BLE simple central when disconnect is called #10755

Closed
cz8pru opened this issue Feb 14, 2023 · 1 comment
Closed

There is mistake in BLE simple central when disconnect is called #10755

cz8pru opened this issue Feb 14, 2023 · 1 comment

Comments

@cz8pru
Copy link

cz8pru commented Feb 14, 2023

There is code in git:

def disconnect(self):
if not self._conn_handle:
return
self._ble.gap_disconnect(self._conn_handle)
self._reset()

I used that code and my device never disconnected, I found problem in "if" condition and change it to following code, which works for me:

def disconnect(self):
        if self._conn_handle is None:
            return
        self._ble.gap_disconnect(self._conn_handle)):
        self._reset()
dpgeorge added a commit that referenced this issue Feb 15, 2023
Fixes issue #10755.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge
Copy link
Member

Thanks for the report. Fixed by e1f211c

karfas pushed a commit to karfas/micropython that referenced this issue Apr 23, 2023
Fixes issue micropython#10755.

Signed-off-by: Damien George <damien@micropython.org>
alphonse82 pushed a commit to alphonse82/micropython-wch-ch32v307 that referenced this issue May 8, 2023
Fixes issue micropython#10755.

Signed-off-by: Damien George <damien@micropython.org>
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

No branches or pull requests

2 participants