|
EnigmaIOT
0.9.3
Secure sensor and gateway platform based on ESP8266 and ESP32
|
Parameter configuration. More...
Go to the source code of this file.
Macros | |
| #define | CONNECT_TO_WIFI_AP 1 |
| In projects where gateway should not be connected to WiFi (for instance a data logger to SD) it may be useful to disable WiFi setting this to 0. Set it to 1 otherwise. More... | |
| #define | CYPHER_TYPE ChaChaPoly |
| #define | DEBUG_ESP_PORT Serial |
Stream to output debug info. It will normally be Serial More... | |
| #define | DEBUG_LEVEL WARN |
| Possible values VERBOSE, DBG, INFO, WARN, ERROR, NONE. More... | |
Variables | |
| static const uint8_t | MAX_MESSAGE_LENGTH = 250 |
| Maximum payload size on ESP-NOW. More... | |
| static const size_t | ENIGMAIOT_ADDR_LEN = 6 |
| Address size. Mac address = 6 bytes. More... | |
| static const char | ENIGMAIOT_PROT_VERS [] = "0.9.3" |
| EnitmaIoT Version. More... | |
| static const uint8_t | DEFAULT_CHANNEL = 3 |
| WiFi channel to be used on ESP-NOW. More... | |
| static const uint32_t | FLASH_LED_TIME = 50 |
| Time that led keeps on during flash in ms. More... | |
| static const uint8_t | NETWORK_NAME_LENGTH = 21 |
| Maximum number of characters of network name. More... | |
| static const uint8_t | NODE_NAME_LENGTH = 33 |
| Maximum number of characters of node name. More... | |
| static const int | RESET_PIN_DURATION = 5000 |
| Number of milliseconds that reset pin has to be grounded to produce a configuration reset. More... | |
| static const unsigned int | MAX_KEY_VALIDITY = 86400000U |
| After this time (in ms) a nude is unregistered. More... | |
| static const unsigned int | MAX_NODE_INACTIVITY = 86400000U |
| After this time (in ms) a node is marked as gone. More... | |
| static const int | OTA_GW_TIMEOUT = 11000 |
| OTA mode timeout. In OTA mode all data messages are ignored. More... | |
| static const size_t | MAX_MQTT_QUEUE_SIZE = 5 |
| Maximum number of MQTT messages to be sent. More... | |
| static const int | RATE_AVE_ORDER = 5 |
| Message rate filter order. More... | |
| static const int | MAX_INPUT_QUEUE_SIZE = 3 |
| Input queue size for EnigmaIOT messages. Acts as a buffer to be able to handle messages during high load. More... | |
| static const int | NUM_NODES = 20 |
| Maximum number of nodes that this gateway can handle. More... | |
| static const bool | DISCONNECT_ON_DATA_ERROR = true |
| Activates node invalidation in case of data error. More... | |
| static const int16_t | RECONNECTION_PERIOD = 1500 |
| Time to retry Gateway connection. More... | |
| static const uint16_t | DOWNLINK_WAIT_TIME = 800 |
| Time to wait for downlink message before sleep. Setting less than 180 ms causes ESP-NOW errors due to lack of ACK processing. More... | |
| static const uint32_t | DEFAULT_SLEEP_TIME = 10 |
| Default sleep time if it was not set. More... | |
| static const uint32_t | OTA_TIMEOUT_TIME = 10000 |
| Timeout between OTA messages. In milliseconds. More... | |
| static const time_t | IDENTIFY_TIMEOUT = 10000 |
| How long LED will be flashing during identification. More... | |
| static const uint32_t | TIME_SYNC_PERIOD = 30000 |
| Period of clock synchronization request. More... | |
| static const unsigned int | QUICK_SYNC_TIME = 5000 |
| Period of clock synchronization request in case of resync is needed. More... | |
| static const int | MIN_SYNC_ACCURACY = 5 |
| If calculated offset absolute value is higher than this value resync is done more often. More... | |
| static const int | MAX_DATA_PAYLOAD_SIZE = 214 |
| Maximun payload size for data packets. More... | |
| static const uint32_t | PRE_REG_DELAY = 5000 |
| Time to wait before registration so that other nodes have time to communicate. Real delay is a random lower than this value. More... | |
| static const uint32_t | POST_REG_DELAY = 1500 |
| Time to waif before sending data after registration so that other nodes have time to finish their registration. Real delay is a random lower than this value. More... | |
| static const bool | CHECK_COMM_ERRORS = true |
| Try to reconnect in case of communication errors. More... | |
| static const uint8_t | COMM_ERRORS_BEFORE_SCAN = 2 |
| Node will search for a gateway if this number of communication errors have happened. More... | |
| static const uint32_t | RTC_ADDRESS = 0 |
| RTC memory address where to store context. Modify it if you need place to store your own data during deep sleep. Take care not to overwrite above that address. More... | |
| const uint8_t | KEY_LENGTH = 32 |
| Key length used by selected crypto algorythm. The only tested value is 32. Change it only if you know what you are doing. More... | |
| const uint8_t | IV_LENGTH = 12 |
| Initalization vector length used by selected crypto algorythm. More... | |
| const uint8_t | TAG_LENGTH = 16 |
| Authentication tag length. For Poly1305 it is always 16. More... | |
| const uint8_t | AAD_LENGTH = 8 |
| Number of bytes from last part of key that will be used for additional authenticated data. More... | |
| #define CONNECT_TO_WIFI_AP 1 |
In projects where gateway should not be connected to WiFi (for instance a data logger to SD) it may be useful to disable WiFi setting this to 0. Set it to 1 otherwise.
Definition at line 37 of file EnigmaIoTconfig.h.
| #define CYPHER_TYPE ChaChaPoly |
Definition at line 63 of file EnigmaIoTconfig.h.
| #define DEBUG_ESP_PORT Serial |
Stream to output debug info. It will normally be Serial
Definition at line 66 of file EnigmaIoTconfig.h.
| #define DEBUG_LEVEL WARN |
Possible values VERBOSE, DBG, INFO, WARN, ERROR, NONE.
Definition at line 68 of file EnigmaIoTconfig.h.
| const uint8_t AAD_LENGTH = 8 |
Number of bytes from last part of key that will be used for additional authenticated data.
Definition at line 61 of file EnigmaIoTconfig.h.
|
static |
Try to reconnect in case of communication errors.
Definition at line 52 of file EnigmaIoTconfig.h.
|
static |
Node will search for a gateway if this number of communication errors have happened.
Definition at line 54 of file EnigmaIoTconfig.h.
|
static |
WiFi channel to be used on ESP-NOW.
Definition at line 16 of file EnigmaIoTconfig.h.
|
static |
Default sleep time if it was not set.
Definition at line 42 of file EnigmaIoTconfig.h.
|
static |
Activates node invalidation in case of data error.
Definition at line 33 of file EnigmaIoTconfig.h.
|
static |
Time to wait for downlink message before sleep. Setting less than 180 ms causes ESP-NOW errors due to lack of ACK processing.
Definition at line 41 of file EnigmaIoTconfig.h.
|
static |
Address size. Mac address = 6 bytes.
Definition at line 14 of file EnigmaIoTconfig.h.
|
static |
EnitmaIoT Version.
Definition at line 15 of file EnigmaIoTconfig.h.
|
static |
Time that led keeps on during flash in ms.
Definition at line 17 of file EnigmaIoTconfig.h.
|
static |
How long LED will be flashing during identification.
Definition at line 44 of file EnigmaIoTconfig.h.
| const uint8_t IV_LENGTH = 12 |
Initalization vector length used by selected crypto algorythm.
Definition at line 59 of file EnigmaIoTconfig.h.
| const uint8_t KEY_LENGTH = 32 |
Key length used by selected crypto algorythm. The only tested value is 32. Change it only if you know what you are doing.
Definition at line 58 of file EnigmaIoTconfig.h.
|
static |
Maximun payload size for data packets.
Definition at line 48 of file EnigmaIoTconfig.h.
|
static |
Input queue size for EnigmaIOT messages. Acts as a buffer to be able to handle messages during high load.
Definition at line 28 of file EnigmaIoTconfig.h.
|
static |
After this time (in ms) a nude is unregistered.
Definition at line 23 of file EnigmaIoTconfig.h.
|
static |
Maximum payload size on ESP-NOW.
Definition at line 13 of file EnigmaIoTconfig.h.
|
static |
Maximum number of MQTT messages to be sent.
Definition at line 26 of file EnigmaIoTconfig.h.
|
static |
After this time (in ms) a node is marked as gone.
Definition at line 24 of file EnigmaIoTconfig.h.
|
static |
If calculated offset absolute value is higher than this value resync is done more often.
Definition at line 47 of file EnigmaIoTconfig.h.
|
static |
Maximum number of characters of network name.
Definition at line 18 of file EnigmaIoTconfig.h.
|
static |
Maximum number of characters of node name.
Definition at line 19 of file EnigmaIoTconfig.h.
|
static |
Maximum number of nodes that this gateway can handle.
Definition at line 30 of file EnigmaIoTconfig.h.
|
static |
OTA mode timeout. In OTA mode all data messages are ignored.
Definition at line 25 of file EnigmaIoTconfig.h.
|
static |
Timeout between OTA messages. In milliseconds.
Definition at line 43 of file EnigmaIoTconfig.h.
|
static |
Time to waif before sending data after registration so that other nodes have time to finish their registration. Real delay is a random lower than this value.
Definition at line 50 of file EnigmaIoTconfig.h.
|
static |
Time to wait before registration so that other nodes have time to communicate. Real delay is a random lower than this value.
Definition at line 49 of file EnigmaIoTconfig.h.
|
static |
Period of clock synchronization request in case of resync is needed.
Definition at line 46 of file EnigmaIoTconfig.h.
|
static |
Message rate filter order.
Definition at line 27 of file EnigmaIoTconfig.h.
|
static |
Time to retry Gateway connection.
Definition at line 40 of file EnigmaIoTconfig.h.
|
static |
Number of milliseconds that reset pin has to be grounded to produce a configuration reset.
Definition at line 20 of file EnigmaIoTconfig.h.
|
static |
RTC memory address where to store context. Modify it if you need place to store your own data during deep sleep. Take care not to overwrite above that address.
Definition at line 55 of file EnigmaIoTconfig.h.
| const uint8_t TAG_LENGTH = 16 |
Authentication tag length. For Poly1305 it is always 16.
Definition at line 60 of file EnigmaIoTconfig.h.
|
static |
Period of clock synchronization request.
Definition at line 45 of file EnigmaIoTconfig.h.
1.8.18