Updated mbed-os to 5.11.5, update libs, format code with new clang conf
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 100
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
IncludeCategories:
|
||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||
Priority: 2
|
||||
- Regex: '^(<|"(gtest|isl|json)/)'
|
||||
Priority: 3
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
IncludeIsMainRegex: '$'
|
||||
IndentCaseLabels: true
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: true
|
||||
JavaScriptQuotes: Leave
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: Inner
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: Never
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
@@ -1,4 +1,4 @@
|
||||
# RAK811 Tracker Board mbed test
|
||||
# WaveOfHoney - a lorawan beehive sensor
|
||||
|
||||
## Compilation
|
||||
|
||||
@@ -6,19 +6,27 @@ Clone this repository, then :
|
||||
|
||||
```sh
|
||||
mbed deploy
|
||||
mbed new .
|
||||
mbed config root .
|
||||
# set the compiler
|
||||
mbed toolchain GCC_ARM
|
||||
mbed target MTB_RAK811
|
||||
# modify lora.device-eui, lora.application-eui and lora.application-key in mbed_app.json
|
||||
# set the board
|
||||
mbed target NUCLEO_L073RZ
|
||||
# modify mbed_settings.py to set gcc arm path if needed
|
||||
mbed config -G GCC_ARM_PATH /opt/gcc-arm-none-eabi-7-2017-q4-major/bin
|
||||
# modify lora.device-eui, lora.application-eui and lora.application-key in mbed_app.json
|
||||
mbed compile --profile mbed-os/tools/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 stm32flash or - may be better - a stlink interface to copy the generated .bin file onto the RAK811.
|
||||
|
||||
## Notes
|
||||
|
||||
### use STLink from a Nucleo board
|
||||
### Tested boards
|
||||
|
||||
- MTB_RAK811
|
||||
- NUCLEO_L073RZ + SX1272 shield
|
||||
|
||||
### use STLink from a Nucleo board with the RAK811 board
|
||||
|
||||
From STlink CN4 Connector to RAK811 "shortest" connector (pin 1 at the same side of antenna connectors)
|
||||
|
||||
|
||||
+23
-43
@@ -27,57 +27,37 @@
|
||||
#include "SX1272_LoRaRadio.h"
|
||||
#include "SX1276_LoRaRadio.h"
|
||||
|
||||
#define SX1272 0xFF
|
||||
#define SX1276 0xEE
|
||||
#define SX1272 0xFF
|
||||
#define SX1276 0xEE
|
||||
|
||||
#if (MBED_CONF_APP_LORA_RADIO == SX1272)
|
||||
#if(MBED_CONF_APP_LORA_RADIO == SX1272)
|
||||
|
||||
SX1272_LoRaRadio radio(MBED_CONF_APP_LORA_SPI_MOSI,
|
||||
MBED_CONF_APP_LORA_SPI_MISO,
|
||||
MBED_CONF_APP_LORA_SPI_SCLK,
|
||||
MBED_CONF_APP_LORA_CS,
|
||||
MBED_CONF_APP_LORA_RESET,
|
||||
MBED_CONF_APP_LORA_DIO0,
|
||||
MBED_CONF_APP_LORA_DIO1,
|
||||
MBED_CONF_APP_LORA_DIO2,
|
||||
MBED_CONF_APP_LORA_DIO3,
|
||||
MBED_CONF_APP_LORA_DIO4,
|
||||
MBED_CONF_APP_LORA_DIO5,
|
||||
MBED_CONF_APP_LORA_RF_SWITCH_CTL1,
|
||||
MBED_CONF_APP_LORA_RF_SWITCH_CTL2,
|
||||
MBED_CONF_APP_LORA_TXCTL,
|
||||
MBED_CONF_APP_LORA_RXCTL,
|
||||
MBED_CONF_APP_LORA_ANT_SWITCH,
|
||||
MBED_CONF_APP_LORA_PWR_AMP_CTL,
|
||||
MBED_CONF_APP_LORA_TCXO);
|
||||
SX1272_LoRaRadio radio(MBED_CONF_APP_LORA_SPI_MOSI, MBED_CONF_APP_LORA_SPI_MISO,
|
||||
MBED_CONF_APP_LORA_SPI_SCLK, MBED_CONF_APP_LORA_CS, MBED_CONF_APP_LORA_RESET,
|
||||
MBED_CONF_APP_LORA_DIO0, MBED_CONF_APP_LORA_DIO1, MBED_CONF_APP_LORA_DIO2,
|
||||
MBED_CONF_APP_LORA_DIO3, MBED_CONF_APP_LORA_DIO4, MBED_CONF_APP_LORA_DIO5,
|
||||
MBED_CONF_APP_LORA_RF_SWITCH_CTL1, MBED_CONF_APP_LORA_RF_SWITCH_CTL2,
|
||||
MBED_CONF_APP_LORA_TXCTL, MBED_CONF_APP_LORA_RXCTL,
|
||||
MBED_CONF_APP_LORA_ANT_SWITCH, MBED_CONF_APP_LORA_PWR_AMP_CTL,
|
||||
MBED_CONF_APP_LORA_TCXO);
|
||||
|
||||
#elif (MBED_CONF_APP_LORA_RADIO == SX1276)
|
||||
#elif(MBED_CONF_APP_LORA_RADIO == SX1276)
|
||||
|
||||
SX1276_LoRaRadio radio(MBED_CONF_APP_LORA_SPI_MOSI,
|
||||
MBED_CONF_APP_LORA_SPI_MISO,
|
||||
MBED_CONF_APP_LORA_SPI_SCLK,
|
||||
MBED_CONF_APP_LORA_CS,
|
||||
MBED_CONF_APP_LORA_RESET,
|
||||
MBED_CONF_APP_LORA_DIO0,
|
||||
MBED_CONF_APP_LORA_DIO1,
|
||||
MBED_CONF_APP_LORA_DIO2,
|
||||
MBED_CONF_APP_LORA_DIO3,
|
||||
MBED_CONF_APP_LORA_DIO4,
|
||||
MBED_CONF_APP_LORA_DIO5,
|
||||
MBED_CONF_APP_LORA_RF_SWITCH_CTL1,
|
||||
MBED_CONF_APP_LORA_RF_SWITCH_CTL2,
|
||||
MBED_CONF_APP_LORA_TXCTL,
|
||||
MBED_CONF_APP_LORA_RXCTL,
|
||||
MBED_CONF_APP_LORA_ANT_SWITCH,
|
||||
MBED_CONF_APP_LORA_PWR_AMP_CTL,
|
||||
MBED_CONF_APP_LORA_TCXO);
|
||||
SX1276_LoRaRadio radio(MBED_CONF_APP_LORA_SPI_MOSI, MBED_CONF_APP_LORA_SPI_MISO,
|
||||
MBED_CONF_APP_LORA_SPI_SCLK, MBED_CONF_APP_LORA_CS, MBED_CONF_APP_LORA_RESET,
|
||||
MBED_CONF_APP_LORA_DIO0, MBED_CONF_APP_LORA_DIO1, MBED_CONF_APP_LORA_DIO2,
|
||||
MBED_CONF_APP_LORA_DIO3, MBED_CONF_APP_LORA_DIO4, MBED_CONF_APP_LORA_DIO5,
|
||||
MBED_CONF_APP_LORA_RF_SWITCH_CTL1, MBED_CONF_APP_LORA_RF_SWITCH_CTL2,
|
||||
MBED_CONF_APP_LORA_TXCTL, MBED_CONF_APP_LORA_RXCTL,
|
||||
MBED_CONF_APP_LORA_ANT_SWITCH, MBED_CONF_APP_LORA_PWR_AMP_CTL,
|
||||
MBED_CONF_APP_LORA_TCXO);
|
||||
|
||||
#else
|
||||
#error "Unknown LoRa radio specified (SX1272,SX1276 are valid)"
|
||||
#error "Unknown LoRa radio specified (SX1272,SX1276 are valid)"
|
||||
#endif
|
||||
|
||||
#endif //DEVICE_SPI
|
||||
#endif // DEVICE_SPI
|
||||
|
||||
#endif //MBED_CONF_APP_LORAWAN_ENABLED
|
||||
#endif // MBED_CONF_APP_LORAWAN_ENABLED
|
||||
|
||||
#endif /* APP_LORA_RADIO_HELPER_H_ */
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "mbed.h"
|
||||
#include "lorawan/LoRaWANInterface.h"
|
||||
#include "lorawan/system/lorawan_data_structures.h"
|
||||
#include "CayenneLPP.h"
|
||||
#include "events/EventQueue.h"
|
||||
#include "lora_radio_helper.h"
|
||||
#include "CayenneLPP.h"
|
||||
#include "lorawan/LoRaWANInterface.h"
|
||||
#include "lorawan/system/lorawan_data_structures.h"
|
||||
#include "mbed.h"
|
||||
|
||||
#if MBED_CONF_APP_DHT_ENABLED
|
||||
#include "DHT.h"
|
||||
@@ -14,23 +14,24 @@ using namespace events;
|
||||
uint8_t rx_buffer[LORAMAC_PHY_MAXPAYLOAD];
|
||||
|
||||
/*
|
||||
* Sets up an application dependent transmission timer in ms. Used only when Duty Cycling is off for testing
|
||||
* Sets up an application dependent transmission timer in ms. Used only when Duty Cycling is off for
|
||||
* testing
|
||||
*/
|
||||
#define TX_TIMER 600000
|
||||
#define TX_TIMER 600000
|
||||
|
||||
/**
|
||||
* Maximum number of events for the event queue.
|
||||
* 16 is the safe number for the stack events, however, if application
|
||||
* also uses the queue for whatever purposes, this number should be increased.c
|
||||
*/
|
||||
#define MAX_NUMBER_OF_EVENTS 16
|
||||
#define MAX_NUMBER_OF_EVENTS 16
|
||||
|
||||
/**
|
||||
* Maximum number of retries for CONFIRMED messages before giving up
|
||||
*/
|
||||
#define CONFIRMED_MSG_RETRY_COUNTER 3
|
||||
#define CONFIRMED_MSG_RETRY_COUNTER 3
|
||||
|
||||
static EventQueue ev_queue(MAX_NUMBER_OF_EVENTS * EVENTS_EVENT_SIZE);
|
||||
static EventQueue ev_queue(MAX_NUMBER_OF_EVENTS* EVENTS_EVENT_SIZE);
|
||||
static void lora_event_handler(lorawan_event_t event);
|
||||
static LoRaWANInterface lorawan(radio);
|
||||
static lorawan_app_callbacks_t callbacks;
|
||||
@@ -47,10 +48,9 @@ DHT dht(MBED_CONF_APP_DHT_DATA, MBED_CONF_APP_DHT_TYPE);
|
||||
DigitalOut led(LED1, 1);
|
||||
|
||||
int main(void) {
|
||||
|
||||
lorawan_status_t retcode;
|
||||
// Initialize LoRaWAN stack
|
||||
if (lorawan.initialize(&ev_queue) != LORAWAN_STATUS_OK) {
|
||||
if(lorawan.initialize(&ev_queue) != LORAWAN_STATUS_OK) {
|
||||
printf("\r\n LoRa initialization failed! \r\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -61,17 +61,15 @@ int main(void) {
|
||||
lorawan.add_app_callbacks(&callbacks);
|
||||
|
||||
// Set number of retries in case of CONFIRMED messages
|
||||
if (lorawan.set_confirmed_msg_retries(CONFIRMED_MSG_RETRY_COUNTER)
|
||||
!= LORAWAN_STATUS_OK) {
|
||||
if(lorawan.set_confirmed_msg_retries(CONFIRMED_MSG_RETRY_COUNTER) != LORAWAN_STATUS_OK) {
|
||||
printf("\r\n set_confirmed_msg_retries failed! \r\n\r\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("\r\n CONFIRMED message retries : %d \r\n",
|
||||
CONFIRMED_MSG_RETRY_COUNTER);
|
||||
printf("\r\n CONFIRMED message retries : %d \r\n", CONFIRMED_MSG_RETRY_COUNTER);
|
||||
|
||||
// Enable adaptive data rate
|
||||
if (lorawan.enable_adaptive_datarate() != LORAWAN_STATUS_OK) {
|
||||
if(lorawan.enable_adaptive_datarate() != LORAWAN_STATUS_OK) {
|
||||
printf("\r\n enable_adaptive_datarate failed! \r\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -82,8 +80,7 @@ int main(void) {
|
||||
|
||||
retcode = lorawan.connect();
|
||||
|
||||
if (retcode == LORAWAN_STATUS_OK ||
|
||||
retcode == LORAWAN_STATUS_CONNECT_IN_PROGRESS) {
|
||||
if(retcode == LORAWAN_STATUS_OK || retcode == LORAWAN_STATUS_CONNECT_IN_PROGRESS) {
|
||||
} else {
|
||||
printf("\r\n Connection error, code = %d \r\n", retcode);
|
||||
return -1;
|
||||
@@ -100,19 +97,18 @@ int main(void) {
|
||||
/**
|
||||
* Sends a message to the Network Server
|
||||
*/
|
||||
static void send_message()
|
||||
{
|
||||
static void send_message() {
|
||||
int16_t retcode;
|
||||
|
||||
#if MBED_CONF_APP_BATTERY_ENABLED
|
||||
float vbat = bat.read();
|
||||
vbat = vbat*5/3*3.3f;
|
||||
vbat = vbat * 5 / 3 * 3.3f;
|
||||
cayenne.addAnalogInput(1, vbat);
|
||||
#endif
|
||||
|
||||
#if MBED_CONF_APP_DHT_ENABLED
|
||||
int err = dht.read();
|
||||
if (err == DHT::SUCCESS) {
|
||||
if(err == DHT::SUCCESS) {
|
||||
cayenne.addTemperature(1, dht.getTemperature());
|
||||
cayenne.addRelativeHumidity(2, dht.getHumidity());
|
||||
} else {
|
||||
@@ -121,16 +117,16 @@ static void send_message()
|
||||
#endif
|
||||
|
||||
// No data to send
|
||||
if (cayenne.getSize() == 0) {
|
||||
if(cayenne.getSize() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
retcode = lorawan.send(MBED_CONF_LORA_APP_PORT, cayenne.getBuffer(), cayenne.getSize(),
|
||||
MSG_UNCONFIRMED_FLAG);
|
||||
|
||||
if (retcode < 0) {
|
||||
if(retcode < 0) {
|
||||
retcode == LORAWAN_STATUS_WOULD_BLOCK ? printf("send - WOULD BLOCK\r\n")
|
||||
: printf("\r\n send() - Error code %d \r\n", retcode);
|
||||
: printf("\r\n send() - Error code %d \r\n", retcode);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -141,21 +137,19 @@ static void send_message()
|
||||
/**
|
||||
* Receive a message from the Network Server
|
||||
*/
|
||||
static void receive_message()
|
||||
{
|
||||
static void receive_message() {
|
||||
int16_t retcode;
|
||||
retcode = lorawan.receive(MBED_CONF_LORA_APP_PORT, rx_buffer,
|
||||
LORAMAC_PHY_MAXPAYLOAD,
|
||||
MSG_CONFIRMED_FLAG|MSG_UNCONFIRMED_FLAG);
|
||||
retcode = lorawan.receive(MBED_CONF_LORA_APP_PORT, rx_buffer, LORAMAC_PHY_MAXPAYLOAD,
|
||||
MSG_CONFIRMED_FLAG | MSG_UNCONFIRMED_FLAG);
|
||||
|
||||
if (retcode < 0) {
|
||||
if(retcode < 0) {
|
||||
printf("\r\n receive() - Error code %d \r\n", retcode);
|
||||
return;
|
||||
}
|
||||
|
||||
printf(" Data:");
|
||||
|
||||
for (uint8_t i = 0; i < retcode; i++) {
|
||||
for(uint8_t i = 0; i < retcode; i++) {
|
||||
printf("%x", rx_buffer[i]);
|
||||
}
|
||||
|
||||
@@ -164,13 +158,12 @@ static void receive_message()
|
||||
memset(rx_buffer, 0, LORAMAC_PHY_MAXPAYLOAD);
|
||||
}
|
||||
|
||||
static void lora_event_handler(lorawan_event_t event)
|
||||
{
|
||||
switch (event) {
|
||||
static void lora_event_handler(lorawan_event_t event) {
|
||||
switch(event) {
|
||||
case CONNECTED:
|
||||
led = 1;
|
||||
printf("\r\n Connection - Successful \r\n");
|
||||
if (MBED_CONF_LORA_DUTY_CYCLE_ON) {
|
||||
if(MBED_CONF_LORA_DUTY_CYCLE_ON) {
|
||||
send_message();
|
||||
} else {
|
||||
ev_queue.call_every(TX_TIMER, send_message);
|
||||
@@ -183,7 +176,7 @@ static void lora_event_handler(lorawan_event_t event)
|
||||
break;
|
||||
case TX_DONE:
|
||||
printf("\r\n Message Sent to Network Server \r\n");
|
||||
if (MBED_CONF_LORA_DUTY_CYCLE_ON) {
|
||||
if(MBED_CONF_LORA_DUTY_CYCLE_ON) {
|
||||
send_message();
|
||||
}
|
||||
break;
|
||||
@@ -193,7 +186,7 @@ static void lora_event_handler(lorawan_event_t event)
|
||||
case TX_SCHEDULING_ERROR:
|
||||
printf("\r\n Transmission Error - EventCode = %d \r\n", event);
|
||||
// try again
|
||||
if (MBED_CONF_LORA_DUTY_CYCLE_ON) {
|
||||
if(MBED_CONF_LORA_DUTY_CYCLE_ON) {
|
||||
send_message();
|
||||
}
|
||||
break;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
https://github.com/ARMmbed/mbed-os/#367dbdf5145f4d6aa3e483c147fe7bda1ce23a36
|
||||
https://github.com/ARMmbed/mbed-os/#51d55508e8400b60af467005646c4e2164738d48
|
||||
|
||||
@@ -1 +1 @@
|
||||
https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers/#c5ee52293fee29aea3479d20e92ca2c1fc1ddaff
|
||||
https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers/#16958f814d505cfbbedfa16d9bf8b9dff0e0442b
|
||||
|
||||
@@ -263,6 +263,37 @@
|
||||
"battery-enabled": true,
|
||||
"battery-adc": "PA_2",
|
||||
|
||||
"dht-enabled": true,
|
||||
"dht-data": "PA_1",
|
||||
"dht-type": "DHT::DHT22"
|
||||
},
|
||||
|
||||
"NUCLEO_L073RZ": {
|
||||
"lorawan-enabled": true,
|
||||
|
||||
"lora-radio": "SX1272",
|
||||
"lora-spi-mosi": "D11",
|
||||
"lora-spi-miso": "D12",
|
||||
"lora-spi-sclk": "D13",
|
||||
"lora-cs": "D10",
|
||||
"lora-reset": "A0",
|
||||
"lora-dio0": "D2",
|
||||
"lora-dio1": "D3",
|
||||
"lora-dio2": "D4",
|
||||
"lora-dio3": "D5",
|
||||
"lora-dio4": "D8",
|
||||
"lora-dio5": "D9",
|
||||
"lora-rf-switch-ctl1": "NC",
|
||||
"lora-rf-switch-ctl2": "NC",
|
||||
"lora-txctl": "NC",
|
||||
"lora-rxctl": "NC",
|
||||
"lora-ant-switch": "A4",
|
||||
"lora-pwr-amp-ctl": "NC",
|
||||
"lora-tcxo": "NC",
|
||||
|
||||
"battery-enabled": false,
|
||||
"battery-adc": "PA_2",
|
||||
|
||||
"dht-enabled": true,
|
||||
"dht-data": "PA_1",
|
||||
"dht-type": "DHT::DHT22"
|
||||
|
||||
+55
-41
@@ -28,7 +28,6 @@
|
||||
#ifndef MBEDTLS_LORA_CONFIG_H
|
||||
#define MBEDTLS_LORA_CONFIG_H
|
||||
|
||||
|
||||
/**
|
||||
* \name SECTION: System support
|
||||
*
|
||||
@@ -2586,17 +2585,19 @@
|
||||
//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
|
||||
|
||||
/* CTR_DRBG options */
|
||||
//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
|
||||
//#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
|
||||
//#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
|
||||
//#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
|
||||
//#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
|
||||
//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by
|
||||
//default (48 with SHA-512, 32 with SHA-256) */ #define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**<
|
||||
//Interval before reseed is performed by default */ #define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**<
|
||||
//Maximum number of additional input bytes */ #define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024
|
||||
///**< Maximum number of requested bytes per call */ #define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384
|
||||
///**< Maximum size of (re)seed buffer */
|
||||
|
||||
/* HMAC_DRBG options */
|
||||
//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
|
||||
//#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
|
||||
//#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
|
||||
//#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
|
||||
//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by
|
||||
//default */ #define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional
|
||||
//input bytes */ #define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested
|
||||
//bytes per call */ #define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed
|
||||
//buffer */
|
||||
|
||||
/* ECP options */
|
||||
//#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
|
||||
@@ -2605,51 +2606,63 @@
|
||||
|
||||
/* Entropy options */
|
||||
//#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
|
||||
//#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
|
||||
//#define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Default minimum number of bytes required for the hardware entropy source mbedtls_hardware_poll() before entropy is released */
|
||||
//#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy
|
||||
//sources */ #define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Default minimum number of
|
||||
//bytes required for the hardware entropy source mbedtls_hardware_poll() before entropy is released
|
||||
//*/
|
||||
|
||||
/* Memory buffer allocator options */
|
||||
//#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
|
||||
|
||||
/* Platform options */
|
||||
//#define MBEDTLS_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */
|
||||
//#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if
|
||||
//MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */ #define
|
||||
//MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
|
||||
//#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined.
|
||||
//MBEDTLS_HAVE_TIME must be enabled */ #define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**<
|
||||
//Default fprintf to use, can be undefined */ #define MBEDTLS_PLATFORM_STD_PRINTF printf /**<
|
||||
//Default printf to use, can be undefined */
|
||||
/* Note: your snprintf must correclty zero-terminate the buffer! */
|
||||
//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS 0 /**< Default exit value to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE 1 /**< Default exit value to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" /**< Seed file to read/write with default implementation */
|
||||
//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined
|
||||
//*/ #define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS 0 /**< Default exit value to use, can be
|
||||
//undefined */ #define MBEDTLS_PLATFORM_STD_EXIT_FAILURE 1 /**< Default exit value to use, can
|
||||
//be undefined */ #define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read /**<
|
||||
//Default nv_seed_read function to use, can be undefined */ #define
|
||||
//MBEDTLS_PLATFORM_STD_NV_SEED_WRITE mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write
|
||||
//function to use, can be undefined */ #define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" /**<
|
||||
//Seed file to read/write with default implementation */
|
||||
|
||||
/* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
|
||||
/* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
|
||||
//#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
|
||||
//#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
|
||||
//#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be
|
||||
//undefined */ #define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use,
|
||||
//can be undefined */ #define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to
|
||||
//use, can be undefined */ #define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time
|
||||
//macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ #define
|
||||
//MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined.
|
||||
//MBEDTLS_HAVE_TIME must be enabled */ #define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**<
|
||||
//Default fprintf macro to use, can be undefined */ #define MBEDTLS_PLATFORM_PRINTF_MACRO printf
|
||||
///**< Default printf macro to use, can be undefined */
|
||||
/* Note: your snprintf must correclty zero-terminate the buffer! */
|
||||
//#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
|
||||
//#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be
|
||||
//undefined */ #define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**<
|
||||
//Default nv_seed_read function to use, can be undefined */ #define
|
||||
//MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default
|
||||
//nv_seed_write function to use, can be undefined */
|
||||
|
||||
/* SSL Cache options */
|
||||
//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
|
||||
//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
|
||||
|
||||
/* SSL options */
|
||||
//#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Maxium fragment length in bytes, determines the size of each of the two internal I/O buffers */
|
||||
//#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
|
||||
//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
|
||||
//#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
|
||||
//#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Maxium fragment length in bytes,
|
||||
//determines the size of each of the two internal I/O buffers */ #define
|
||||
//MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
|
||||
//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes
|
||||
//(default 256 bits) */ #define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay
|
||||
//of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
|
||||
|
||||
/**
|
||||
* Complete list of ciphersuites to use, in order of preference.
|
||||
@@ -2663,11 +2676,13 @@
|
||||
*
|
||||
* The value below is only an example, not the default.
|
||||
*/
|
||||
//#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
|
||||
//#define MBEDTLS_SSL_CIPHERSUITES
|
||||
//MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
|
||||
|
||||
/* X509 options */
|
||||
//#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
|
||||
//#define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */
|
||||
//#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a
|
||||
//verification chain. */ #define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a
|
||||
//path/filename string in bytes including the null terminator character ('\0'). */
|
||||
|
||||
/**
|
||||
* Allow SHA-1 in the default TLS configuration for certificate signing.
|
||||
@@ -2689,7 +2704,6 @@
|
||||
*/
|
||||
//#define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
|
||||
|
||||
|
||||
#include "check_config.h"
|
||||
|
||||
#endif /* MBEDTLS_LORA_CONFIG_H */
|
||||
Reference in New Issue
Block a user