To pass IOP testing, we need to be able to support Input OOB and Out of
band Public Key exchange, This patch adds agent methods to support
those capabilities, but are turned off because the test code uses
insecure fixed values instead of randomized values.
Update the creation of Advertisement Monitor object as per the
decoupled RSSIThresholdsAndTimers strucure.
More info: doc/advertisement-monitor-api.txt
Reviewed-by: apusaka@chromium.org
Reviewed-by: howardchung@chromium.org
Reviewed-by: mcchou@chromium.org
Signed-off-by: Manish Mandlik <mmandlik@google.com>
The python test app to test working of the Advertisement Monitor API.
This app:
- registers itself with bluez by invoking the RegisterMonitor with the
app root path
- exposes multiple monitor objects with both valid and invalid monitor
parameters
- implements Activate/Release/DeviceFound/DeviceLost methods on the
monitor object
The python test app simulates an application registering to BlueZ as a
Battery Provider providing three fake batteries drained periodically.
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
This introduces the following behavior change for those methods
on Network interface that specify node token as an input parameter
Leave() method:
If Leave method is called for a node that is being processed as a result
of a Create, Import, Join or Attach method calls in progress, node removal
is not allowed and org.bluez.mesh.Error.Busy error is returned.
Attach() method:
If Attach method is called for a node that is being processed as a result
of a Create, Import or Join method calls in progress, node attachment
is not allowed and org.bluez.mesh.Error.Busy error is returned.
Adding the Tx Power Level is no longer done via IncludeTxPower, but via
the tx-power value in the Includes array. The previous code did not
throw an error, but neither led to the insertion of the value. As a
result of this change, include_tx_power now adds the Tx Power Level
again.
Use correct packing of multi-byte values in message payload bytearray.
For example, a 2-byte opcode 0x8204 is packed as 0x82 0x04, i.e. in
natural order.
Add transaction ID parameter to "set" commands of generic On/Off
model. Server will ignore the identical commands with the same
transaction ID, source and destination during a timeout period
of 6 seconds.
This change removes the Provisioner Initiator from the python test
script, along with the menu commands for create, scan and add. This
makes it a cleaner Python3 example of a simple On/Off node, and a
fuller featured Provisioner/Config Client still exists in the tools
subdirectory.
If adapter is discoverable (or LE-only) advertising was failing due
to too big adv data being set. Make sure there is enough space left
for flags if needed.
This initialized required "Models" and "VendorModels" properties
wheher the actual models exist or not, according to the mesh-api.txt.
In case when an element does not contain either SIG defined models or
vendor defineed models, the corresponding properties should contain
empty arrays.
Note: This script is *not* a suitable tool for expanding into
a Mesh Provisioner. It is only intended to demonstrate the arguments
and methods required.
This changes the order of checks for an updated publication period:
check for zero period first, and if this is the case, stop sending
the periodic model publications.
Switch to string interactive commands to drive testing
of bluetooth-meshd. Re-work the menu to allow global setting of
destination address and AppKey index for outbound mesh messages.
This adds one script, test-mesh, to replace three test-join,
example-onoff-server and example-onoff-client.
This is menu driven test that allows provisioning (join) and/or
connecting existing (attach) nodes.
The previous sample code did not release all resources when shutting
down. This is fine when it's a standalone program since Python will free
all resources automatically when the process terminates. However, in a
long-running process, this will eventually cause problems.
This changeset shows how to properly release all resources, if an optional
command line "--timeout" argument is used. The default is no timeout to
maintain behavior of the previous implementation (advertisements will run
forever).
Python2 will be maintained till end of 2019. Switch to Python3 by
replacing iteritems() with items() to fix error when runnig test-nap:
AttributeError: 'dbus.Dictionary' object has no attribute 'iteritems'
This adds Data property using TDS AD type:
@ MGMT Command: Add Advertising (0x003e) plen 59
Instance: 1
Flags: 0x00000001
Switch into Connectable mode
Duration: 0
Timeout: 0
Advertising data length: 29
16-bit Service UUIDs (complete): 2 entries
Heart Rate (0x180d)
Battery Service (0x180f)
Company: internal use (65535)
Data: 0001020304
Service Data (UUID 0x9999): 0001020304
Transport Discovery Data
Organization: Bluetooth SIG (0x01)
Flags: 0x01
Role: 0x01
Seeker Only
Transport Data Incomplete: False (0x00)
Transport State: 0x00
Off
Length: 0
Data:
Scan response length: 19
Name (complete): TestAdvertisement