Latest version of issue453 branch

This commit is contained in:
Manuel Bl
2019-12-03 22:13:45 +01:00
parent 2d09703fc6
commit 3036d16e0d
43 changed files with 7 additions and 2 deletions

0
src/aes/lmic_aes.c Executable file → Normal file
View File

0
src/aes/other.c Executable file → Normal file
View File

67
src/esp_idf_lmic_config.h Executable file
View File

@ -0,0 +1,67 @@
/*******************************************************************************
*
* ttn-esp32 - The Things Network device library for ESP-IDF / SX127x
*
* Copyright (c) 2018 Manuel Bleichenbacher
*
* Licensed under MIT License
* https://opensource.org/licenses/MIT
*
* Convert SDK configuration (make menuconfig) into LMIC configuration.
*******************************************************************************/
#include "sdkconfig.h"
#if defined(CONFIG_TTN_LORA_FREQ_EU_868)
#define CFG_eu868 1
#elif defined(CONFIG_TTN_LORA_FREQ_US_915)
#define CFG_us915 1
#elif defined(CONFIG_TTN_LORA_FREQ_AU_921)
#define CFG_au921 1
#elif defined(CONFIG_TTN_LORA_FREQ_AS_923)
#define CFG_as923 1
#elif defined(CONFIG_TTN_LORA_FREQ_AS_923_JP)
#define CFG_as923 1
#define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP
#elif defined(CONFIG_TTN_LORA_FREQ_KR_920)
#define CFG_kr920 1
#elif defined(CONFIG_TTN_LORA_FREQ_IN_866)
#define CFG_in866 1
#else
#define TTN_IS_DISABLED 1
#define CFG_eu868 1
#endif
#if defined(CONFIG_TTN_RADIO_SX1272_73)
#define CFG_sx1272_radio 1
#elif defined(CONFIG_TTN_RADIO_SX1276_77_78_79)
#define CFG_sx1276_radio 1
#else
#error TTN LoRa radio chip must be configured using 'make menuconfig'
#endif
#if !defined(CONFIG_TTN_PROVISION_UART_NONE)
#define TTN_HAS_AT_COMMANDS 1
#if defined(CONFIG_TTN_PROVISION_UART_CONFIG_YES)
#define TTN_CONFIG_UART 1
#endif
#endif
// 16 μs per tick
// LMIC requires ticks to be 15.5μs - 100 μs long
#define US_PER_OSTICK 16
#define OSTICKS_PER_SEC (1000000 / US_PER_OSTICK)
//#define USE_ORIGINAL_AES
#define USE_MBEDTLS_AES
#if LMIC_DEBUG_LEVEL > 0 || LMIC_X_DEBUG_LEVEL > 0
#include <stdio.h>
#endif
#define LMIC_ENABLE_onEvent 0
#define DISABLE_PING
#define DISABLE_BEACONS

0
src/lmic/config.h Executable file → Normal file
View File

0
src/lmic/hal.h Executable file → Normal file
View File

2
src/lmic/lmic.c Executable file → Normal file
View File

@ -1872,7 +1872,7 @@ static bit_t buildDataFrame (void) {
LMIC.adrChanged = 0;
}
u1_t flen = end + (txdata ? 5+dlen : 4);
unsigned int flen = end + (txdata ? 5+dlen : 4);
if( flen > MAX_LEN_FRAME ) {
// Options and payload too big - delay payload
txdata = 0;

0
src/lmic/lmic.h Executable file → Normal file
View File

0
src/lmic/lmic_as923.c Executable file → Normal file
View File

0
src/lmic/lmic_au921.c Executable file → Normal file
View File

0
src/lmic/lmic_bandplan.h Executable file → Normal file
View File

0
src/lmic/lmic_bandplan_as923.h Executable file → Normal file
View File

0
src/lmic/lmic_bandplan_au921.h Executable file → Normal file
View File

0
src/lmic/lmic_bandplan_eu868.h Executable file → Normal file
View File

0
src/lmic/lmic_bandplan_in866.h Executable file → Normal file
View File

0
src/lmic/lmic_bandplan_kr920.h Executable file → Normal file
View File

0
src/lmic/lmic_bandplan_us915.h Executable file → Normal file
View File

0
src/lmic/lmic_compliance.c Executable file → Normal file
View File

0
src/lmic/lmic_compliance.h Executable file → Normal file
View File

0
src/lmic/lmic_config_preconditions.h Executable file → Normal file
View File

0
src/lmic/lmic_env.h Executable file → Normal file
View File

0
src/lmic/lmic_eu868.c Executable file → Normal file
View File

0
src/lmic/lmic_eu_like.c Executable file → Normal file
View File

0
src/lmic/lmic_eu_like.h Executable file → Normal file
View File

0
src/lmic/lmic_in866.c Executable file → Normal file
View File

0
src/lmic/lmic_kr920.c Executable file → Normal file
View File

0
src/lmic/lmic_us915.c Executable file → Normal file
View File

0
src/lmic/lmic_us_like.c Executable file → Normal file
View File

0
src/lmic/lmic_us_like.h Executable file → Normal file
View File

0
src/lmic/lmic_util.c Executable file → Normal file
View File

0
src/lmic/lmic_util.h Executable file → Normal file
View File

0
src/lmic/lorabase.h Executable file → Normal file
View File

0
src/lmic/lorabase_as923.h Executable file → Normal file
View File

0
src/lmic/lorabase_au921.h Executable file → Normal file
View File

0
src/lmic/lorabase_eu868.h Executable file → Normal file
View File

0
src/lmic/lorabase_in866.h Executable file → Normal file
View File

0
src/lmic/lorabase_kr920.h Executable file → Normal file
View File

0
src/lmic/lorabase_us915.h Executable file → Normal file
View File

0
src/lmic/lorawan_spec_compliance.h Executable file → Normal file
View File

0
src/lmic/oslmic.c Executable file → Normal file
View File

0
src/lmic/oslmic.h Executable file → Normal file
View File

0
src/lmic/oslmic_types.h Executable file → Normal file
View File

0
src/lmic/radio.c Executable file → Normal file
View File