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
+30-26Lines changed: 30 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -19,25 +19,24 @@ $ cd mbed-os-example-lorawan
19
19
$ mbed deploy
20
20
```
21
21
22
-
### Selecting Radio
23
-
Mbed-OS provides inherent support for a variety of modules. If your device is one of the those modules, you may skip this part.
24
-
As you may notice that the correct radio type and pin set is already provided for the said modules in the `target-overrides` field.
25
-
For more information on supported modules, please refer to [module support section](#module-support)
26
-
27
-
If you are using an Mbed enabled radio shield like [Mbed SX1276 shield LoRa](https://os.mbed.com/components/SX1276MB1xAS/) or [Mbed SX1272 LoRa shield ](https://os.mbed.com/components/SX1272MB2xAS/) with virtually any Mbed-enabled board, this part is relevant.
28
-
You can virtually use any Mbed-enabled board which comes with arduino form factor.
29
-
Please select your radio type by modifying `lora-radio` field and provide pin set if it is different from the default.
30
-
For example:
22
+
### Selecting radio
23
+
24
+
Mbed OS provides inherent support for a variety of modules. If your device is one of the those modules, you may skip this part. The correct radio type and pin set is already provided for the modules in the `target-overrides` field. For more information on supported modules, please refer to the [module support section](#module-support)
25
+
26
+
If you are using an Mbed Enabled radio shield such as [Mbed SX1276 shield LoRa](https://os.mbed.com/components/SX1276MB1xAS/) or [Mbed SX1272 LoRa shield ](https://os.mbed.com/components/SX1272MB2xAS/) with any Mbed Enabled board, this part is relevant. You can use any Mbed Enabled board that comes with an arduino form factor.
27
+
28
+
Please select your radio type by modifying the `lora-radio` field and providing a pin set if it is different from the default. For example:
29
+
31
30
```json
32
31
"lora-radio": {
33
32
"help": "Which radio to use (options: SX1272,SX1276)",
34
33
"value": "SX1272"
35
34
},
36
35
```
36
+
37
37
### Add network credentials
38
38
39
-
Open the file `mbed_app.json` in the root directory of your application.
40
-
This file contains all the user specific configurations your application and the Mbed-OS LoRaWAN stack needs.
39
+
Open the file `mbed_app.json` in the root directory of your application. This file contains all the user specific configurations your application and the Mbed OS LoRaWAN stack need.
41
40
42
41
#### For OTAA
43
42
@@ -58,20 +57,21 @@ For Activation-By-Personalization (ABP) connection method, modify the `mbed_app.
58
57
"lora.over-the-air-activation": false,
59
58
```
60
59
61
-
In addition to that you need to provide`Application Session Key`, `Network Session Key` and `Device Address`. For example:
60
+
In addition to that, you need to provide `Application Session Key`, `Network Session Key` and `Device Address`. For example:
Mbed-OS LoRaWAN stack provides a lot of configuration controls to the application via Mbed-OS config system. Some of such controls are discussed in the previous section. In this section we will highlight some useful features that can be configured.
70
+
The MbedOS LoRaWAN stack provides a lot of configuration controls to the application through the MbedOS configuration system. The previous section discusses some of these controls. This section highlights some useful features that you can configure.
71
71
72
72
### Selecting a PHY
73
73
74
-
LoRaWAN protocol is subjected to various country specific regulations concerning radio emissions. That's why Mbed-OS LoRaWAN stack provides a `LoRaPHY` class which can be used to implement any region specific PHY layer. Currently, Mbed-OS LoRaWAN stack provides 10 different country-specific implementations of `LoRaPHY` class. Selection of a specific PHY layer happens at compile time. Bu default, the Mbed-OS LoRaWAN stack uses `EU 868 MHz` PHY. An example of selecting a PHY can be:
74
+
The LoRaWAN protocol is subject to various country specific regulations concerning radio emissions. That's why the MbedOS LoRaWAN stack provides a `LoRaPHY` class that you can use to implement any region specific PHY layer. Currently, the MbedOS LoRaWAN stack provides 10 different countryspecific implementations of `LoRaPHY` class. Selection of a specific PHY layer happens at compile time. By default, the MbedOS LoRaWAN stack uses `EU 868 MHz` PHY. An example of selecting a PHY can be:
75
75
76
76
```josn
77
77
"phy": {
@@ -82,9 +82,9 @@ LoRaWAN protocol is subjected to various country specific regulations concerning
82
82
83
83
### Duty cycling
84
84
85
-
LoRaWAN v1.0.2 specifcation is exclusively duty cycle based. This application comes with duty cycle enabled by default, i.e., the Mbed-OS LoRaWAN stack enforces duty cycle. The stack keep track of transmissions on the channels in use and hence schedules transmissions on channels which become available in the shortest time possible. We recommend to keep duty cycle on for compliance to your country specific regulation.
85
+
LoRaWAN v1.0.2 specifcation is exclusively duty cycle based. This application comes with duty cycle enabled by default. In other words, the MbedOS LoRaWAN stack enforces duty cycle. The stack keeps track of transmissions on the channels in use and schedules transmissions on channels that become available in the shortest time possible. We recommend you keep duty cycle on for compliance with your country specific regulations.
86
86
87
-
However, user can define a timer value in the application which can be used to perform a periodic uplink when the duty cycle is turned off. Such a setup should be used only for testing or with a large enough timer value. For example:
87
+
However, you can define a timer value in the application, which you can use to perform a periodic uplink when the duty cycle is turned off. Such a setup should be used only for testing or with a large enough timer value. For example:
88
88
89
89
```josn
90
90
"target_overrides": {
@@ -97,13 +97,13 @@ However, user can define a timer value in the application which can be used to p
97
97
98
98
## Module support
99
99
100
-
Here is a non-exhaustive list of boards and modules which we have tested with Mbed-OS LoRaWAN stack.
100
+
Here is a nonexhaustive list of boards and modules that we have tested with the MbedOS LoRaWAN stack.
101
101
102
-
- MultiTech mDot
103
-
- MultiTech xDot
104
-
- LTEK_FF1705
105
-
- Advantech Wise 1510
106
-
- ST B-L072Z-LRWAN1 LoRa®Discovery kit (with muRata radio chip)
102
+
- MultiTech mDot.
103
+
- MultiTech xDot.
104
+
- LTEK_FF1705.
105
+
- Advantech Wise 1510.
106
+
- ST B-L072Z-LRWAN1 LoRa®Discovery kit (with muRata radio chip).
Drag and drop the application binary from `BUILD/YOUR_TARGET/ARM/mbed-os-example-lora.bin`yo your Mbed enabled target hardware which appears as USB device on your host machine.
119
+
Drag and drop the application binary from `BUILD/YOUR_TARGET/ARM/mbed-os-example-lora.bin`to your Mbed enabled target hardware, which appears as a USB device on your host machine.
120
120
121
121
Attach a serial console emulator of your choice (for example, PuTTY, Minicom or screen) to your USB device. Set the baudrate to 115200 bit/s, and reset your board by pressing the reset button.
Using `Arm CC compiler` instead of `GCC` reduces `3K` of RAM. Currently the application takes about `15K` of static RAM with Arm CC which spills over for the platforms with `20K` of RAM because we need to leave space about `5K` for dynamic allocation. So if we reduce the application stack size, we can barely fit into the 20K platforms.
145
+
146
+
Using `Arm CC compiler` instead of `GCC` reduces `3K` of RAM. Currently the application takes about `15K` of static RAM with Arm CC, which spills over for the platforms with `20K` of RAM because you need to leave space, about `5K`, for dynamic allocation. So if you reduce the application stack size, you can barely fit into the 20K platforms.
147
+
146
148
For example, add the following into `config` section in your `mbed_app.json`:
147
149
148
150
```
149
151
"main_stack_size": {
150
152
"value": 2048
151
153
}
152
154
```
153
-
Essentially you can make the whole application with Mbed LoRaWAN stack in 6K if you drop the RTOS from Mbed-OS.
154
-
For more information, please follow the blog post [here](https://os.mbed.com/blog/entry/Reducing-memory-usage-by-tuning-RTOS-con/).
155
+
156
+
Essentially you can make the whole application with Mbed LoRaWAN stack in 6K if you drop the RTOS from Mbed OS.
157
+
158
+
For more information, please follow this [blog post](https://os.mbed.com/blog/entry/Reducing-memory-usage-by-tuning-RTOS-con/).
0 commit comments