Skip to content

Commit 98a238b

Browse files
authored
Merge pull request #53 from FreeRTOS/LienNguyen2910-patch-1
Lien nguyen2910 patch 1
2 parents f1ba040 + 4cb9c36 commit 98a238b

File tree

4 files changed

+154
-213
lines changed

4 files changed

+154
-213
lines changed

Common/cli/ReadMe.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
### Command Line Interface (CLI)
2+
The CLI interface is used to provision the device. There is a python script to automatically provision the device and register Thing into cloud.
3+
See [ Getting Started Guide ](../../Getting_Started_Guide.md)
4+
5+
### Other Unix-like utilities
6+
The following other utilities are also available in this image:
7+
8+
```
9+
ps
10+
List the status of all running tasks and related runtime statistics.
11+
12+
kill
13+
kill [ -SIGNAME ] <Task ID>
14+
Signal a task with the named signal and the specified task id.
15+
16+
kill [ -n ] <Task ID>
17+
Signal a task with the given signal number and the specified task id.
18+
19+
killall
20+
killall [ -SIGNAME ] <Task Name>
21+
killall [ -n ] <Task Name>
22+
Signal a task with a given name with the signal number or signal name given.
23+
24+
heapstat
25+
heapstat [-b | --byte]
26+
Display heap statistics in bytes.
27+
28+
heapstat -h | -k | --kibi
29+
Display heap statistics in Kibibytes (KiB).
30+
31+
heapstat -m | --mebi
32+
Display heap statistics in Mebibytes (MiB).
33+
34+
heapstat --kilo
35+
Display heap statistics in Kilobytes (KB).
36+
37+
heapstat --mega
38+
Display heap statistics in Megabytes (MB).
39+
40+
reset
41+
Reset (reboot) the system.
42+
43+
uptime
44+
Display system uptime.
45+
46+
rngtest <number of bytes>
47+
Read the specified number of bytes from the rng and output them base64 encoded.
48+
49+
assert
50+
Cause a failed assertion.
51+
```

Common/crypto/ReadMe.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
### PkiObject API
2+
The PkiObject API takes care of some of the mundane tasks in converting between different representations of cryptographic objects such as public keys, private keys, and certificates.
3+
4+
Files located in this folder belong to the PkiObject module.
5+
6+
This API can be accessed via the `pki` CLI command which is implemented in the `Common/cli/cli_pki.c` file.
7+
```
8+
pki:
9+
Perform public/private key operations.
10+
Usage:
11+
pki <verb> <object> <args>
12+
Valid verbs are { generate, import, export, list }
13+
Valid object types are { key, csr, cert }
14+
Arguments should be specified in --<arg_name> <value>
15+
16+
pki generate key <label_public> <label_private> <algorithm> <algorithm_param>
17+
Generates a new private key to be stored in the specified labels
18+
19+
pki generate csr <label>
20+
Generates a new Certificate Signing Request using the private key
21+
with the specified label.
22+
If no label is specified, the default tls private key is used.
23+
24+
pki generate cert <cert_label> <private_key_label>
25+
Generate a new self-signed certificate
26+
27+
pki import cert <label>
28+
Import a certificate into the given slot. The certificate should be
29+
copied into the terminal in PEM format, ending with two blank lines.
30+
31+
pki export cert <label>
32+
Export the certificate with the given label in pem format.
33+
When no label is specified, the default certificate is exported.
34+
35+
pki import key <label>
36+
Import a public key into the given slot. The key should be
37+
copied into the terminal in PEM format, ending with two blank lines.
38+
39+
pki export key <label>
40+
Export the public portion of the key with the specified label.
41+
```

Common/kvstore/ReadMe.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
### Key-Value Store
2+
The key-value store located in this folder is used to store runtime configuration values in non-volatile flash memory.
3+
By default, the kvstore interface can be used to read and write the following items:
4+
* WiFi SSID
5+
* WiFi Password
6+
* Thing Name (MQTT Device ID)
7+
* MQTT Endpoint
8+
* MQTT Port
9+
* Time High Water Mark.
10+
11+
The kvstore api is accessible via the CLI using the "conf" command.
12+
```
13+
> help conf
14+
conf:
15+
Get/ Set/ Commit runtime configuration values
16+
Usage:
17+
conf get
18+
Outputs the value of all runtime config options supported by the system.
19+
20+
conf get <key>
21+
Outputs the current value of a given runtime config item.
22+
23+
conf set <key> <value>
24+
Set the value of a given runtime config item. This change is staged
25+
in volatile memory until a commit operation occurs.
26+
27+
conf commit
28+
Commit staged config changes to nonvolatile memory.
29+
```
30+
31+
Additional runtime configuration keys can be added in the [Common/config/kvstore_config.h](Common/config/kvstore_config.h) file.

0 commit comments

Comments
 (0)