-
Notifications
You must be signed in to change notification settings - Fork 6
API Docs test
Start advertising.
-
options- ??? -
callback- parameters:-
err- an error, or null if successful
-
Stop advertising.
-
callback- parameters:-
err- an error, or null if completed successfully
-
Scan for advertising from another device. Once you start scanning, if you receive an advertisement, an advertisement event will be raised.
-
options- ??? -
callback- parameters:-
err- an error, or null if successful
-
-
advertisement- raised if an advertisement is received. Callback parameters:-
err- an error, or null if successful -
advertisement- advertisement data
-
Send a request using the advertising channel
-
destination- the destination address for the request -
request- an object containing the request data -
callback- parameters:-
err- an error, or null if successful -
response- the response to the request, or null if there was an error
-
Respond to a request from the advertising channel
-
destination- the destination address for the request -
response- an object containing the response data -
callback- parameters:-
err- an error, or null if successful
-
Stop scanning for advertising from another device
-
callback- parameters:-
err- an error, or null if successful
-
Initiate a connection to another device.
-
options- connect options. May include:- ???
- ???
-
callback- parameters:-
err- error, or null if successful -
conn- connection object (if successful)
-
-
connect- emitted when connected, if no callback provided tocreateConnection. Parameters:-
err- error, or null if successful -
conn- connection object (if successful)
-
Listen for connection requests.
-
options- listen options. May include:- ???
- ???
-
callback- parameters:-
err- error, or null if successful -
conn- connection object
-
Emitted when data is read from the connection. Callback parameters:
-
err- read error, or null if read successful -
buffer- a buffer containing the incoming data
Emitted when there is an error on the connection. Callback parameters:
-
err- the error. Should never be null.
Emitted when the connection is closed. Parameters:
-
err- the error, if the close is due to an error, otherwise null.
Write to the connection.
-
buffer- the buffer containing the data to write -
callback- the callback called when the write completes. Parameters:-
err- the error, or null if successful
-
Close the connection.
-
callback(optional) - Callback called when the connection is closed. If left off, thecloseevent is emitted instead. Parameters:-
err- the error, if there is one, otherwise null
-
Create and return an ATT protocol object using this connection
Create and return a GATT protocol object using this connection
Returned by conn.createAtt(), exposes the ATT-level API for use.
Returns attribute information for the handles between startHandle and endHandle, inclusive.
-
startHandle- beginning handle to return information for -
endHandle- ending handle to return information for -
callback- callback. Parameters:-
err- the error, or null if successful -
attrList- array of attribute objects describing the attributes between the requested handles
-
Return information about the attributes between startHandle and endHandle, inclusive, with the given type and value.
-
startHandle- beginning handle to return information for -
endHandle- ending handle to return information for -
type- UUID for the attribute type -
value- value for the attribute - either a String or Buffer -
callback- callback. Parameters:-
err- the error, or null if successful -
attrList- array of attribute objects describing the attributes between the requested handles
-