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

Switch ble adapter listing to use the native bluez interface. #4839

Merged
merged 16 commits into from
Feb 16, 2021

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Feb 12, 2021

This builds upon #4838

Problem

Python implementation uses a native bluez for BLE operations.
CHIP BLE pairing requires native connection objects, so interfacing with native code is easier if native
code is used throughout for now. Implemeting a pure python chip would be very useful but is not attainable at the moment.

Summary of Changes

Defines a chip.native module to handle loading of the chip native library and switches chip.ble adapter listing to use the native interface.

Example output of chip-repl:

In [1]: import chip.ble

In [2]: chip.ble.GetAdapters()
Out[2]: [AdapterInfo(index=0, address='A4:C3:F0:CF:DC:1B', name='andreilitvin.roam.corp.google.com', alias='andreilitvin.roam.corp.google.com', powered_on=True)]

@andy31415 andy31415 force-pushed the 02_native_list_adapters branch from 1ad8af0 to 3f2d3f0 Compare February 12, 2021 17:37
@boring-cyborg boring-cyborg bot added the lib label Feb 12, 2021
@andy31415 andy31415 force-pushed the 02_native_list_adapters branch from b9b42c7 to b2ddee7 Compare February 12, 2021 17:46
@andy31415 andy31415 force-pushed the 02_native_list_adapters branch from fe81960 to 029f21f Compare February 12, 2021 21:05
@andy31415 andy31415 force-pushed the 02_native_list_adapters branch from 029f21f to 7279672 Compare February 12, 2021 21:13
@andy31415 andy31415 marked this pull request as ready for review February 12, 2021 21:13
src/controller/python/chip/ble/LinuxImpl.cpp Outdated Show resolved Hide resolved
src/controller/python/chip/ble/LinuxImpl.cpp Outdated Show resolved Hide resolved
src/controller/python/chip/ble/LinuxImpl.cpp Outdated Show resolved Hide resolved
@mspang mspang merged commit aa7c8ec into project-chip:master Feb 16, 2021
@andy31415 andy31415 deleted the 02_native_list_adapters branch October 28, 2021 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants