diff --git a/docs/modules/ble.md b/docs/modules/ble.md index 1d998463..4572747d 100644 --- a/docs/modules/ble.md +++ b/docs/modules/ble.md @@ -41,11 +41,11 @@ ble.init(config) This notifies the Bluetooth stack that a new value is available to be read from the characteristic. #### Syntax -`ble.notify(characteristic)` +`ble.notify(notifyvalue)` #### Parameters -- `characteristic` This is the table that was passed into the `init` method for the particular characteristic. +- `notifyvalue` This is the value of the `notify` table entry from the particular characteristic. #### Returns `nil` @@ -53,7 +53,7 @@ This notifies the Bluetooth stack that a new value is available to be read from #### Example ```lua -ble.notify(config.services[1].characteristics[1]) +ble.notify(config.services[1].characteristics[1].notify) ``` ## ble.advertise() @@ -123,7 +123,7 @@ The characteristic table contains the following keys: - `value` This is the actual value of the characteristic. This will be a string of bytes unless a `type` value is set. - `read` This is a function that will be invoked to read the value (and so does not need the `value` entry). It should return a string of bytes (unless `type` is set). - `write` This is a function that will be invoked to write the value (and so does not need the `value` entry). It is given a string of bytes (unless `type` is set) -- `notify` If this attribute is present with the value `true` then notifications are supported on this characteristic. +- `notify` If this attribute is present then notifications are supported on this characteristic. The value of the `notify` attribute is updated to be an integer which is the value to be passed into `ble.notify()` If the `value` key is present, then the characteristic is read/write. However, if one or `read` or `write` is set to `true`, then it restricts access to that mode.