Commit Graph

738 Commits

Author SHA1 Message Date
Rohit Grover 2a11965b5a Merge branch 'develop'. Minor improvement to EddystoneBeacon. 2015-11-02 17:48:39 +00:00
Rohit Grover 9d92facf33 version v2.0.1 2015-11-02 17:47:55 +00:00
Rohit Grover 1119459b64 Merge pull request #94 from andresag01/develop
Fix beaconPeriod and defaults for voltage/temp
2015-11-02 17:47:06 +00:00
Andres Amaya Garcia 4fe124f203 Use correct not-implemented value for Voltage/Temp 2015-11-02 16:36:18 +00:00
Andres Amaya Garcia 058243f372 Fixed period settings for adv packets
Fixed the period settings for beacon advertisement packets. Changes through
the config service now take effect and defaults can be set through code.
2015-11-02 11:54:29 +00:00
Rohit Grover 9c001d2772 Merge branch 'develop' 2015-11-02 09:00:20 +00:00
Rohit Grover 2f92904fbe Release 2.0.0
=============

* Major change to the APIs around stack initialization. BLE::init() is now
  meant to only trigger the initialization of the underlying BLE stack. init()
  now takes a completion callback as an optional parameter; this callback gets
  invoked when initialization completes.

    - There's a new type: BLE::InitializationCompleteCallback_t

    - There's a new API: BLEInstanceBase::hasInitialized() which transports
      need to implement.

    - If no init-completion callback is setup, the application can still
      determine the status of initialization using BLE::hasInitialized().

    !This update may require in a minor change to existing apps!

    mbed-classic demos would look something like:

    ```
    main() {
        BLE::Instance().init();
        while (!BLE::Instance().hasInitialized()) {
            /* spin wait */
        }

        /* rest of the initialization ending in the waitForEvent loop */

    }
    ```

    whereas mbedOS demos would look like:

    ```
    void bleInitComplete(BLE &ble, ble_error_t error)
    {
        WsfTrace("bleInitComplete");

        if (error != BLE_ERROR_NONE) {
            WsfTrace("initailization failed with error: %u", error);
            return;
        }

        if (ble.getInstanceID() == BLE::DEFAULT_INSTANCE) {
            /* use the BLE instance */
        }
    }

    extern "C" void app_start(int argc, char *argv[])
    {
        BLE::Instance().init(bleInitComplete);
    }
    ```

    The Nordic stack initializes right-away, and so existing demos based on Nordic should continue to work.

* There's a new API: BLE::getInstanceID(), which simply returns the ID of an
  instance.

* Reduce the memory footprint consumed by a FunctionPointerWithContext to 20
  bytes (originally, it was 32 bytes !). Also enforce alignment constraints
  of the embedded pointer to member function. This should help with the size
  of a GattCharacteristic.

* Add EnvironmentalService.h under services/.

* There have been minor improvements to EddystoneService and EddystoneConfigService.

* We've added a CONTRIBUTING.md to help guide user contributions.
2015-11-02 08:52:41 +00:00
Rohit Grover 9eec2467f2 Merge pull #75 into develop 2015-10-30 09:43:29 +00:00
Rohit Grover be09e51698 use types like ReadOnlyGattCharacteristic<TemperatureType_t> 2015-10-30 09:42:56 +00:00
Rohit Grover bdc1ca08cd introduce types for temperature/humidity/pressure. 2015-10-30 09:41:28 +00:00
Rohit Grover 45e80c8ba8 white space diffs; mostly alignment 2015-10-30 09:23:40 +00:00
Rohit Grover e1bce4e5a3 Merge branch 'master' of https://github.com/xcrespo/ble into xcrespo-master 2015-10-30 09:19:31 +00:00
Rohit Grover 99ba55badc Merge pull request #81 from pan-/functionPointerOptimisation
Reduce the memory consumed by FunctionPointerWithContext instances
2015-10-30 08:47:02 +00:00
Rohit Grover e0ef88f47d Merge branch 'master' into develop. 2015-10-30 08:42:53 +00:00
Rohit Grover 249cabaedd Merge pull request #82 from jrobeson/patch-1
use the github url public url in module.json
2015-10-30 08:38:31 +00:00
Rohit Grover ec545b79dc cosmetic changes. 2015-10-30 08:34:17 +00:00
Rohit Grover e46cef5dd1 Merge pull request #91 from rgrover/develop
BLE::init() now takes in a callback paramter
2015-10-30 08:33:43 +00:00
Rohit Grover 33f5dce81e Merge pull request #92 from andresag01/develop
Introduced fixes to Eddystone implementation
2015-10-29 12:55:54 +00:00
Andres Amaya Garcia 976bcd4e61 Introduced fixes to Eddystone implementation
Fixed wrong memcpy arguments that caused the wrong number of bytes to be copied
and merged energy saving changes.
2015-10-29 11:25:27 +00:00
Rohit Grover 902e17e300 version v1.1.0 2015-10-28 12:56:15 +00:00
Rohit Grover 5c7f26e06f fix #90: add a ble_error_t paramter to initializationCompletionCallback 2015-10-28 12:55:24 +00:00
Rohit Grover 918af4fbac Major change:
- There's a new type: BLE::InitializationCompleteCallback_t
- init() now takes a completion callback. This is an optional parameter, if no callback is setup the application can still determine the status of initialization using BLE::hasInitialized() (see below).
- There's a new API: BLEInstanceBase::hasInitialized() which transports need to implement.
- BLEInstanceBase.h is no longer included from BLE.h. We use a forward declaration of BLEInstanceBase instead. This is required us to move implementations of BLE methods out of the header and into BLE.cpp.
- There's a new API:  BLE::getInstanceID(), which simply returns the ID of an instance.
- There are new error types around initialization.
2015-10-28 11:39:15 +00:00
Rohit Grover 78ec806379 Merge pull request #87 from andresag01/develop
Fixed include problem in HealthThermometer header
2015-10-27 18:11:02 +00:00
Rohit Grover bde2e465c8 fix #86: update includes from within services to use paths starting from subfolder 'ble' 2015-10-27 17:31:50 +00:00
Andres Amaya Garcia da3d9f811a Fixed include problem in HealthThermometer header
Modified the HealthThermometer header file to include BLE.h from
ble/BLE.h.
2015-10-27 14:19:20 +00:00
Vincent Coubard 129683bdc0 Code and command cleanup:
- add a space after if keyword
	- Use typedef types instead of direct declarations for
	  pFunctionPointerWithContext_t and pvoidfcontext_t
	- Fix typos and enhance comment about how alignement and size
	  requirements of the member function pointer are computed.
2015-10-26 10:44:21 +00:00
Johnny Robeson 8aaa385ed5 use the github url public url in module.json 2015-10-24 02:51:07 -04:00
Vincent Coubard 8bad0486cd Remove unneeded blank lines. 2015-10-23 19:03:33 +01:00
Vincent Coubard 57c160c25c Reduce the memory size consummed by a FunctionPointerWithContext to 20
bytes (oryginally, it was 32 bytes !).
Enforce alignement constraints of the embedded pointer to member function.
Symplify and unify call mecanic, everything is delegated uniformally to the actual
implementation.
2015-10-23 15:59:53 +01:00
Rohit Grover 5cb478cab6 Merge branch 'master' into develop 2015-10-23 14:47:28 +01:00
Rohit Grover a0335c2e8d add a missing include file 2015-10-23 14:34:25 +01:00
Rohit Grover 7aac367d99 add a target specific dependency 2015-10-23 14:34:25 +01:00
Rohit Grover 17f2e99d2b fix minor compiler warning due to a shadowed member variable. 2015-10-23 14:34:25 +01:00
Rohit Grover 84f434a994 Fix compiler warnings due to header includes.
Some header include paths have diverged between mbed OS and mbed-classic.
2015-10-23 14:34:25 +01:00
Rohit Grover 4c76373579 Merge pull request #79 from andresag01/develop
Introduced fix for defect IOTSFW-1058
2015-10-22 11:25:56 +01:00
Andres Amaya Garcia f8e3d2f44c Introduced fixes after review
Introduced fixes after review of previous commit with regards to JIRA defect
IOTSFW-1058.
2015-10-22 11:05:00 +01:00
Andres Amaya Garcia 18dcc91382 Introduced fix for defect IOTSFW-1058
Introduced a fix for defect IOTSFW-1058 that caused the
BLE_EddystoneBeaconConfigService example in ARMmbed/ble-examples repo to fail.
Refer to JIRA defect for more details.
2015-10-21 15:02:37 +01:00
Bogdan Marinescu 0e54ba6c70 version v1.0.0 2015-10-19 16:17:06 +03:00
Bogdan Marinescu df8a41c80a Updated dependencies 2015-10-19 16:17:06 +03:00
Rohit Grover ad80d1c1ce Merge pull request #76 from pan-/master
Add st-ble-shield as a possible target dependency.
2015-10-12 09:32:33 +01:00
Vincent Coubard df088f57aa Add st-ble-shield as a possible target dependency. 2015-10-09 14:58:16 +01:00
xcrespo 13a9c192d7 New call to onDisconnection callback in LinkLossService 2015-10-05 10:38:08 +02:00
xcrespo da2b104e16 Added license header for EnvironmentalService 2015-10-05 10:38:08 +02:00
Xabi Crespo f0f42d110b Support for Environmental Service (temperature, pressure and humidity characteristics) 2015-10-05 10:38:08 +02:00
Rohit Grover d43b1d1a8b update LinkLoss service due to recent changes in APIs 2015-09-29 12:58:14 +01:00
Rohit Grover 8694f1ade2 Merge branch 'develop' 2015-09-29 09:38:51 +01:00
Rohit Grover 91239f6b7c Release 0.4.8
=============

* Introduce an Instance() class method to BLE to allow access to the BLE
  singleton(s) using instanceID. Calling BLE::Instance() is preferable to
  constructing a BLE object directly because Instance() returns references to
  internally created singletons.

* We've added an initial prototype for a yotta-config based initialization for BLE transports.

  It is conceivable to have multiple BLE transports available to a system
  concurrently in which case Instance() can be passed an instanceID.
  There's also a BLE::NUM_INSTANCES--instanceID passed to Instance() should be
  less than NUM_INSTANCES for the returned BLE singleton to be useful.

  The config system now allows the target to specify multiple BLE instances.
  BLE::Instance() and BLE constructor rely upon a static array of initializers
  to create actual BLE transport instances. A description of these instances
  and initializers is supposed to be put in some .json file contributing to
  yotta's configuration (typically the target.json). Here's a sample:

  "config": {
    ...
    "ble_instances": {
      "count": 1,
      "0" : {
        "initializer" : "createBLEInstance"
      }
    }
  }

  Refer to http://yottadocs.mbed.com/reference/config.html.
  Note: The configuration system is currently experimental. Some of the
  behaviour described below may change in backwards-incompatible ways with
  minor updates to yotta.

  The use of this feature is optional. Initialization would continue to work
  like before as long as there is a default createBLEInstance() method
  available.

* We've updated our support for Google's Eddystone beacon by adding the EddystoneConfigService.

* Added onConnection() and onDisconnection() now append to a callback chain internally.
  Please note that this has also changed the callbackType for onDisconnection; resulting in a minor breaking change for API.
  All previous programs using onDisconnection() would need to adapt.

* Handle the case of a NULL transport pointer for BLE.

* We now disallow copy constructor and assignment operator for BLE.
2015-09-29 09:37:40 +01:00
Rohit Grover 7d5415ada2 Merge work for Eddystone Config Service into develop 2015-09-29 08:42:23 +01:00
Rohit Grover 5aa7895578 mostly white-sapce improvements 2015-09-29 08:41:18 +01:00
Austin Blackstone d389c42692 patch to ensure corred UUID being broadcast during Config. 2015-09-28 13:56:41 -05:00