Skip to content

Commit

Permalink
Update debug message table
Browse files Browse the repository at this point in the history
  • Loading branch information
tekka007 committed Oct 29, 2017
1 parent e6cef8b commit 843c1c8
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 91 deletions.
2 changes: 1 addition & 1 deletion core/MySensorsCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* |E| SYS | SUB | Message | Comment
* |-|-----|-----|---------------------------------------------|----------------------------------------------------------------------------
* |!| MCO | BGN | HW ERR | Error HW initialization (e.g. ext. EEPROM)
* | | MCO | BGN | INIT %%s,CP=%%s,LIB=%%s | Core initialization, capabilities (CP), library version (LIB)
* | | MCO | BGN | INIT %%s,CP=%%s,VER=%%s | Core initialization, capabilities (CP), library version (VER)
* | | MCO | BGN | BFR | Callback before()
* | | MCO | BGN | STP | Callback setup()
* | | MCO | BGN | INIT OK,TSP=%%d | Core initialised, transport status (TSP): 0=not initialised, 1=initialised, NA=not available
Expand Down
40 changes: 20 additions & 20 deletions core/MyTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@
* - <b>TSF</b>: messages emitted by transport support functions
* - SUB SYSTEMS:
* - Transport state machine (<b>TSM</b>)
* - TSM:INIT from <b>stInit</b> Initialize transport and radio
* - TSM:FPAR from <b>stParent</b> Find parent
* - TSM:ID from <b>stID</b> Check/request node ID, if dynamic node ID set
* - TSM:UPL from <b>stUplink</b> Verify uplink connection by pinging GW
* - TSM:READY from <b>stReady</b> Transport is ready and fully operational
* - TSM:FAIL from <b>stFailure</b> Failure in transport link or transport HW
* - TSM:<b>INIT</b> from <b>stInit</b> Initialize transport and radio
* - TSM:<b>FPAR</b> from <b>stParent</b> Find parent
* - TSM:<b>ID</b> from <b>stID</b> Check/request node ID, if dynamic node ID set
* - TSM:<b>UPL</b> from <b>stUplink</b> Verify uplink connection by pinging GW
* - TSM:<b>READY</b> from <b>stReady</b> Transport is ready and fully operational
* - TSM:<b>FAIL</b> from <b>stFailure</b> Failure in transport link or transport HW
* - Transport support function (<b>TSF</b>)
* - TSF:CKU from @ref transportCheckUplink(), checks connection to GW
* - TSF:SID from @ref transportAssignNodeID(), assigns node ID
* - TSF:PNG from @ref transportPingNode(), pings a node
* - TSF:WUR from @ref transportWaitUntilReady(), waits until transport is ready
* - TSF:CRT from @ref transportClearRoutingTable(), clears routing table stored in EEPROM
* - TSF:LRT from @ref transportLoadRoutingTable(), loads RAM routing table from EEPROM (only GW/repeaters)
* - TSF:SRT from @ref transportSaveRoutingTable(), saves RAM routing table to EEPROM (only GW/repeaters)
* - TSF:MSG from @ref transportProcessMessage(), processes incoming message
* - TSF:SAN from @ref transportInvokeSanityCheck(), calls transport-specific sanity check
* - TSF:RTE from @ref transportRouteMessage(), sends message
* - TSF:SND from @ref transportSendRoute(), sends message if transport is ready (exposed)
* - TSF:TDI from @ref transportDisable()
* - TSF:TRI from @ref transportReInitialise()
* - TSF:SIR from @ref transportSignalReport()
* - TSF:<b>CKU</b> from @ref transportCheckUplink(), checks connection to GW
* - TSF:<b>SID</b> from @ref transportAssignNodeID(), assigns node ID
* - TSF:<b>PNG</b> from @ref transportPingNode(), pings a node
* - TSF:<b>WUR</b> from @ref transportWaitUntilReady(), waits until transport is ready
* - TSF:<b>CRT</b> from @ref transportClearRoutingTable(), clears routing table stored in EEPROM
* - TSF:<b>LRT</b> from @ref transportLoadRoutingTable(), loads RAM routing table from EEPROM (only GW/repeaters)
* - TSF:<b>SRT</b> from @ref transportSaveRoutingTable(), saves RAM routing table to EEPROM (only GW/repeaters)
* - TSF:<b>MSG</b> from @ref transportProcessMessage(), processes incoming message
* - TSF:<b>SAN</b> from @ref transportInvokeSanityCheck(), calls transport-specific sanity check
* - TSF:<b>RTE</b> from @ref transportRouteMessage(), sends message
* - TSF:<b>SND</b> from @ref transportSendRoute(), sends message if transport is ready (exposed)
* - TSF:<b>TDI</b> from @ref transportDisable()
* - TSF:<b>TRI</b> from @ref transportReInitialise()
* - TSF:<b>SIR</b> from @ref transportSignalReport()
*
* Transport debug log messages:
*
Expand Down
42 changes: 21 additions & 21 deletions drivers/RF24/RF24.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
Expand Down Expand Up @@ -34,26 +34,26 @@
* RF24 driver-related log messages, format: [!]SYSTEM:[SUB SYSTEM:]MESSAGE
* - [!] Exclamation mark is prepended in case of error
*
* |E| SYS | SUB | Message | Comment
* |-|-------|-------|-----------------------------------|---------------------------------------------------------------------
* | | RF24 | INIT | | Initialise RF24 radio
* | | RF24 | INIT | PIN,CE=%d,CS=%d | Pin configuration: chip enable (CE), chip select (CS)
* |!| RF24 | INIT | SANCHK FAIL | Sanity check failed, check wiring or replace module
* | | RF24 | SPP | PCT=%d,TX LEVEL=%d | Set TX level, input TX percent (PCT)
* | | RF24 | RBR | REG=%d,VAL=%d | Read register (REG), value=(VAL)
* | | RF24 | WBR | REG=%d,VAL=%d | Write register (REG), value=(VAL)
* | | RF24 | FRX | | Flush RX buffer
* | | RF24 | FTX | | Flush TX buffer
* | | RF24 | OWP | RCPT=%d | Open writing pipe, recipient=(RCPT)
* | | RF24 | STL | | Start listening
* | | RF24 | SPL | | Stop listening
* | | RF24 | SLP | | Set radio to sleep
* | | RF24 | SBY | | Set radio to standby
* | | RF24 | TXM | TO=%d,LEN=%d | Transmit message to=(TO), length=(LEN)
* |!| RF24 | TXM | MAX_RT | Max TX retries, no ACK received
* |!| RF24 | GDP | PYL INV | Invalid payload size
* | | RF24 | RXM | LEN=%d | Read message, length=(LEN)
* | | RF24 | STX | LEVEL=%d | Set TX level, level=(LEVEL)
* |E| SYS | SUB | Message | Comment
* |-|------|------|--------------------|---------------------------------------------------------------------
* | | RF24 | INIT | | Initialise RF24 radio
* | | RF24 | INIT | PIN,CE=%d,CS=%d | Pin configuration: chip enable (CE), chip select (CS)
* |!| RF24 | INIT | SANCHK FAIL | Sanity check failed, check wiring or replace module
* | | RF24 | SPP | PCT=%d,TX LEVEL=%d | Set TX level, input TX percent (PCT)
* | | RF24 | RBR | REG=%d,VAL=%d | Read register (REG), value=(VAL)
* | | RF24 | WBR | REG=%d,VAL=%d | Write register (REG), value=(VAL)
* | | RF24 | FRX | | Flush RX buffer
* | | RF24 | FTX | | Flush TX buffer
* | | RF24 | OWP | RCPT=%d | Open writing pipe, recipient=(RCPT)
* | | RF24 | STL | | Start listening
* | | RF24 | SPL | | Stop listening
* | | RF24 | SLP | | Set radio to sleep
* | | RF24 | SBY | | Set radio to standby
* | | RF24 | TXM | TO=%d,LEN=%d | Transmit message to=(TO), length=(LEN)
* |!| RF24 | TXM | MAX_RT | Max TX retries, no ACK received
* |!| RF24 | GDP | PYL INV | Invalid payload size
* | | RF24 | RXM | LEN=%d | Read message, length=(LEN)
* | | RF24 | STX | LEVEL=%d | Set TX level, level=(LEVEL)
*
*/

Expand Down
42 changes: 14 additions & 28 deletions drivers/RFM69/new/RFM69_new.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
* RFM69 driver-related log messages, format: [!]SYSTEM:[SUB SYSTEM:]MESSAGE
* - [!] Exclamation mark is prepended in case of error
*
* |E| SYS | SUB | Message | Comment
* |-|-------|-------|-----------------------------------|-----------------------------------------------------------------------------------
* | | RFM69 | INIT | | Initialise RFM69 radio
* | | RFM69 | INIT | PIN,CS=%d,IQP=%d,IQN=%d[,RST=%d] | Pin configuration: chip select (CS), IRQ pin (IQP), IRQ number (IQN), Reset (RST)
* |!| RFM69 | INIT | SANCHK FAIL | Sanity check failed, check wiring or replace module
* | | RFM69 | PTX | NO ADJ | TX power level, no adjustment
* | | RFM69 | PTX | LEVEL=%d dbM | TX power level, set to (LEVEL) dBm
* | | RFM69 | SLEEP | | Radio in sleep mode
* | | RFM69 | SAC | SEND ACK,TO=%d,RSSI=%d | ACK sent to (TO), RSSI of incoming message (RSSI)
* | | RFM69 | ATC | ADJ TXL,cR=%d,tR=%d,TXL=%d | Adjust TX power level (TXL) to match set RSSI (sR), current RSSI (cR)
* | | RFM69 | SWR | SEND,TO=%d,RETRY=%d | Send to (TO), retry if no ACK received (RETRY)
* | | RFM69 | SWR | ACK,FROM=%d,SEQ=%d,RSSI=%d | ACK received from (FROM), sequence nr (SEQ), ACK RSSI (RSSI)
* |!| RFM69 | SWR | NACK | Message sent, no ACK received
* | | RFM69 | SPP | PCT=%d,TX LEVEL=%d | Set TX level, input TX percent (PCT)
* |E| SYS | SUB | Message | Comment
* |-|-------|-------|----------------------------------|-----------------------------------------------------------------------------------
* | | RFM69 | INIT | | Initialise RFM69 radio
* | | RFM69 | INIT | PIN,CS=%d,IQP=%d,IQN=%d[,RST=%d] | Pin configuration: chip select (CS), IRQ pin (IQP), IRQ number (IQN), Reset (RST)
* |!| RFM69 | INIT | SANCHK FAIL | Sanity check failed, check wiring or replace module
* | | RFM69 | PTX | NO ADJ | TX power level, no adjustment
* | | RFM69 | PTX | LEVEL=%d dbM | TX power level, set to (LEVEL) dBm
* | | RFM69 | SLEEP | | Radio in sleep mode
* | | RFM69 | SAC | SEND ACK,TO=%d,RSSI=%d | ACK sent to (TO), RSSI of incoming message (RSSI)
* | | RFM69 | ATC | ADJ TXL,cR=%d,tR=%d,TXL=%d | Adjust TX power level (TXL) to match set RSSI (sR), current RSSI (cR)
* | | RFM69 | SWR | SEND,TO=%d,RETRY=%d | Send to (TO), retry if no ACK received (RETRY)
* | | RFM69 | SWR | ACK,FROM=%d,SEQ=%d,RSSI=%d | ACK received from (FROM), sequence nr (SEQ), ACK RSSI (RSSI)
* |!| RFM69 | SWR | NACK | Message sent, no ACK received
* | | RFM69 | SPP | PCT=%d,TX LEVEL=%d | Set TX level, input TX percent (PCT)
*
* @brief API declaration for RFM69
*
Expand Down Expand Up @@ -211,19 +211,6 @@ extern HardwareSPI SPI; //!< SPI
#define RFM69_868MHZ (868000000ul) //!< RFM69_868MHZ
#define RFM69_915MHZ (915000000ul) //!< RFM69_915MHZ

/*
#if !defined(RFM69_FREQ_MSB)
#define RFM69_FREQ_MSB (uint8_t)(MY_RFM69_FREQUENCY == RFM69_315MHZ ? RFM69_FRFMSB_315 : (MY_RFM69_FREQUENCY == RFM69_433MHZ ? RFM69_FRFMSB_433_92 : (MY_RFM69_FREQUENCY == RFM69_868MHZ ? RFM69_FRFMSB_868 : RFM69_FRFMSB_915))) //!< FREQ_MSB
#endif
#if !defined(RFM69_FREQ_MID)
#define RFM69_FREQ_MID (uint8_t)(MY_RFM69_FREQUENCY == RFM69_315MHZ ? RFM69_FRFMID_315 : (MY_RFM69_FREQUENCY == RFM69_433MHZ ? RFM69_FRFMID_433_92 : (MY_RFM69_FREQUENCY == RFM69_868MHZ ? RFM69_FRFMID_868 : RFM69_FRFMID_915))) //!< FREQ_MID
#endif
#if !defined(RFM69_FREQ_LSB)
#define RFM69_FREQ_LSB (uint8_t)(MY_RFM69_FREQUENCY == RFM69_315MHZ ? RFM69_FRFLSB_315 : (MY_RFM69_FREQUENCY == RFM69_433MHZ ? RFM69_FRFLSB_433_92 : (MY_RFM69_FREQUENCY == RFM69_868MHZ ? RFM69_FRFLSB_868 : RFM69_FRFLSB_915))) //!< FREQ_LSB
#endif
*/
#define RFM69_COURSE_TEMP_COEF (-90) //!< puts the temperature reading in the ballpark, user can fine tune the returned value
#define RFM69_FXOSC (32*1000000ul) //!< OSC freq, 32MHz
#define RFM69_FSTEP (RFM69_FXOSC / 524288.0f) //!< FXOSC / 2^19 = 32MHz / 2^19 (p13 in datasheet)
Expand All @@ -233,7 +220,6 @@ extern HardwareSPI SPI; //!< SPI
#define RFM69_LISTEN_IDLE_US MY_RFM69_DEFAULT_LISTEN_IDLE_US //!< RFM69_LISTEN_IDLE_US
#endif


/**
* @brief Radio modes
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/RFM95/RFM95.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* Based on Mike McCauley's RFM95 library, Copyright (C) 2014 Mike McCauley <mikem@airspayce.com>
* Radiohead http://www.airspayce.com/mikem/arduino/RadioHead/index.html
* RFM95 driver refactored and optimized for MySensors, Copyright (C) 2016 Olivier Mauti <olivier@mysensors.org>
* RFM95 driver refactored and optimized for MySensors, Copyright (C) 2017 Olivier Mauti <olivier@mysensors.org>
*
*/

Expand Down
40 changes: 20 additions & 20 deletions drivers/RFM95/RFM95.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
Expand Down Expand Up @@ -40,32 +40,32 @@
* RFM95 driver-related log messages, format: [!]SYSTEM:[SUB SYSTEM:]MESSAGE
* - [!] Exclamation mark is prepended in case of error
*
* |E| SYS | SUB | Message | Comment
* |-|-------|-------|-----------------------------------|-----------------------------------------------------------------------------------
* | | RFM95 | INIT | | Initialise RFM95 radio
* | | RFM95 | INIT | PIN,CS=%d,IQP=%d,IQN=%d[,RST=%d] | Pin configuration: chip select (CS), IRQ pin (IQP), IRQ number (IQN), Reset (RST)
* |!| RFM95 | INIT | SANCHK FAIL | Sanity check failed, check wiring or replace module
* | | RFM95 | RCV | SEND ACK | ACK request received, sending ACK back
* | | RFM95 | PTC | LEVEL=%d | Set TX power level
* | | RFM95 | SAC | SEND ACK,TO=%d,RSSI=%d,SNR=%d | Send ACK to node (TO), RSSI of received message (RSSI), SNR of message (SNR)
* | | RFM95 | ATC | ADJ TXL,cR=%d,tR=%d,TXL=%d | Adjust TX level, current RSSI (cR), target RSSI (tR), TX level (TXL)
* | | RFM95 | SWR | SEND,TO=%d,RETRY=%d | Send message to (TO), NACK retry counter (RETRY)
* | | RFM95 | SWR | ACK FROM=%d,SEQ=%d,RSSI=%d,SNR=%d | ACK received from node (FROM), seq ID (SEQ), (RSSI), (SNR)
* |!| RFM95 | SWR | NACK | No ACK received
* | | RFM95 | SPP | PCT=%d,TX LEVEL=%d | Set TX level, input TX percent (PCT)
* |E| SYS | SUB | Message | Comment
* |-|-------|------|------------------------------------|-----------------------------------------------------------------------------------
* | | RFM95 | INIT | | Initialise RFM95 radio
* | | RFM95 | INIT | PIN,CS=%d,IQP=%d,IQN=%d[,RST=%d] | Pin configuration: chip select (CS), IRQ pin (IQP), IRQ number (IQN), Reset (RST)
* |!| RFM95 | INIT | SANCHK FAIL | Sanity check failed, check wiring or replace module
* | | RFM95 | RCV | SEND ACK | ACK request received, sending ACK back
* | | RFM95 | PTC | LEVEL=%d | Set TX power level
* | | RFM95 | SAC | SEND ACK,TO=%d,RSSI=%d,SNR=%d | Send ACK to node (TO), RSSI of received message (RSSI), SNR of message (SNR)
* | | RFM95 | ATC | ADJ TXL,cR=%d,tR=%d,TXL=%d | Adjust TX level, current RSSI (cR), target RSSI (tR), TX level (TXL)
* | | RFM95 | SWR | SEND,TO=%d,RETRY=%d | Send message to (TO), NACK retry counter (RETRY)
* | | RFM95 | SWR | ACK FROM=%d,SEQ=%d,RSSI=%d,SNR=%d | ACK received from node (FROM), seq ID (SEQ), (RSSI), (SNR)
* |!| RFM95 | SWR | NACK | No ACK received
* | | RFM95 | SPP | PCT=%d,TX LEVEL=%d | Set TX level percent (PCT), TX level (LEVEL)
*
* RFM95 modem configuration
*
* BW = Bandwidth in kHz
* CR = Error correction code
* SF = Spreading factor, chips / symbol
*
* | CONFIG | REG_1D | REG_1E | REG_26 | BW | CR | SF | Comment | air-time (15 bytes)
* |------------------|--------|--------|--------|-------|-----|------|------------------------------------------------
* | BW125CR45SF128 | 0x72 | 0x74 | 0x04 | 125 | 4/5 | 128 | Default, medium range | 50ms
* | BW500CR45SF128 | 0x92 | 0x74 | 0x04 | 500 | 4/5 | 128 | Fast, short range | 15ms
* | BW31_25CR48SF512 | 0x48 | 0x94 | 0x04 | 31.25 | 4/8 | 512 | Slow, long range | 900ms
* | BW125CR48SF4096 | 0x78 | 0xC4 | 0x0C | 125 | 4/8 | 4096 | Slow, long range | 1500ms
* | CONFIG | REG_1D | REG_1E | REG_26 | BW | CR | SF | Comment | air-time (15 bytes)
* |------------------|--------|--------|--------|-------|-----|------|-----------------------|------------------------
* | BW125CR45SF128 | 0x72 | 0x74 | 0x04 | 125 | 4/5 | 128 | Default, medium range | 50ms
* | BW500CR45SF128 | 0x92 | 0x74 | 0x04 | 500 | 4/5 | 128 | Fast, short range | 15ms
* | BW31_25CR48SF512 | 0x48 | 0x94 | 0x04 | 31.25 | 4/8 | 512 | Slow, long range | 900ms
* | BW125CR48SF4096 | 0x78 | 0xC4 | 0x0C | 125 | 4/8 | 4096 | Slow, long range | 1500ms
*
* See here for air-time calculation: https://docs.google.com/spreadsheets/d/1voGAtQAjC1qBmaVuP1ApNKs1ekgUjavHuVQIXyYSvNc
*
Expand Down

0 comments on commit 843c1c8

Please sign in to comment.