Correct misspells (#1028)

This commit is contained in:
tekka
2018-01-11 22:26:08 +01:00
committed by GitHub
parent 1feae06d7f
commit af3452f91c
20 changed files with 60 additions and 60 deletions
+11 -11
View File
@@ -158,7 +158,7 @@
* @def MY_SERIAL_OUTPUT_SIZE * @def MY_SERIAL_OUTPUT_SIZE
* @brief Maximum characters for serial output. * @brief Maximum characters for serial output.
* *
* If you are running extreamely low on memory, reducing this size might just save your day. * If you are running extremely low on memory, reducing this size might just save your day.
*/ */
#ifndef MY_SERIAL_OUTPUT_SIZE #ifndef MY_SERIAL_OUTPUT_SIZE
#define MY_SERIAL_OUTPUT_SIZE (120u) #define MY_SERIAL_OUTPUT_SIZE (120u)
@@ -633,7 +633,7 @@
/** /**
* @def MY_RFM69_TX_POWER_DBM * @def MY_RFM69_TX_POWER_DBM
* @brief Set TX power level, default 5dBm (overriden if ATC mode enabled). * @brief Set TX power level, default 5dBm (overridden if ATC mode enabled).
*/ */
#ifndef MY_RFM69_TX_POWER_DBM #ifndef MY_RFM69_TX_POWER_DBM
#define MY_RFM69_TX_POWER_DBM (5) #define MY_RFM69_TX_POWER_DBM (5)
@@ -895,7 +895,7 @@
/** /**
* @def MY_RFM95_TX_POWER_DBM * @def MY_RFM95_TX_POWER_DBM
* @brief Set TX power level, default 13dBm (overriden if ATC mode enabled) * @brief Set TX power level, default 13dBm (overridden if ATC mode enabled)
* *
* See here https://en.wikipedia.org/wiki/Short_Range_Devices * See here https://en.wikipedia.org/wiki/Short_Range_Devices
*/ */
@@ -1506,7 +1506,7 @@
* with the regular software and ATSHA204A based modes. * with the regular software and ATSHA204A based modes.
* *
* If the provided password is shorter than the size of the HMAC or %AES key, it will be null-padded * If the provided password is shorter than the size of the HMAC or %AES key, it will be null-padded
* to accomodate the key size in question. A 32 character password is the maximum length. Any * to accommodate the key size in question. A 32 character password is the maximum length. Any
* password longer than that will be truncated. * password longer than that will be truncated.
*/ */
//#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword" //#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword"
@@ -1546,7 +1546,7 @@
* requirements. * requirements.
* *
* Use this for evaluating security. It allows for gradual introduction of signing requirements in * Use this for evaluating security. It allows for gradual introduction of signing requirements in
* a network. Nodes that present themselves as not requiering signing or whitelisting will be * a network. Nodes that present themselves as not requiring signing or whitelisting will be
* cleared of this requirement at the receiving end. A gateway which require signatures will only do * cleared of this requirement at the receiving end. A gateway which require signatures will only do
* so from nodes that in turn require signatures. * so from nodes that in turn require signatures.
* *
@@ -1626,7 +1626,7 @@
/** @}*/ // End of SigningSettingGrpPub group /** @}*/ // End of SigningSettingGrpPub group
/** /**
* @defgroup MyLockgrppub Node locknig * @defgroup MyLockgrppub Node locking
* @ingroup MyConfig * @ingroup MyConfig
* @brief These options control node lock related configurations. * @brief These options control node lock related configurations.
* *
@@ -1639,7 +1639,7 @@
* message to the gateway/controller with 30 minute intervals. Payload is a string with a reason for * message to the gateway/controller with 30 minute intervals. Payload is a string with a reason for
* the locking. * the locking.
* *
* The string is abbreviated to accomodate a signature. The following abbreviations exist at the * The string is abbreviated to accommodate a signature. The following abbreviations exist at the
* moment: * moment:
* - LDB (Locked During Boot) * - LDB (Locked During Boot)
* - TMNR (Too Many Nonce Requests) * - TMNR (Too Many Nonce Requests)
@@ -1668,7 +1668,7 @@
/** /**
* @def MY_NODE_UNLOCK_PIN * @def MY_NODE_UNLOCK_PIN
* @brief By grounding this pin durig reset of a locked node, the node will unlock. * @brief By grounding this pin during reset of a locked node, the node will unlock.
* *
* If using a secure bootloader, grounding the pin is the only option to reactivate the node. * If using a secure bootloader, grounding the pin is the only option to reactivate the node.
* If using stock Android bootloader or a DualOptiBoot it is also possible to download a sketch * If using stock Android bootloader or a DualOptiBoot it is also possible to download a sketch
@@ -1680,9 +1680,9 @@
/** /**
* @def MY_NODE_LOCK_COUNTER_MAX * @def MY_NODE_LOCK_COUNTER_MAX
* @brief Maximum accepted occurances of suspected malicious activity in a node. * @brief Maximum accepted occurrences of suspected malicious activity in a node.
* *
* Counter decrements on reoccuring incidents but resets if legitimate behaviour is identified. * Counter decrements on reoccurring incidents but resets if legitimate behaviour is identified.
*/ */
#ifndef MY_NODE_LOCK_COUNTER_MAX #ifndef MY_NODE_LOCK_COUNTER_MAX
#define MY_NODE_LOCK_COUNTER_MAX (5) #define MY_NODE_LOCK_COUNTER_MAX (5)
@@ -1782,7 +1782,7 @@
#define MY_NODE_TYPE "REPEATER" #define MY_NODE_TYPE "REPEATER"
#elif defined(DOXYGEN) #elif defined(DOXYGEN)
#define MY_IS_GATEWAY //!< true when configuration indicate a gateway device, @todo Mark these internals #define MY_IS_GATEWAY //!< true when configuration indicate a gateway device, @todo Mark these internals
#define MY_NODE_TYPE //!< "GW" for wateways, REPEATER" for repeaters, "NODE" for nodes, @todo Mark these internals #define MY_NODE_TYPE //!< "GW" for gateways, REPEATER" for repeaters, "NODE" for nodes, @todo Mark these internals
#else #else
#define MY_IS_GATEWAY (false) #define MY_IS_GATEWAY (false)
#define MY_NODE_TYPE "NODE" #define MY_NODE_TYPE "NODE"
+1 -1
View File
@@ -82,7 +82,7 @@
#define EEPROM_SIGNING_SOFT_SERIAL_ADDRESS (EEPROM_SIGNING_SOFT_HMAC_KEY_ADDRESS + SIZE_SIGNING_SOFT_HMAC_KEY) #define EEPROM_SIGNING_SOFT_SERIAL_ADDRESS (EEPROM_SIGNING_SOFT_HMAC_KEY_ADDRESS + SIZE_SIGNING_SOFT_HMAC_KEY)
/** @brief Address RF AES encryption key. This is set with @ref SecurityPersonalizer.ino */ /** @brief Address RF AES encryption key. This is set with @ref SecurityPersonalizer.ino */
#define EEPROM_RF_ENCRYPTION_AES_KEY_ADDRESS (EEPROM_SIGNING_SOFT_SERIAL_ADDRESS + SIZE_SIGNING_SOFT_SERIAL) #define EEPROM_RF_ENCRYPTION_AES_KEY_ADDRESS (EEPROM_SIGNING_SOFT_SERIAL_ADDRESS + SIZE_SIGNING_SOFT_SERIAL)
/** @brief Address node lock couner. This is set with @ref SecurityPersonalizer.ino */ /** @brief Address node lock counter. This is set with @ref SecurityPersonalizer.ino */
#define EEPROM_NODE_LOCK_COUNTER (EEPROM_RF_ENCRYPTION_AES_KEY_ADDRESS + SIZE_RF_ENCRYPTION_AES_KEY) #define EEPROM_NODE_LOCK_COUNTER (EEPROM_RF_ENCRYPTION_AES_KEY_ADDRESS + SIZE_RF_ENCRYPTION_AES_KEY)
/** @brief First free address for sketch static configuration */ /** @brief First free address for sketch static configuration */
#define EEPROM_LOCAL_CONFIG_ADDRESS (EEPROM_NODE_LOCK_COUNTER + SIZE_NODE_LOCK_COUNTER) #define EEPROM_LOCAL_CONFIG_ADDRESS (EEPROM_NODE_LOCK_COUNTER + SIZE_NODE_LOCK_COUNTER)
+2 -2
View File
@@ -450,7 +450,7 @@ void gatewayTransportRenewIP(void)
0 - nothing happened 0 - nothing happened
1 - renew failed 1 - renew failed
2 - renew success 2 - renew success
3 - rebinf failed 3 - rebind failed
4 - rebind success 4 - rebind success
*/ */
static unsigned long next_time = hwMillis() + MY_IP_RENEWAL_INTERVAL_MS; static unsigned long next_time = hwMillis() + MY_IP_RENEWAL_INTERVAL_MS;
@@ -462,7 +462,7 @@ void gatewayTransportRenewIP(void)
} }
if (Ethernet.maintain() & ~(0x06)) { if (Ethernet.maintain() & ~(0x06)) {
GATEWAY_DEBUG(PSTR("!GWT:TRC:IP RENEW FAIL\n")); GATEWAY_DEBUG(PSTR("!GWT:TRC:IP RENEW FAIL\n"));
/* Error occured -> IP was not renewed */ /* Error occurred -> IP was not renewed */
return; return;
} }
_w5100_spi_en(false); _w5100_spi_en(false);
+1 -1
View File
@@ -36,7 +36,7 @@ typedef enum {
INDICATION_GOT_NODEID, //!< Got a node ID. INDICATION_GOT_NODEID, //!< Got a node ID.
INDICATION_CHECK_UPLINK, //!< Check uplink INDICATION_CHECK_UPLINK, //!< Check uplink
INDICATION_REQ_REGISTRATION, //!< Request node registration. INDICATION_REQ_REGISTRATION, //!< Request node registration.
INDICATION_GOT_REGISTRATION, //!< Got registration reponse. INDICATION_GOT_REGISTRATION, //!< Got registration response.
INDICATION_REBOOT, //!< Rebooting node. INDICATION_REBOOT, //!< Rebooting node.
INDICATION_PRESENT, //!< Presenting node to gateway. INDICATION_PRESENT, //!< Presenting node to gateway.
INDICATION_CLEAR_ROUTING, //!< Clear routing table requested. INDICATION_CLEAR_ROUTING, //!< Clear routing table requested.
+1 -1
View File
@@ -46,7 +46,7 @@ inline void ledsInit()
hwPinMode(MY_DEFAULT_ERR_LED_PIN, OUTPUT); hwPinMode(MY_DEFAULT_ERR_LED_PIN, OUTPUT);
#endif #endif
prevTime = hwMillis() - prevTime = hwMillis() -
LED_PROCESS_INTERVAL_MS; // Substract some, to make sure leds gets updated on first run. LED_PROCESS_INTERVAL_MS; // Subtract some, to make sure leds gets updated on first run.
ledsProcess(); ledsProcess();
} }
+2 -2
View File
@@ -238,7 +238,7 @@ typedef enum {
#define mGetVersion(_message) ((uint8_t)BF_GET(_message.version_length, 0, 2)) //!< Get version field #define mGetVersion(_message) ((uint8_t)BF_GET(_message.version_length, 0, 2)) //!< Get version field
#define mSetSigned(_message,_signed) BF_SET(_message.version_length, _signed, 2, 1) //!< Set signed field #define mSetSigned(_message,_signed) BF_SET(_message.version_length, _signed, 2, 1) //!< Set signed field
#define mGetSigned(_message) ((bool)BF_GET(_message.version_length, 2, 1)) //!< Get versignedsion field #define mGetSigned(_message) ((bool)BF_GET(_message.version_length, 2, 1)) //!< Get signed field
#define mSetLength(_message,_length) BF_SET(_message.version_length, _length, 3, 5) //!< Set length field #define mSetLength(_message,_length) BF_SET(_message.version_length, _length, 3, 5) //!< Set length field
#define mGetLength(_message) ((uint8_t)BF_GET(_message.version_length, 3, 5)) //!< Get length field #define mGetLength(_message) ((uint8_t)BF_GET(_message.version_length, 3, 5)) //!< Get length field
@@ -352,7 +352,7 @@ typedef union {
// 5 bit - Length of payload // 5 bit - Length of payload
uint8_t command_ack_payload; // 3 bit - Command type uint8_t command_ack_payload; // 3 bit - Command type
// 1 bit - Request an ack - Indicator that receiver should send an ack back. // 1 bit - Request an ack - Indicator that receiver should send an ack back.
// 1 bit - Is ack messsage - Indicator that this is the actual ack message. // 1 bit - Is ack message - Indicator that this is the actual ack message.
// 3 bit - Payload data type // 3 bit - Payload data type
uint8_t type; // 8 bit - Type varies depending on command uint8_t type; // 8 bit - Type varies depending on command
uint8_t sensor; // 8 bit - Id of sensor that this message concerns. uint8_t sensor; // 8 bit - Id of sensor that this message concerns.
+1 -1
View File
@@ -46,7 +46,7 @@
* You will see the hwMillis() of the receiving node. After each \n character, a * You will see the hwMillis() of the receiving node. After each \n character, a
* new debug message line starts. Incomplete messages are ending with '...' * new debug message line starts. Incomplete messages are ending with '...'
* *
* @param logNode Testination node ID * @param logNode Destination node ID
* @param enableAck Enable or disable ACK flag * @param enableAck Enable or disable ACK flag
* @param fmt printf format string * @param fmt printf format string
* @param ... arguments * @param ... arguments
+1 -1
View File
@@ -28,7 +28,7 @@
// returns true if successfully parsed the input string // returns true if successfully parsed the input string
bool protocolParse(MyMessage &message, char *inputString); bool protocolParse(MyMessage &message, char *inputString);
// Format MyMessage to the protocol represenataion // Format MyMessage to the protocol representation
char *protocolFormat(MyMessage &message); char *protocolFormat(MyMessage &message);
#endif #endif
+2 -2
View File
@@ -465,7 +465,7 @@ bool _processInternalMessages(void)
// sender is a node // sender is a node
if (type == I_REGISTRATION_REQUEST) { if (type == I_REGISTRATION_REQUEST) {
#if defined(MY_GATEWAY_FEATURE) #if defined(MY_GATEWAY_FEATURE)
// registeration requests are exclusively handled by GW/Controller // registration requests are exclusively handled by GW/Controller
#if !defined(MY_REGISTRATION_CONTROLLER) #if !defined(MY_REGISTRATION_CONTROLLER)
bool approveRegistration; bool approveRegistration;
@@ -730,7 +730,7 @@ void _checkNodeLock(void)
_nodeLock("LDB"); //Locked during boot _nodeLock("LDB"); //Locked during boot
} }
} else if (hwReadConfig(EEPROM_NODE_LOCK_COUNTER) == 0xFF) { } else if (hwReadConfig(EEPROM_NODE_LOCK_COUNTER) == 0xFF) {
// Reset walue // Reset value
hwWriteConfig(EEPROM_NODE_LOCK_COUNTER, MY_NODE_LOCK_COUNTER_MAX); hwWriteConfig(EEPROM_NODE_LOCK_COUNTER, MY_NODE_LOCK_COUNTER_MAX);
} }
#endif #endif
+2 -2
View File
@@ -178,7 +178,7 @@ bool sendHeartbeat(const bool ack = false);
/** /**
* Send this nodes signal strength to gateway. * Send this nodes signal strength to gateway.
* @param level Signal strength can be rssi if the radio provide it, or another kind of calculation * @param level Signal strength can be RSSI if the radio provide it, or another kind of calculation
* @param ack Set this to true if you want destination node to send ack back to this node. Default is not to request any ack. * @param ack Set this to true if you want destination node to send ack back to this node. Default is not to request any ack.
* @return true Returns true if message reached the first stop on its way to destination. * @return true Returns true if message reached the first stop on its way to destination.
*/ */
@@ -414,7 +414,7 @@ void receive(const MyMessage &message) __attribute__((weak));
*/ */
void receiveTime(uint32_t) __attribute__((weak)); void receiveTime(uint32_t) __attribute__((weak));
/** /**
* @brief Node presenation * @brief Node presentation
*/ */
void presentation(void) __attribute__((weak)); void presentation(void) __attribute__((weak));
/** /**
+3 -3
View File
@@ -412,7 +412,7 @@ static void prepareSigningPresentation(MyMessage &msg, uint8_t destination)
msg.data[1] = 0; msg.data[1] = 0;
} }
// Helper to process presentation mesages // Helper to process presentation messages
static bool signerInternalProcessPresentation(MyMessage &msg) static bool signerInternalProcessPresentation(MyMessage &msg)
{ {
const uint8_t sender = msg.sender; const uint8_t sender = msg.sender;
@@ -526,7 +526,7 @@ static bool signerInternalProcessPresentation(MyMessage &msg)
return true; // No need to further process I_SIGNING_PRESENTATION return true; // No need to further process I_SIGNING_PRESENTATION
} }
// Helper to process nonce request mesages // Helper to process nonce request messages
static bool signerInternalProcessNonceRequest(MyMessage &msg) static bool signerInternalProcessNonceRequest(MyMessage &msg)
{ {
#if defined(MY_SIGNING_FEATURE) #if defined(MY_SIGNING_FEATURE)
@@ -555,7 +555,7 @@ static bool signerInternalProcessNonceRequest(MyMessage &msg)
return true; // No need to further process I_NONCE_REQUEST return true; // No need to further process I_NONCE_REQUEST
} }
// Helper to process nonce response mesages // Helper to process nonce response messages
static bool signerInternalProcessNonceResponse(MyMessage &msg) static bool signerInternalProcessNonceResponse(MyMessage &msg)
{ {
#if defined(MY_SIGNING_FEATURE) #if defined(MY_SIGNING_FEATURE)
+14 -14
View File
@@ -43,7 +43,7 @@
* and not enabled by default. * and not enabled by default.
* *
* If you do want the additional security layer signing provides, you pick the backend of your * If you do want the additional security layer signing provides, you pick the backend of your
* choise in your sketch. Currently, two compatible backends are supported; @ref MY_SIGNING_ATSHA204 * choice in your sketch. Currently, two compatible backends are supported; @ref MY_SIGNING_ATSHA204
* (hardware backed) and @ref MY_SIGNING_SOFT (software backed). There also exist a simplified * (hardware backed) and @ref MY_SIGNING_SOFT (software backed). There also exist a simplified
* variant (@ref MY_SIGNING_SIMPLE_PASSWD) of the software backend which only require one setting * variant (@ref MY_SIGNING_SIMPLE_PASSWD) of the software backend which only require one setting
* to activate. * to activate.
@@ -54,7 +54,7 @@
* @note If you change the default pin (A3) make sure you use a pin that supports input/output * @note If you change the default pin (A3) make sure you use a pin that supports input/output
* (ex. A6 & A7 on a Pro Mini are input only pins). * (ex. A6 & A7 on a Pro Mini are input only pins).
* *
* To use signng, you need to perform three major steps which are described below. * To use signing, you need to perform three major steps which are described below.
* *
* <b>Firstly</b>, you need to make sure to pick a backend to use. * <b>Firstly</b>, you need to make sure to pick a backend to use.
* @code{.cpp} * @code{.cpp}
@@ -182,7 +182,7 @@
* * If a node does require signing, any unsigned message sent to the node will be rejected. * * If a node does require signing, any unsigned message sent to the node will be rejected.
* This also applies to the gateway. * This also applies to the gateway.
* * Your radio communication quality is expected to work fine (if any NACK happen on a signing * * Your radio communication quality is expected to work fine (if any NACK happen on a signing
* related message, it will fail, and enabeling signing will put maximum strain on your RF link as * related message, it will fail, and enabling signing will put maximum strain on your RF link as
* maximum sized packets are transmitted in the network). See @ref MySigningTroubleshootinggrp. * maximum sized packets are transmitted in the network). See @ref MySigningTroubleshootinggrp.
* * All nodes and gateways in a network maintain a table where the signing preferences of all nodes * * All nodes and gateways in a network maintain a table where the signing preferences of all nodes
* are stored. This is also stored in EEPROM so if a node or gateway reboots, the other nodes does * are stored. This is also stored in EEPROM so if a node or gateway reboots, the other nodes does
@@ -309,7 +309,7 @@
* You have a securely located gateway and a lock somewhere inside your "trusted environment" (e.g. * You have a securely located gateway and a lock somewhere inside your "trusted environment" (e.g.
* inside your house door, the door to your dungeon or similar).<br> * inside your house door, the door to your dungeon or similar).<br>
* You need to make your node require signed messages but you do not necessarily need to make your * You need to make your node require signed messages but you do not necessarily need to make your
* gateway require signed messsages (unless you are concerned that someone might spoof the lock * gateway require signed messages (unless you are concerned that someone might spoof the lock
* status of your lock).<br> * status of your lock).<br>
* Configuration example for the secure lock node:<br> * Configuration example for the secure lock node:<br>
* @code{.cpp} * @code{.cpp}
@@ -433,7 +433,7 @@
* @section MySigninggrpbackground Background and concepts * @section MySigninggrpbackground Background and concepts
* *
* Suppose two participants, Alice and Bob, wants to exchange a message. Alice sends a message to * Suppose two participants, Alice and Bob, wants to exchange a message. Alice sends a message to
* Bob. In MySensors “language” Alice could be a gateway and Bob an actuator (light swich, * Bob. In MySensors “language” Alice could be a gateway and Bob an actuator (light switch,
* electronic lock, etc). But to be generic, we will substitute the term “gateway” with Alice and a * electronic lock, etc). But to be generic, we will substitute the term “gateway” with Alice and a
* “node” with Bob (although the reverse relationship is also supported). * “node” with Bob (although the reverse relationship is also supported).
* *
@@ -608,7 +608,7 @@ typedef struct {
* *
* This function makes sure that the internal states of the signing infrastructure * This function makes sure that the internal states of the signing infrastructure
* is set to a known initial state. * is set to a known initial state.
* \n@b Usage: This fuction should be called before any signing related operations take place. * \n@b Usage: This function should be called before any signing related operations take place.
*/ */
void signerInit(void); void signerInit(void);
@@ -617,10 +617,10 @@ void signerInit(void);
* *
* This function makes sure any signing related presentation info is shared with the other part. * This function makes sure any signing related presentation info is shared with the other part.
* The presentation of the gateways signing preferences is done in @ref signerProcessInternal(). * The presentation of the gateways signing preferences is done in @ref signerProcessInternal().
* \n@b Usage: This function should be called by the presentation routine of the mysensors library. * \n@b Usage: This function should be called by the presentation routine of the MySensors library.
* You only need to call this directly from a sketch to set up a node to node signed message exchange. * You only need to call this directly from a sketch to set up a node to node signed message exchange.
* If you do call this directly from a sketch, and you at some point change your sketch to go from * If you do call this directly from a sketch, and you at some point change your sketch to go from
* requireing signing to not requireing signatures, you need to present this change to the node at least * requiring signing to not requiring signatures, you need to present this change to the node at least
* once, so it can update its requirements tables accordingly. Or it will keep believing that this node * once, so it can update its requirements tables accordingly. Or it will keep believing that this node
* require signatures and attempt to send signed messages to it. * require signatures and attempt to send signed messages to it.
* *
@@ -632,7 +632,7 @@ void signerPresentation(MyMessage &msg, uint8_t destination);
/** /**
* @brief Manages internal signing message handshaking. * @brief Manages internal signing message handshaking.
* *
* This function takes care of signing related message handshaknig such as nonce exchange. * This function takes care of signing related message handshaking such as nonce exchange.
* \n@b Usage: This function should be called by the incoming message handler before any further message * \n@b Usage: This function should be called by the incoming message handler before any further message
* processing is performed on internal messages. This function should only be called for @ref C_INTERNAL class * processing is performed on internal messages. This function should only be called for @ref C_INTERNAL class
* messages. * messages.
@@ -720,7 +720,7 @@ void signerSha256Init(void);
void signerSha256Update(const uint8_t* data, size_t sz); void signerSha256Update(const uint8_t* data, size_t sz);
/** /**
* @brief Finalize an ongong hash calculation session and return the hash. * @brief Finalize an ongoing hash calculation session and return the hash.
* *
* The returned hash size is always 32 bytes. Buffer can be assumed to be valid * The returned hash size is always 32 bytes. Buffer can be assumed to be valid
* until @ref signerSha256Init() is called again. * until @ref signerSha256Init() is called again.
@@ -816,7 +816,7 @@ int signerMemcmp(const void* a, const void* b, size_t sz);
* |!| SGN | NCE | GEN | Failed to generate nonce * |!| SGN | NCE | GEN | Failed to generate nonce
* | | SGN | NCE | NSUP (DROPPED) | Ignored nonce/request for nonce (signing not supported) * | | SGN | NCE | NSUP (DROPPED) | Ignored nonce/request for nonce (signing not supported)
* | | SGN | NCE | FROM='node' | Received nonce from 'node' * | | SGN | NCE | FROM='node' | Received nonce from 'node'
* | | SGN | NCE | 'sender'!='dst' (DROPPED)| Ignoring nonce as it did not come from the desgination of the message to sign * | | SGN | NCE | 'sender'!='dst' (DROPPED)| Ignoring nonce as it did not come from the designation of the message to sign
* |!| SGN | BND | INIT FAIL | Failed to initialize signing backend * |!| SGN | BND | INIT FAIL | Failed to initialize signing backend
* |!| SGN | BND | PWD<8 | Signing password too short * |!| SGN | BND | PWD<8 | Signing password too short
* |!| SGN | BND | PER | Backend not personalized * |!| SGN | BND | PER | Backend not personalized
@@ -851,9 +851,9 @@ int signerMemcmp(const void* a, const void* b, size_t sz);
* *
* @subsection MySigningTroubleshootingSymptomStFail Signing fails and logs show st=fail on transmissions * @subsection MySigningTroubleshootingSymptomStFail Signing fails and logs show st=fail on transmissions
* *
* This is actually not a signing problem, although ofthen st=fail becomes st=ok when signing is disabled. * This is actually not a signing problem, although often st=fail becomes st=ok when signing is disabled.
* This is by far the most commonly reported problem with signing, but the problems is not with signing, * This is by far the most commonly reported problem with signing, but the problems is not with signing,
* it is with radio performence.<br> * it is with radio performance.<br>
* This is a typical log which might look like a signing related issue but isn't: * This is a typical log which might look like a signing related issue but isn't:
* @code{.unparsed} * @code{.unparsed}
* 0;255;3;0;9;Skipping security for command 3 type 16 * 0;255;3;0;9;Skipping security for command 3 type 16
@@ -870,7 +870,7 @@ int signerMemcmp(const void* a, const void* b, size_t sz);
* The reason for this is that when signing is used, the messages transmitted become relatively large.<br> * The reason for this is that when signing is used, the messages transmitted become relatively large.<br>
* Because of this, the message is more sensitive to noise, and the chance for a message to get scrambled * Because of this, the message is more sensitive to noise, and the chance for a message to get scrambled
* increase with the message size. Please refer to the troubleshooting section at the MySensors forum for * increase with the message size. Please refer to the troubleshooting section at the MySensors forum for
* information on how to improve radio performence.<br> * information on how to improve radio performance.<br>
* This is a good place to start: https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help * This is a good place to start: https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help
* *
* @subsection MySigningTroubleshootingSymptomNonce Failed to generate nonce * @subsection MySigningTroubleshootingSymptomNonce Failed to generate nonce
+1 -1
View File
@@ -271,7 +271,7 @@ bool signerAtsha204VerifyMsg(MyMessage &msg)
// Overwrite the first byte in the signature with the signing identifier // Overwrite the first byte in the signature with the signing identifier
_signing_hmac[0] = SIGNING_IDENTIFIER; _signing_hmac[0] = SIGNING_IDENTIFIER;
// Compare the caluclated signature with the provided signature // Compare the calculated signature with the provided signature
if (signerMemcmp(&msg.data[mGetLength(msg)], _signing_hmac, if (signerMemcmp(&msg.data[mGetLength(msg)], _signing_hmac,
min(MAX_PAYLOAD-mGetLength(msg), 32))) { min(MAX_PAYLOAD-mGetLength(msg), 32))) {
return false; return false;
+1 -1
View File
@@ -276,7 +276,7 @@ bool signerAtsha204SoftVerifyMsg(MyMessage &msg)
// Overwrite the first byte in the signature with the signing identifier // Overwrite the first byte in the signature with the signing identifier
_signing_hmac[0] = SIGNING_IDENTIFIER; _signing_hmac[0] = SIGNING_IDENTIFIER;
// Compare the caluclated signature with the provided signature // Compare the calculated signature with the provided signature
if (signerMemcmp(&msg.data[mGetLength(msg)], _signing_hmac, if (signerMemcmp(&msg.data[mGetLength(msg)], _signing_hmac,
MIN(MAX_PAYLOAD-mGetLength(msg), 32))) { MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
return false; return false;
+1 -1
View File
@@ -415,7 +415,7 @@ void transportInitialise(void)
{ {
_transportSM.failureCounter = 0u; // reset failure counter _transportSM.failureCounter = 0u; // reset failure counter
transportLoadRoutingTable(); // load routing table to RAM (if feature enabled) transportLoadRoutingTable(); // load routing table to RAM (if feature enabled)
// intial state // initial state
_transportSM.currentState = NULL; _transportSM.currentState = NULL;
transportSwitchSM(stInit); transportSwitchSM(stInit);
} }
+3 -3
View File
@@ -130,7 +130,7 @@
* *
* Incoming / outgoing messages: * Incoming / outgoing messages:
* *
* See <a href="https://www.mysensors.org/download/serial_api_20">here</a> for more detail on the format and definitons. * See <a href="https://www.mysensors.org/download/serial_api_20">here</a> for more detail on the format and definitions.
* *
* Receiving a message * Receiving a message
* - TSF:MSG:READ,sender-last-destination,s=%%d,c=%%d,t=%%d,pt=%%d,l=%%d,sg=%%d:%%s * - TSF:MSG:READ,sender-last-destination,s=%%d,c=%%d,t=%%d,pt=%%d,l=%%d,sg=%%d:%%s
@@ -192,9 +192,9 @@
#define AUTO (255u) //!< ID 255 is reserved #define AUTO (255u) //!< ID 255 is reserved
#define BROADCAST_ADDRESS (255u) //!< broadcasts are addressed to ID 255 #define BROADCAST_ADDRESS (255u) //!< broadcasts are addressed to ID 255
#define DISTANCE_INVALID (255u) //!< invalid distance when searching for parent #define DISTANCE_INVALID (255u) //!< invalid distance when searching for parent
#define MAX_HOPS (254u) //!< maximal mumber of hops for ping/pong #define MAX_HOPS (254u) //!< maximal number of hops for ping/pong
#define INVALID_HOPS (255u) //!< invalid hops #define INVALID_HOPS (255u) //!< invalid hops
#define MAX_SUBSEQ_MSGS (5u) //!< Maximum number of subsequentially processed messages in FIFO (to prevent transport deadlock if HW issue) #define MAX_SUBSEQ_MSGS (5u) //!< Maximum number of subsequently processed messages in FIFO (to prevent transport deadlock if HW issue)
#define UPLINK_QUALITY_WEIGHT (0.05f) //!< UPLINK_QUALITY_WEIGHT #define UPLINK_QUALITY_WEIGHT (0.05f) //!< UPLINK_QUALITY_WEIGHT
+4 -4
View File
@@ -92,7 +92,7 @@ bool hwInit()
NRF_UART0->POWER = 0; NRF_UART0->POWER = 0;
#endif #endif
#else #else
// Confiure UART // Configure UART
MY_SERIALDEVICE.begin(MY_BAUD_RATE); MY_SERIALDEVICE.begin(MY_BAUD_RATE);
#if defined(MY_GATEWAY_SERIAL) #if defined(MY_GATEWAY_SERIAL)
while (!MY_SERIALDEVICE) { while (!MY_SERIALDEVICE) {
@@ -230,7 +230,7 @@ void hwSleepPrepare(uint32_t ms)
if (ms<512000) { if (ms<512000) {
// prescaler 0, 30.517 μs resolution -> max 512 s sleep // prescaler 0, 30.517 μs resolution -> max 512 s sleep
MY_HW_RTC->PRESCALER = 0; MY_HW_RTC->PRESCALER = 0;
// Set compare register to 1/30.517 µs to garantee event triggering // Set compare register to 1/30.517 µs to guarantee event triggering
// A minimum of 2 ticks must be guaranteed // A minimum of 2 ticks must be guaranteed
// (1000/32768)<<12 == 125 // (1000/32768)<<12 == 125
MY_HW_RTC->CC[0] = max(((ms << 12) / 125), 2); MY_HW_RTC->CC[0] = max(((ms << 12) / 125), 2);
@@ -355,7 +355,7 @@ int8_t hwSleep(uint8_t interrupt1, uint8_t mode1, uint8_t interrupt2,
attachInterrupt(interrupt2, wakeUp2, mode2); attachInterrupt(interrupt2, wakeUp2, mode2);
} }
// Reset attrubute // Reset attribute
_wokeUpByInterrupt = INVALID_INTERRUPT_NUM; _wokeUpByInterrupt = INVALID_INTERRUPT_NUM;
} }
@@ -421,7 +421,7 @@ uint16_t hwCPUVoltage()
// Sampling is done with lowest resolution to minimize the time // Sampling is done with lowest resolution to minimize the time
// 20uS@260uA // 20uS@260uA
// Concurrent ressource: disable // Concurrent resource: disable
uint32_t lpcomp_enabled = NRF_LPCOMP->ENABLE; uint32_t lpcomp_enabled = NRF_LPCOMP->ENABLE;
NRF_LPCOMP->ENABLE = 0; NRF_LPCOMP->ENABLE = 0;
+1 -1
View File
@@ -92,7 +92,7 @@ bool transportAvailable(void);
bool transportSanityCheck(void); bool transportSanityCheck(void);
/** /**
* @brief Receive message from FIFO * @brief Receive message from FIFO
* @return length of recevied message (header + payload) * @return length of received message (header + payload)
*/ */
uint8_t transportReceive(void* data); uint8_t transportReceive(void* data);
/** /**
+1 -1
View File
@@ -416,7 +416,7 @@ int16_t transportGetTxPowerLevel(void)
bool transportSetTxPowerPercent(const uint8_t powerPercent) bool transportSetTxPowerPercent(const uint8_t powerPercent)
{ {
// not possbile // not possible
(void)powerPercent; (void)powerPercent;
return false; return false;
} }