3 Commits

Author SHA1 Message Date
ahinsing 32df3b9a2d Fixed some config params 2019-04-16 16:51:09 +02:00
ahinsing 764d42095c Fix doc 2019-04-16 12:18:48 +02:00
ahinsing cb1de9bc8c Added boostrap doc 2019-04-16 12:18:20 +02:00
2 changed files with 28 additions and 10 deletions
+21 -4
View File
@@ -13,13 +13,30 @@ mbed toolchain GCC_ARM
mbed target NUCLEO_L073RZ
# set-up the compiler path if needed
mbed config -G GCC_ARM_PATH /opt/gcc-arm-none-eabi-7-2017-q4-major/bin
cp mbed_app.json.sample mbed_app.json
# modify lora.device-eui, lora.application-eui and lora.application-key in mbed_app.json
# or use the provided script to change them into the binary file
```
### Bootstrap mode
This mode is used to initialize a mbed NVStore on the flash and store board-specific parameters.
To compile the bootstrap binary you have to set "mode-bootstrap" to true into mbed_app.json and set
lorawan EUIs and key.
```
mbed compile --profile profiles/release.json
```
Then you can use stm32flash or - may be better - a stlink interface to copy the generated .bin file onto the RAK811.
Then you can use flash the board and start it. You can check the serial console to see reporting.
### Production mode
Just reset "mode-boostrap" to false and compile it (you can delete BUILD folder from previous compilation) :
```
mbed compile --profile profiles/release.json
```
In this mode, lorawan parameters are ignored (because the program get it from the flash) but
leave it as-is because they are used to determine the stored size ot the euis and key.
## Notes
+7 -6
View File
@@ -1,6 +1,6 @@
{
"config": {
"mode-bootstrap": { "value": "false" },
"mode-bootstrap": { "value": false },
"tx-timer": { "value": 600000 },
"lora-radio": {
"help": "Which radio to use (options: SX1272,SX1276)",
@@ -25,20 +25,20 @@
"lora-ant-switch": { "value": "NC" },
"lora-pwr-amp-ctl": { "value": "NC" },
"lora-tcxo": { "value": "NC" },
"battery-enabled": { "value": "false" },
"battery-enabled": { "value": false },
"battery-lpp-id": { "value": 1 },
"battery-in-lpp": { "value": "false" },
"battery-in-lpp": { "value": false },
"battery-adc": { "value": "NC" },
"battery-min": { "value": "3.20f" },
"battery-max": { "value": "4.15f" },
"battery-ratio": { "value": "2.0f" },
"hx711-enabled": { "value": "false" },
"hx711-enabled": { "value": false },
"hx711-lpp-id": { "value": 2 },
"hx711-clk": { "value": "NC" },
"hx711-data": { "value": "NC" },
"hx711-scale": { "value": "1.0f" },
"hx711-offset": { "value": 0 },
"dht-enabled": { "value": "false" },
"dht-enabled": { "value": false },
"dht-temp-lpp-id": { "value": 3 },
"dht-hum-lpp-id": { "value": 4 },
"dht-type": { "value": "DHT::DHT22" },
@@ -46,11 +46,12 @@
},
"target_overrides": {
"*": {
"mode-bootstrap": false,
"tx-timer": 600000,
"platform.stdio-convert-newlines": true,
"platform.stdio-baud-rate": 115200,
"platform.default-serial-baud-rate": 115200,
"lora.app-port": 3,
"lora.over-the-air-activation": true,
"lora.duty-cycle-on": true,
"lora.phy": 0,
"lora.device-eui": "{ 0xAB, 0xBA, 0xAB, 0xBA, 0xAB, 0xBA, 0xAB, 0xBA }",