Skip to content
Snippets Groups Projects
Unverified Commit b1e52b25 authored by Vivien Nicolas's avatar Vivien Nicolas Committed by GitHub
Browse files

Add BleEndPoint for the Darwin platforms (#1660)

* Create a new BleConnectionDelegate interface for BleLayer

* Add BlePlatformDelegate, BleApplicationDelegate, BleConnectionDelegate code to src/platform/Darwin

The delegates use CoreBluetooth which, unlike Network, is not directly available as C++ headers.
As a result the mentioned delegates are implemented using Objective-c++.

* Enable BleLayer to be built for standalone-apps

* Remove c++11 extension from src/platform/Darwin/CHIPPlatformConfig.h since it is unused and create a warning when using Objective-c++

* Remove conflicting define from src/platform/Darwin/BlePlatformConfig.h that override BLE_CONNECTION_OBJECT default type

* Expose BleLayer via a new ConnectivityManager::GetBleLayer method

* Add Transport::BLE to src/transport

It is a first version that directly use ChipDeviceController for callbacks.
Transport::BLE is referenced as a friend class of ChipDeviceController to access some private members that may be better not accessible.
Hopefully this dependency will be removed at some point.

The current code also uses BleLayer->NewBleConnection which directly creates a BLE_CONNECTION_OBJECT from a given device name.

* Add a new ChipDeviceController::ConnectDevice API dedicated for Ble devices

The current API takes a name instead of an IP and a Port.
Once PeerAddress has a better support of Ble this particular ConnectDevice api and the previous one (which uses IP/port) should likely be removed by a new API that takes a PeerAddress directly.
This will obviosuly only be possible if Transport::BLE uses the SessionManager instead of beeing directly instantiated from the ChipDeviceController

* Add .m and .mm to the set of compiled files by config/standalone-app.mk

* Add 'echo-ble' to the list of commands supported by examples/chip-tool

The patch reformats a little bit chip-tool in order to allow other commands that does not rely on IP.

* Use the new platform BLE support from the iOS app
parent 09ec4218
No related branches found
No related tags found
No related merge requests found
Showing
with 421 additions and 252 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment