Skip to content

Commit

Permalink
docs: add docs for public Peripheral properties, and getDevices() call
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Harvey committed Jan 9, 2016
1 parent e32798f commit 707f1ab
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
15 changes: 15 additions & 0 deletions docs/peripheral.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,21 @@ Instance Methods
useful if you know the handle for the characteristic but do not have a suitable
``Characteristic`` object.

Properties
----------

All the properties listed below are read-only.

.. py:attribute:: addr
Device MAC address (as a hex string separated by colons).

.. py:attribute:: addrType
Device address type - one of *ADDR_TYPE_PUBLIC* or *ADDR_TYPE_RANDOM*; this will be a
printable string.

.. py:attribute:: iface
Bluetooth interface number (0 = ``/dev/hci0``) used for the connection.

6 changes: 5 additions & 1 deletion docs/scanentry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ All the properties listed below are read-only.
Device address type - one of *ADDR_TYPE_PUBLIC* or *ADDR_TYPE_RANDOM*.

.. py:attribute:: iface
Bluetooth interface number (0 = ``/dev/hci0``) on which advertising information was seen.

.. py:attribute:: rssi
Received Signal Strength Indication for the last received broadcast from the
Expand All @@ -69,4 +73,4 @@ All the properties listed below are read-only.
Integer count of the number of advertising packets received from the device
so far (since *clear()* was called on the ``Scanner`` object which found it).



4 changes: 4 additions & 0 deletions docs/scanner.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ Instance Methods
Disables reception of advertising broadcasts. Should be called after
*process()* has returned.

.. function:: getDevices()

Returns a list (a *view* on Python 3.x) of ``ScanEntry`` objects for
all devices which have been discovered (since the last *clear()* call).

Sample code
-----------
Expand Down

0 comments on commit 707f1ab

Please sign in to comment.