You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-14Lines changed: 31 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -20,14 +20,14 @@ This repository is not a fork of [mender](https://github.com/mendersoftware/mend
20
20
21
21
Robustness is ensured with *atomic* image-based deployments using a dual A/B partition layout on the MCU. This makes it always possible to roll back to a working state, even when losing power at any time during the update process.
22
22
23
-
The project currently support firmware upgrade which is the main interest, Device Inventoryand Device Configure add-ons. It will also provide in a near future some other Mender features that could make sense on MCU.
23
+
The project currently support firmware upgrade which is the main interest, Device Inventory, Device Configure and Device Troubleshoot (remote console) add-ons. It will also provide in a near future some other Mender features that could make sense on MCU.
To start using Mender, we recommend that you begin with the Getting started section in [the Mender documentation](https://docs.mender.io/).
30
+
To start using Mender, we recommend that you begin with the Getting started section in [the Mender documentation](https://docs.mender.io/) that will help particularly using the Mender interface, which is not specific to the platform.
31
31
32
32
To start using mender-mcu-client, we recommend that you begin with one of the example provided with the library:
33
33
@@ -46,6 +46,8 @@ And finally, 4kB of storage should be reserved to save client private and public
46
46
47
47
From the source code perspective, the dependencies of the core part of the library are limited to [cJSON](https://github.com/DaveGamble/cJSON). The platform source files may depends of external libraries or Hardware Abstraction Layers: [esp-idf](https://github.com/espressif/esp-idf), [mbedTLS](https://github.com/Mbed-TLS/mbedtls/), ...
48
48
49
+
Additionally, building the Device Troubleshoot add-on requires [msgpack-c](https://github.com/msgpack/msgpack-c) to perform encoding and decoding of messages. On the ESP-IDF platform, this also constraints to download [esp_websocket_client](https://components.espressif.com/components/espressif/esp_websocket_client), which is compatible with ESP-IDF v5.0 and later only.
50
+
49
51
50
52
## Generating mender-artifact
51
53
@@ -66,7 +68,16 @@ Where:
66
68
67
69
## API
68
70
69
-
The API of the mender-mcu-client is defined in `include/mender-client.h` file and the source code is documented to use it properly. The easiest way to start is using an example that is illustrating the usage of the library.
71
+
The API of the mender-mcu-client is defined in `include/mender-client.h` and the API of the add-ons are defined in `include/mender-inventory.h`, `include/mender-configure.h` and `include/mender-troubleshoot.h`. The source code is documented to use it properly.
72
+
73
+
The easiest way to start is using an example that is illustrating the usage of the library.
74
+
75
+
76
+
## Configuration
77
+
78
+
Some `CONFIG_MENDER_...` configuration keys are available to tweak the features of the mender-mcu-client. Particularly, this is used to enable building the add-ons. Note that default configuration values are suitable for most applications.
79
+
80
+
Using ESP-IDF and Zephyr platforms, a `Kconfig` file is available. This can be used as a reference of the settings available to configure the client and it is also particularly useful to configure platform specific settings.
70
81
71
82
72
83
## Contributing
@@ -87,7 +98,7 @@ This is why I welcome and ask for your contributions. You can for example:
87
98
88
99
The organization of the source code permits the mender-mcu-client library to provide support for different kind of platforms and projects.
89
100
90
-
The source code is separate into three main directories:
101
+
The source code is separated into three main directories:
91
102
*`core` contains the main source files providing the implementation of the mender-mcu-client:
92
103
*`mender-client`: periodically check the availability of updates.
93
104
*`mender-api`: the implementation of the mender [Device APIs](https://docs.mender.io/api/#device-apis).
@@ -96,36 +107,42 @@ The source code is separate into three main directories:
96
107
*`platform` contains source files specific to the platform or project, it is separated in several sub-directories for each feature of the client that rely on external dependency specific to the platforms:
97
108
*`mender-ota`: implementation of functions used to write artifact in the memory.
98
109
*`mender-storage`: provide storage area for the mender-client.
110
+
*`mender-shell`: provide shell interface to the Device Troubleshoot add-on.
99
111
*`mender-log`: logging API.
100
112
*`mender-http`: implementation of HTTP client.
113
+
*`mender-websocket`: implementation of websocket client.
101
114
*`mender-rtos`: implementation of RTOS related functions.
102
115
*`mender-tls`: provide TLS support.
103
116
*`add-ons` contains source files of the mender add-ons:
104
117
*`mender-inventory`: provide inventory key/value pairs to display inventory data on the mender server. This add-on is highly recommended and should be included by default. It is proposed as an add-on only to give the possibility to reduce the final code size for user who don't need it.
105
-
*`mender-configure`: provide configuration key/value pairs to manage devide configuration from the mender server. Build options of this add-on permit to save the configuration in the storage area.
118
+
*`mender-configure`: provide configuration key/value pairs to manage device configuration from the mender server. Build options of this add-on permit to save the configuration in the storage area.
119
+
*`mender-troubleshoot`: provide troubleshoot feature to connect remotely to the device from the mender server.
106
120
107
121
The `include` directory contains the header files that define the prototypes for each module of the library. They are common to all platforms and projects and they define the API to be used or implemented.
108
122
109
123
The usage of the mender-mcu-client library should be to include all the `core` source files each time, and then to pick up wanted platform implementations, or to write your owns (but it's better to share them and open a Pull Request!). For example you may want to use esp-idf with mbedTLS or with a secure element, or using an other RTOS I have not integrated, or maybe you want to have mender storage located in an external EEPROM. The combinaisons are infinite.
110
124
111
-
The usage of the add-ons is at your own discretion, they are independant.
125
+
The usage of the add-ons is at your own discretion, they are independent.
126
+
127
+
The final code size of the mender-mcu-client library depends of your configuration, the following table gives an estimation for common Debug and Release optimization levels.
112
128
113
-
The final code size of the mender-mcu-client library depends of your configuration, the following table gives an estimation.
Note this is not including dependencies such as mbedTLS or HTTP client, etc. I suppose this kind of libraries is already available and used in your project.
120
137
121
138
122
139
## Roadmap
123
140
124
141
The following features are currently in the pipeline. Please note that I haven't set dates in this roadmap because I develop this in my free time, but you can contribute with Pull Requests:
125
142
126
143
* Support update of [modules](https://docs.mender.io/artifact-creation/create-a-custom-update-module) to perform other kind of updates that could be specific to one project: files, images, etc.
127
-
* Integration of other nice to have Mender APIs as new add-ons: [Device Monitor](https://docs.mender.io/api/#devices-api-device-monitor), remote console...
128
-
* Support new board and prove it is cross-platform and that it is able to work on small MCU too: STM32F7, ATSAMD51...
144
+
* Integration of other nice to have Mender features: Device Troubleshoot sending and receiving files, ...
145
+
* Support new boards and prove it is cross-platform and that it is able to work on small MCU too: STM32F7, ATSAMD51...
129
146
* Integration of ATECC608B secure element to perform TLS authentication.
130
147
* Support other RTOS (particularly Azure RTOS) and bare metal platforms.
0 commit comments