arduino / ArduinoCore-arc32

GNU Lesser General Public License v2.1
329 stars 284 forks source link

GATT Client API needed #254

Closed ghost closed 7 years ago

ghost commented 8 years ago

It would be great if there was a class which provides a GATT client API. Some profiles have the GAP Peripheral as the GATT Client (e.g. the HTTP Proxy Service) so that once a connection has been accepted by the peripheral it then acts as GATT client and sends ATT PDUs over the connection to the GATT server at the other end which was previously the GAP Central device.

Without this, it's not possible to use Arduino 101 in IoT scenarios where the peripheral formulates and instructs a gateway device to execute HTTP requests on its behalf... the HTTP Proxy Service is a Bluetooth SIG standard designed for this purpose. It's not the only time you might want a GAP Peripheral to be the GATT Client but it's a key example. GATT and GAP roles are not coupled in any way.

The master branch of the original arduino-BLEPeripheral does seem to have this capability (not verified).

See

https://github.com/sandeepmistry/arduino-BLEPeripheral/issues/73

and

https://github.com/sandeepmistry/arduino-BLEPeripheral/tree/master/examples/remote_test

eriknyquist commented 8 years ago

@SidLeung can you review? not sure if this is related to https://github.com/01org/corelibs-arduino101/pull/255

SidLeung commented 8 years ago

Will investigate where our BLE library diverged from Sandeep.

eriknyquist commented 8 years ago

@SidLeung any updates on this?

noelpaz commented 8 years ago

No updates on this. Not sure how far along are we are on the refactor.

SidLeung commented 7 years ago

The upcoming release BLE library allows the creation of Service for both Central and Peripheral mode. In either mode, the board can be a server or a client.

kitsunami commented 7 years ago

Hi @bluetooth-mdw, can you retest with the latest, found her: http://forum.arduino.cc/index.php?topic=443728.0 ?

ghost commented 7 years ago

I will but it might be a while before I can schedule this. Thanks for the update.