Commit Graph

384 Commits

Author SHA1 Message Date
Steve Brown
d6f74e4a06 mesh: meshctl: Add set heartbeat publish
Sets heartbeat for node 0100

[config: Target = 0100]# hb-set 0100 0 0 0 0

Set heartbeat for node 0100 status: Success
Destination:    0100
Count:          00
Period:         00
TTL:            ff
Features:       0000
Net_Idx:        0000
2017-12-18 13:14:49 +01:00
Steve Brown
61ca29dff5 mesh: meshctl: Add add/get subscribe
Adds a subscription for group address c000 to
model 1000 in element 0100.

[config: Target = 0100]# sub-add 0100 c000 1000

Subscription changed for node 0100 status: Success
ModelId 1000
Element Addr:   0100
Subscr Addr:    c000

Gets the current subscription list for model 1000
on element 0100.

[config: Target = 0100]# sub-get 0100 1000

Subscription list for node 0100 length: 7 status: Success
Element Addr:   0100
Model ID:       1000
Subscr Addr:    c000
2017-12-18 13:14:42 +01:00
Steve Brown
37aafbbf0e mesh: meshctl: Change command names to <cmd>-<get/set>
Fix lines over 80 chars
Move cmd_default()
Add parameter to pub-set to control retransmit count
2017-12-18 13:14:23 +01:00
Luiz Augusto von Dentz
9d7d70ee98 mesh: Add description for submenus
This adds proper descriptions for each submenu.
2017-12-13 10:08:55 -02:00
Steve Brown
813b8e6737 mesh: Segmentation fails in gatt.c:pipe_write()
If the first command output in a new connection exceeds 20 bytes,
mesh_gatt_write sets the SAR to FIRST as the write_mtu is initially 0
and the default is GATT_MTU-3 (20).

When pipe_write gets called, a new larger write_mtu has been set, but
the SAR is still set to FIRST. It's assumed that data->gatt_len >
max_len. However, it's not which causes lots of bogus output.
2017-12-12 09:50:46 -02:00
Luiz Augusto von Dentz
e199cd9bca mesh: Fix crash while reading input parameters
read_input_parameters skips the command argument thus arg[0] shall be
considerer the fist argument.
2017-12-11 11:19:16 +02:00
Luiz Augusto von Dentz
d1f9544681 mesh: Remove cmd_scan
cmd_scan is only used internally by discover-unprovisioned.
2017-12-08 13:06:21 +02:00
Luiz Augusto von Dentz
f11a25d42d mesh: Rework set_scan_filter_uuids parameters
set_scan_filter_uuids is not a command handler which means it doesn't
need to take argc and argv instead just pass the filter array.
2017-12-08 13:06:20 +02:00
Luiz Augusto von Dentz
7c16c4044d shell: Add bt_shell_opt
Make use of struct option and getopt_long to parse the options given.
2017-12-08 13:06:19 +02:00
Luiz Augusto von Dentz
fc53175b8a mesh: Make meshctl use bt_shell helpers
This makes meshctl use bt_shell to manage the menus and command
handling.
2017-12-08 13:06:12 +02:00
Steve Brown
cb1c2622fa mesh: meshctl add Node Identity option to connect command
This adds the option to connect via either Node Identity or Network ID
advertisements. Adding the node unicast address selects Node Identity.

See Mesh Profile Specification 7.2.2.2 for further details.
2017-12-04 19:51:26 +02:00
Michal Hobot
5b4be5a091 mesh: Fix parsing composition data for custom models
Custom model ids consist of model id and vendor id. Instead, vendor id
was used twice to build model id.
2017-11-30 23:18:29 +02:00
Steve Brown
1f17efbac0 mesh: Correct typo in config op defines 2017-11-29 09:34:21 +02:00
Michal Hobot
7be84fe316 mesh: onoff-model: Fix msec to sec conversion
There is an error in meshctl while displaying transition time. 1000 ms
is being presented as 16 sec, 40 ms. The reason is incorrect
conversion of milliseconds to seconds.  The fix is pretty trivial.
2017-11-27 10:50:40 +02:00
Inga Stotland
4d58eb52bc mesh: validate configuration target
Require obtaining node composition prior to sending configuration
commands that assume knowledge about the node's element/model layout.
2017-11-23 12:16:13 +02:00
Steve Brown
65aaf36f2a mesh: Correct length test in agent.c:request_ascii 2017-11-19 10:16:33 +02:00
Inga Stotland
d9a074b6b1 mesh: Add config server response for loopback 2017-11-01 15:02:29 +02:00
Steve Brown
2223d9f22d mesh: Correct segmentation logic
The decision whether to segment or not didn't consider the size of the MIC
2017-10-11 22:20:24 +03:00
Luiz Augusto von Dentz
8090f7a6c8 gatt: Update signature of AcquireWrite and AcquireNotify
It should now contain an argument for the options even though there
are not options defined for clients.
2017-09-22 13:50:17 +03:00
Marcel Holtmann
8168ab64d5 mesh: Use PRIx64 for printing uint64_t variables 2017-09-18 01:32:17 -07:00
Brian Gix
2b3be1c2e7 Rename sample JSON Databases 2017-09-14 11:22:27 +03:00
Luiz Augusto von Dentz
a446569b86 mesh: Add 'security' command
This adds 'security' command which can be used to display and change
the provision security level:

[meshctl]# security
Provision Security Level set to 1 (medium)
[meshctl]# security 2
Provision Security Level set to 2 (high)

Note: This doesn't change the default which is still medium.
2017-09-14 11:22:24 +03:00
Inga Stotland
660081ce5a mesh: Use correct length for config server response
Also check if the length is nonzero before sending response
2017-09-11 16:02:12 +03:00
Inga Stotland
9c2c9d3c71 mesh: Add characteristic property name check
If PropertyChanged signal is not emitted due to a change in
characteristic's "Value" property, the characteristic does
not need to be processed.
2017-09-11 16:02:12 +03:00
Łukasz Rymanowski
a75b37a476 mesh: Typo fix 2017-09-04 14:57:36 +03:00
Łukasz Rymanowski
22d943a798 mesh: Fix for handling unprovisioned device
If there is no ServiceData there is no valid provisioning data for
PB-GATT
2017-09-04 14:57:32 +03:00
Luiz Augusto von Dentz
a5b844cb8f mesh: Use DuplicateData filter
Also use the term duplicate instead of reset to make it more clear
the intent of the filter.
2017-08-30 14:59:55 +03:00
Inga Stotland
cce5161556 mesh: move GATT defines to the appropriate header file
Group mesh GATT definitions in mesh/gatt.h file.
Also remove unused members in mesh_node structure.
2017-08-28 13:56:55 +03:00
Luiz Augusto von Dentz
e5562190af mesh: Make use of rl_prompt_input
This removes unnecessary code to ask user input which is already
supported by rl_prompt_input.
2017-08-28 13:54:24 +03:00
Marcel Holtmann
de6c9e2cf0 mesh: Remove circular include protection guards 2017-08-21 18:43:31 +02:00
Marcel Holtmann
8e96790482 mesh: Fix includes to use root relative path names 2017-08-21 13:40:03 +02:00
Brian Gix
9b92507843 mesh: Baseline Mesh implementation 2017-08-21 12:40:35 +02:00
Brian Gix
112ebe6e71 mesh: Baseline Mesh runtime configuration files 2017-08-21 12:40:35 +02:00
Brian Gix
846af2a229 mesh: define APIs for Bluetooth Mesh 2017-08-21 12:40:35 +02:00