Commit Graph

16 Commits

Author SHA1 Message Date
Marcin Niestroj f74feca027 mgmt: smp: shell: initialize SMP before feeding with received bytes
So far SMP shell transport was initialized in APPLICATION run level, but
shell over UART was initialized in POST_KERNEL. This could end up in
situation when received frames were scheduled for further processing in
SMP layer, when it was not initialized yet.

Export smp_shell_init() function declaration and call it before shell is
initialized with all its receive data handlers. This prevents situation
when data is scheduled for processing in SMP layer, when that one is not
ready yet.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-08-19 09:51:45 -04:00
Siddharth Chandrasekaran 9a91b4adf9 mgmt/osdp: Add support for OSDP in PD mode of operation
Open Supervised Device Protocol (OSDP) describes the communication
protocol for interfacing one or more Peripheral Devices (PD) to a
Control Panel (CP). The PDs are slave devices that waits for commands
from a CP. The communication happens over a RS485 multi-drop connection
with specification for a secure channel communication.

This patch adds initial support for OSDP in PD mode without secure
channel.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2020-08-13 11:48:28 +02:00
Marcin Niestroj 5b12c23b44 mgmt: smp: shell: remove useless data->end member
Value of this member was never assigned, so it was always 0. Remove it
to simplify code a little bit.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-08-04 16:18:06 +02:00
Carles Cufi c200b1c5e6 mgmt: Move mcumgr into its own folder
In order to be able to add more entries under 'subsys/mgmt', move the
current contents of it, which relate exclusively to MCUMgr, to its own
folder.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-31 08:46:53 -05:00
Marcin Niestroj aec0b5ae84 mgmt: smp: add missing kernel.h include statement
There is following error when compiling applications using smp:

  /zephyr/include/mgmt/smp.h:77:16: error: field 'zst_work' has \
  incomplete type
     77 |  struct k_work zst_work;
        |                ^~~~~~~~
  /zephyr/include/mgmt/smp.h:80:16: error: field 'zst_fifo' has \
  incomplete type
     80 |  struct k_fifo zst_fifo;
        |                ^~~~~~~~

Fix that by adding missing kernel.h include statement in mgmt/smp.h.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-07-18 08:43:18 -04:00
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Mikkel Jakobsen 7288f51519 mgmt: smp: add UDP transport for SMP
Adds a UDP driver dedicated to transporting mcumgr SMP requests and
responses.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2020-04-17 10:16:25 +03:00
Dominik Ermel 08c8dc7e27 subsys/mgmt: Enabling mynewt-core version of tinycbor
This PR provides changes that are required after replacing Tinycbor
with copy of source code from mynewt-core.
The Tinycbor has been replaced with mynewt-core version to reduce
maintenance effort; by replacing it the Zephy specific changes have been
reduced to small patch over mynewt codebase.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-03-17 11:58:18 +01:00
Mieszko Mierunski 8587bb19a7 smp: shell: Add support for SMP in new shell.
Added smp support for new shell.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-01-15 17:19:20 -05:00
Mariusz Skamra 9a69cfbf19 mgmt: Add function to unregister GATT service
This adds a possibility to unregister GATT SMP service.
Using this function, device can disable Firmware Update
functionality, if not needed.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-11-07 14:35:22 +02:00
Flavio Ceolin 67ca176754 headers: Fix headers across the project
Any word started with underscore followed by and uppercase letter or a
second underscore is a reserved word according with C99.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-17 15:49:26 -04:00
David B. Kinder 9a3d7a43a0 doc: fix misspellings in API docs
Fix doxygen misspellings affecting API documentation missed during
regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-08-08 01:47:51 -05:00
Mariusz Skamra 051c1f5fd6 subsys: mgmt: Fix broken OTA firmware update
This fixes freeing net_buf without bt_conn_unref call.
As the result, the OTA was broken.

Fixes 8636
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-07-18 14:32:06 +02:00
Christopher Collins d14b1aca62 mgmt: Bluetooth transport for SMP (mcumgr).
Add a Bluetooth service dedicated to transporting mcumgr SMP requests
and responses.

Signed-off-by: Christopher Collins <ccollins@apache.org>
2018-02-20 22:07:52 +01:00
Christopher Collins 76bf5646d5 subsys: mgmt: Shell transport for SMP (mcumgr).
Enable the shell to transport mcumgr SMP requests and responses.

Signed-off-by: Christopher Collins <ccollins@apache.org>
2018-02-20 22:07:52 +01:00
Christopher Collins 6721d64735 subsys: mgmt: SMP protocol for mcumgr.
The Simple Management Protocol (SMP) is a basic protocol that sits on
top of mcumgr's mgmt layer.  This commit adds the functionality needed
to hook into mcumgr's SMP layer.

More information about SMP can be found at:
`ext/lib/mgmt/mcumgr/smp/include/smp/smp.h`.

Signed-off-by: Christopher Collins <ccollins@apache.org>
2018-02-20 22:07:52 +01:00