|
nrf_to_nrf - NRF52 Radio Driver v1.2.2
TMRh20 2023 - OSI Layer 2 radio driver using RF24 API
|
Driver for the 2.4GHz radio in nRF52x and nRF54x chips, using the RF24 API. More...
#include <nrf_to_nrf.h>
Public Member Functions | |
Primary public interface | |
These are the main methods you need to operate the chip | |
| nrf_to_nrf () | |
| bool | begin () |
| bool | available () |
| bool | available (uint8_t *pipe_num) |
| void | read (void *buf, uint8_t len) |
| bool | write (void *buf, uint8_t len, bool multicast=false, bool doEncryption=true) |
| void | startListening (bool resetAddresses=true) |
| void | stopListening (bool setWritingPipe=true, bool resetAddresses=true) |
| void | stopListening (const uint8_t *txAddress, bool setWritingPipe=true, bool resetAddresses=true) |
| bool | enableRxInterrupt (uint8_t depth=3) |
| void | disableRxInterrupt () |
| void | handleInterrupt () |
| void | openReadingPipe (uint8_t child, const uint8_t *address) |
| void | openWritingPipe (const uint8_t *address) |
| bool | isChipConnected () |
Advanced Operation | |
Methods you can use to drive the chip in more advanced ways | |
| uint8_t | radioData [ACTUAL_MAX_PAYLOAD_SIZE+2] |
| bool | failureDetected |
| uint16_t | interframeSpacing |
| bool | writeFast (void *buf, uint8_t len, bool multicast=0) |
| bool | startWrite (void *buf, uint8_t len, bool multicast, bool doEncryption=true) |
| bool | writeAckPayload (uint8_t pipe, void *buf, uint8_t len) |
| void | enableAckPayload () |
| void | disableAckPayload () |
| void | enableDynamicAck () |
| uint8_t | getDynamicPayloadSize () |
| bool | isValid () |
| void | setChannel (uint8_t channel, bool map=0) |
| uint8_t | getChannel () |
| bool | setDataRate (uint8_t speed) |
| void | setPALevel (uint8_t level, bool lnaEnable=true) |
| uint8_t | getPALevel () |
| void | setAutoAck (bool enable) |
| void | setAutoAck (uint8_t pipe, bool enable) |
| void | enableDynamicPayloads (uint8_t payloadSize=DEFAULT_MAX_PAYLOAD_SIZE) |
| void | disableDynamicPayloads () |
| void | setPayloadSize (uint8_t size) |
| uint8_t | getPayloadSize () |
| void | setCRCLength (nrf_crclength_e length) |
| nrf_crclength_e | getCRCLength () |
| void | disableCRC () |
| void | setRetries (uint8_t retryVar, uint8_t attempts) |
| void | openReadingPipe (uint8_t child, uint64_t address) |
| void | openWritingPipe (uint64_t address) |
| void | setAddressWidth (uint8_t a_width) |
| void | printDetails () |
| void | powerUp () |
| void | powerDown () |
| bool | txStandBy () |
| bool | txStandBy (uint32_t timeout, bool startTx=0) |
| bool | testCarrier (uint8_t RSSI=65) |
| bool | testRPD (uint8_t RSSI=65) |
| uint8_t | getRSSI () |
| uint8_t | getARC () |
| uint8_t | flush_rx () |
| uint8_t | flush_tx () |
Encryption | |
Methods you can use to enable encryption & authentication | |
| uint8_t | outBuffer [MAX_PACKET_SIZE+CCM_MIC_SIZE+CCM_START_SIZE] |
| bool | enableEncryption |
| uint32_t | addrConv32 (uint32_t addr) |
| uint8_t | encrypt (void *bufferIn, uint8_t size) |
| uint8_t | decrypt (void *bufferIn, uint8_t size) |
| void | setKey (uint8_t key[CCM_KEY_SIZE]) |
| void | setCounter (uint64_t counter) |
| void | setIV (uint8_t IV[CCM_IV_SIZE]) |
Driver for the 2.4GHz radio in nRF52x and nRF54x chips, using the RF24 API.
Definition at line 141 of file nrf_to_nrf.h.
| nrf_to_nrf::nrf_to_nrf | ( | ) |
| bool nrf_to_nrf::begin | ( | ) |
Begin operation of the radio
Call this in setup(), before calling any other methods. It starts the high and low frequency clocks and configures the radio with these defaults: channel 76 (2476 MHz), 1 Mbps, 16-bit CRC, maximum PA level, 5-byte addresses, 32-byte static payloads, auto-ack on all pipes, and 5 retries with a delay of 5. It also enables the RX interrupt with enableRxInterrupt().
Definition at line 194 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::available | ( | ) |
Check whether there is a payload available to be read
With the RX interrupt enabled (the default), this checks the RX queue filled by the interrupt. In polling mode (disableRxInterrupt()), this checks the radio itself, so call it often: only one received payload is held until it is read.
After write() receives an ACK payload, this returns true for that payload until it is read.
Definition at line 289 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::available | ( | uint8_t * | pipe_num | ) |
Check whether there is a payload available to be read, and which pipe received it
| [out] | pipe_num | Which pipe received the payload. For an ACK payload received by write(), this is pipe 0. uint8_t pipeNum;
if (radio.available(&pipeNum)) {
radio.read(&data, sizeof(data));
Serial.print("Received data on pipe ");
Serial.println(pipeNum);
}
|
Definition at line 443 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::read | ( | void * | buf, |
| uint8_t | len ) |
Read the next available payload
Call available() first. Each call removes one payload, however many bytes are read. This is different from RF24, where a payload stays in the RX FIFO until all of it has been read.
| buf | Pointer to a buffer where the data should be written |
| len | Number of bytes to copy into buf. Use getDynamicPayloadSize() to get the payload's length. Bytes past the end of the payload are not meaningful. |
Definition at line 634 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::write | ( | void * | buf, |
| uint8_t | len, | ||
| bool | multicast = false, | ||
| bool | doEncryption = true ) |
Transmit a payload to the address set with openWritingPipe()
Call stopListening() first. This blocks until an ACK is received or all retries have been used (see setRetries()). If the ACK carries an ACK payload, read it with available() and read() afterwards.
| buf | Pointer to the data to be sent |
| len | Number of bytes to be sent. With static payloads, a full getPayloadSize() packet is always sent, and the bytes after len are not zeroed. With dynamic payloads, len can be up to the size passed to enableDynamicPayloads(). With encryption, 12 more bytes (IV, counter and MIC) are added, and they must fit too. |
| multicast | true sends the payload once without waiting for an ACK. enableDynamicAck() is not needed. The receiver still sends an ACK if auto-ack is enabled on its pipe. |
| doEncryption | false sends this payload unencrypted when encryption is enabled |
multicast is true or auto-ack is disabled on pipe 0.Definition at line 649 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::startListening | ( | bool | resetAddresses = true | ) |
Start listening on the pipes opened for reading
Open reading pipe 1 using address 0xCCCECCCECC
| resetAddresses | Used internally; leave as the default |
Definition at line 1021 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::stopListening | ( | bool | setWritingPipe = true, |
| bool | resetAddresses = true ) |
Stop listening for incoming payloads, and switch to transmit mode
Do this before calling write(). This restores the TX address set by openWritingPipe(), and payloads already received can still be read.
| setWritingPipe | Used internally; leave as the default |
| resetAddresses | Used internally; leave as the default |
Definition at line 1070 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::stopListening | ( | const uint8_t * | txAddress, |
| bool | setWritingPipe = true, | ||
| bool | resetAddresses = true ) |
Same as stopListening(), but also sets the TX address, like calling openWritingPipe() afterwards
| txAddress | The new TX address |
| setWritingPipe | Used internally; leave as the default |
| resetAddresses | Used internally; leave as the default |
Definition at line 1123 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::enableRxInterrupt | ( | uint8_t | depth = 3 | ) |
Receive packets from the radio interrupt, so a slow loop() doesn't leave the radio idle. available() and read() are used as normal. Don't use BLE in the same sketch.
This is called automatically on begin(), so if you want to disable it, call disableRxInterrupt() after the radio and/or network/mesh has been configured.
| depth | The number of packets to queue, from 1 to 254. Uses (depth + 1) * (payload size + 2) bytes of RAM, plus depth * (payload size + 2) for the ACK payload queue if enableAckPayload() is called. |
Definition at line 297 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::disableRxInterrupt | ( | ) |
Disable the RX interrupt and free the RX queue and the ACK payload queue
Payloads still in the RX queue are discarded. available() then checks the radio itself, so call it often: only one received payload is held until it is read. The newest ACK payload still queued is kept.
Definition at line 326 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::handleInterrupt | ( | ) |
Called by the library's radio interrupt handler
Definition at line 403 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::openReadingPipe | ( | uint8_t | child, |
| const uint8_t * | address ) |
Open a pipe for reading
Up to 8 pipes (0-7) can be open for reading at once. Open all the required reading pipes, then call startListening().
| child | Which pipe to open, 0-7 |
| address | The address, using the number of bytes set with setAddressWidth() |
Definition at line 1300 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::openWritingPipe | ( | const uint8_t * | address | ) |
Open a pipe for writing
Only one writing pipe can be open at a time. This sets the address that write() transmits to. Call stopListening() first.
| address | The address to transmit to, using the number of bytes set with setAddressWidth(). Coordinate it with the receiving nodes (the pipe numbers don't need to match). |
Definition at line 1339 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::isChipConnected | ( | ) |
Check that the radio responds, the same as isValid()
The radio is part of the chip, so unlike RF24 this doesn't check an SPI connection.
Definition at line 1395 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::writeFast | ( | void * | buf, |
| uint8_t | len, | ||
| bool | multicast = 0 ) |
Same as write(), so it blocks until an ACK is received or all retries have been used
Provided for compatibility with RF24, where writeFast() queues up to 3 payloads in the TX FIFO.
| buf | Pointer to the data to be sent |
| len | Number of bytes to be sent |
| multicast | true sends the payload once without waiting for an ACK |
Definition at line 1376 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::startWrite | ( | void * | buf, |
| uint8_t | len, | ||
| bool | multicast, | ||
| bool | doEncryption = true ) |
Start transmitting a payload without waiting for it to finish
Unlike write(), there are no retries and no ACK is received.
| buf | Pointer to the data to be sent |
| len | Number of bytes to be sent |
| multicast | Not used, since no ACK is waited for either way |
| doEncryption | false sends this payload unencrypted when encryption is enabled |
Definition at line 840 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::writeAckPayload | ( | uint8_t | pipe, |
| void * | buf, | ||
| uint8_t | len ) |
Load a payload to send back in the ACK for the next packet received on pipe
With the RX interrupt enabled (the default), payloads are queued like the NRF24 TX FIFO. Up to the enableRxInterrupt() depth can be queued, so one can be loaded for each packet the RX queue holds. Each packet received takes the oldest payload queued for its pipe and sends it once; a retransmitted packet gets the same payload again. If none is queued for that pipe, a plain ACK is sent. Payloads can be at most getPayloadSize() bytes, including encryption overhead. Call enableAckPayload() first; it allocates the queue.
In polling mode (disableRxInterrupt()), one payload is stored. It is sent with the ACK for the next packet on pipe, re-sent if that packet is retransmitted, and discarded when the next new packet arrives.
This can be called before and after startListening().
| pipe | Which pipe (0-7) will get this response |
| buf | Pointer to the data to send |
| len | Length of the data to send |
Definition at line 925 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::enableAckPayload | ( | ) |
Enable custom payloads in the acknowledgement packets
ACK payloads are a handy way to return data to senders without changing the radio modes on both nodes. Call this on both the transmitting and receiving nodes.
With the RX interrupt, this also allocates the ACK payload queue used by writeAckPayload(): depth * (payload size + 2) bytes of RAM, where depth is the enableRxInterrupt() depth.
Definition at line 996 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::disableAckPayload | ( | ) |
Disable custom payloads in the acknowledgement packets
This also frees the ACK payload queue, discarding any payloads loaded with writeAckPayload().
Definition at line 1009 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::enableDynamicAck | ( | ) |
Provided for compatibility with RF24. It isn't needed: the multicast parameter of write() works without it.
Definition at line 1005 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::getDynamicPayloadSize | ( | ) |
Get the length of the next available payload
Definition at line 1131 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::isValid | ( | ) |
Check that the radio responds, by writing and reading back the channel register
Definition at line 1143 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setChannel | ( | uint8_t | channel, |
| bool | map = 0 ) |
Set the RF channel
The frequency used is 2400 MHz + channel, or 2360 MHz + channel if map is 1. With map set to 0, channels match the nRF24 channels. The default is channel 76 (2476 MHz).
| channel | Which RF channel to communicate on, 0-100 |
| map | 0 for 2400-2500 MHz (default), 1 for 2360-2460 MHz |
Definition at line 1157 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::getChannel | ( | ) |
Get the RF channel
map setting is not included. Definition at line 1161 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::setDataRate | ( | uint8_t | speed | ) |
Set the transmission data rate. Both nodes must use the same rate.
| speed | Specify one of the following values (as defined by nrf_datarate_e):
|
Definition at line 1399 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setPALevel | ( | uint8_t | level, |
| bool | lnaEnable = true ) |
Set the Power Amplifier (PA) level
| level | One of the values defined by nrf_pa_dbm_e. The output power depends on the chip:
| |||||||||||||||
| lnaEnable | Not used, since there is no LNA |
Definition at line 1430 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::getPALevel | ( | ) |
Get the Power Amplifier (PA) level
Definition at line 1452 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setAutoAck | ( | bool | enable | ) |
Enable or disable the auto-acknowledgement feature for all pipes
This is enabled by default. Auto-acknowledgement responds to every received payload with an ACK packet. To attach an ACK payload to an ACK packet, use writeAckPayload().
If this is disabled on a transmitting node, write() always reports that the payload was received, even if it wasn't. This setting needs to match on the transmitting and receiving nodes.
| enable | Whether to enable (true) or disable (false) auto-acknowledgement for all pipes |
Definition at line 1165 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setAutoAck | ( | uint8_t | pipe, |
| bool | enable ) |
Enable or disable the auto-acknowledgement feature for a specific pipe
This is enabled by default for all pipes. Pipe 0 is used for transmitting: if this is disabled on pipe 0 of a transmitting node, write() always reports that the payload was received, even if it wasn't. Enable this on any pipe listening to a transmitter that uses auto-ack.
| pipe | Which pipe to configure, 0-7 |
| enable | Whether to enable (true) or disable (false) auto-acknowledgement for pipe |
Definition at line 1178 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::enableDynamicPayloads | ( | uint8_t | payloadSize = DEFAULT_MAX_PAYLOAD_SIZE | ) |
Enable dynamically-sized payloads on all pipes
Payloads are sent at the length passed to write(), instead of always using the static payload size.
Once this function has been called, users need to call disableDynamicPayloads if they want to call it again, else it has no effect.
| payloadSize | Set the maximum payload size. Up to 254 with DPL enabled |
Definition at line 1189 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::disableDynamicPayloads | ( | ) |
Disable dynamically-sized payloads on all pipes, and use the static payload size
Unlike RF24, this doesn't disable ACK payloads.
Definition at line 1212 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setPayloadSize | ( | uint8_t | size | ) |
Set the static payload size
Every packet is sent at this size, however many bytes were passed to write(). If this is never called, the size is 32 bytes. This also disables dynamic payloads.
NRF52840 will handle up to 255 byte payloads with CRC & DPL disabled, 254 with 16-bit CRC and DPL NRF54L15 will do the same
| size | The number of bytes in each payload |
Definition at line 1228 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::getPayloadSize | ( | ) |
Get the payload size
Definition at line 1264 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setCRCLength | ( | nrf_crclength_e | length | ) |
Set the CRCLength (in bits)
Both nodes must use the same setting. Disabling CRC is allowed with auto-ack enabled, but then corrupt packets aren't detected, and retransmitted packets aren't recognized as duplicates.
| length | Specify one of the values (as defined by nrf_crclength_e)
|
Definition at line 1483 of file nrf_to_nrf.cpp.
| nrf_crclength_e nrf_to_nrf::getCRCLength | ( | ) |
Get the CRCLength (in bits)
Definition at line 1513 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::disableCRC | ( | ) |
Disable CRC validation, the same as setCRCLength(NRF_CRC_DISABLED)
Definition at line 1509 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setRetries | ( | uint8_t | retryVar, |
| uint8_t | attempts ) |
Set the number of retries and the delay between them when transmitting with write()
After each attempt, write() waits for an ACK for a time that depends on the data rate and payload type, then waits for the delay before retrying.
| retryVar | How long to wait between retries, in multiples of about 258 us. The default is 5. |
| attempts | How many retries before giving up, so write() makes up to attempts + 1 attempts. The default is 5. Use 0 to disable retries. |
Definition at line 1271 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::openReadingPipe | ( | uint8_t | child, |
| uint64_t | address ) |
Open a pipe for reading, using a 40-bit address
Kept for compatibility with older code. See openReadingPipe(uint8_t, const uint8_t*), which this works like. Pipes 1-7 share every byte except the least significant one, e.g.
| child | Which pipe to open, 0-7 |
| address | The 40-bit address of the pipe to open |
Definition at line 1280 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::openWritingPipe | ( | uint64_t | address | ) |
Open a pipe for writing, using a 40-bit address
Kept for compatibility with older code. See openWritingPipe(const uint8_t*), which this works like.
| address | The 40-bit address of the pipe to open |
Definition at line 1290 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setAddressWidth | ( | uint8_t | a_width | ) |
Set the address width from 3 to 5 bytes (24, 32 or 40 bit)
Both nodes must use the same width. The default is 5 bytes.
| a_width | The address width (in bytes) to use; this can be 3, 4 or 5 |
Definition at line 1650 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::printDetails | ( | ) |
Print a block of debugging information about the radio configuration to Serial
Definition at line 1658 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::powerUp | ( | ) |
When powering up from powerdown ALL radio settings will need to be re-applied
Enables the Radio & HF Clock
If encryption is enabled, also enables RNG & CCM peripherals
Definition at line 1594 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::powerDown | ( | ) |
When called ALL radio settings will be reverted to default
Disables the Radio & HF Clock
If encryption is enabled, also disables RNG & CCM peripherals
Definition at line 1627 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::txStandBy | ( | ) |
Get the result of the last write
Provided for compatibility with RF24. write() and writeFast() already wait until the transmission is done, so this doesn't wait or change the radio state.
Definition at line 1362 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::txStandBy | ( | uint32_t | timeout, |
| bool | startTx = 0 ) |
Same as txStandBy()
| timeout | Not used |
| startTx | Not used |
Definition at line 1369 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::testCarrier | ( | uint8_t | RSSI = 65 | ) |
Test whether a signal stronger than -RSSI dBm is present on the channel
Useful to check for interference on the current channel and for channel hopping strategies. Unlike RF24, this samples the signal strength now, instead of reporting the last listening period. The radio must be listening. Always returns false on the nRF54L15.
| RSSI | The threshold in -dBm. The default of 65 means -65 dBm. |
RSSI dBm Definition at line 1531 of file nrf_to_nrf.cpp.
| bool nrf_to_nrf::testRPD | ( | uint8_t | RSSI = 65 | ) |
Same as testCarrier()
| RSSI | The threshold in -dBm. The default of 65 means -65 dBm, close to the nRF24L01+ RPD threshold of -64 dBm. |
RSSI dBm Definition at line 1549 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::getRSSI | ( | ) |
A new function specific to the NRF52x devices, not available on NRF24
The radio must be listening. Always returns 0 on the nRF54L15.
Definition at line 1556 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::getARC | ( | ) |
Get the number of retries used by the last write()
Allows roughly estimating signal quality.
attempts value passed to setRetries() Definition at line 1476 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::flush_rx | ( | ) |
Discard all received payloads that haven't been read, including an ACK payload received by write()
Definition at line 1572 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::flush_tx | ( | ) |
Discard any ACK payloads loaded with writeAckPayload()
Unlike RF24, stopListening() doesn't call this, and there are no regular payloads to discard, since write() sends its payload immediately.
Definition at line 1582 of file nrf_to_nrf.cpp.
| uint32_t nrf_to_nrf::addrConv32 | ( | uint32_t | addr | ) |
Used internally to convert addresses
Definition at line 139 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::encrypt | ( | void * | bufferIn, |
| uint8_t | size ) |
Function to encrypt data
Called automatically when a write is performed
Definition at line 1809 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::decrypt | ( | void * | bufferIn, |
| uint8_t | size ) |
Function to decrypt data
Called automatically when incoming data is received
Definition at line 1841 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setKey | ( | uint8_t | key[CCM_KEY_SIZE] | ) |
Set our 16-byte (128-bit) encryption key
Definition at line 1880 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setCounter | ( | uint64_t | counter | ) |
Set the (default 3-byte) packet counter used for encryption
Definition at line 1900 of file nrf_to_nrf.cpp.
| void nrf_to_nrf::setIV | ( | uint8_t | IV[CCM_IV_SIZE] | ) |
Set IV for encryption. This is only used for manual encryption, a random IV is generated using the on-board RNG for encryption during normal operation.
Definition at line 1908 of file nrf_to_nrf.cpp.
| uint8_t nrf_to_nrf::radioData[ACTUAL_MAX_PAYLOAD_SIZE+2] |
Data buffer for radio data The radio can handle packets up to 255 bytes if CRC & DPL is disabled 254 bytes if using 16-bit CRC & DPL is disabled
Definition at line 408 of file nrf_to_nrf.h.
| bool nrf_to_nrf::failureDetected |
Not implemented due to SOC
Definition at line 732 of file nrf_to_nrf.h.
| uint16_t nrf_to_nrf::interframeSpacing |
The IEEE 802.15.4 standard defines a specific time that is alotted for the MAC sublayer to process received data. Usage of this interframe spacing (IFS) comes into play to avoid that two frames are transmitted too close to each other in time.
This is the time period in uS the radio will wait between the last bit of the previous transmission, and the first bit of the next transmission.
This is configured for compatibility with nRF24L01 radios. Can be set lower if communicating between nRF52x devices.
Definition at line 816 of file nrf_to_nrf.h.
| uint8_t nrf_to_nrf::outBuffer[MAX_PACKET_SIZE+CCM_MIC_SIZE+CCM_START_SIZE] |
The data buffer where encrypted data is placed. See the datasheet p115 for the CCM data structure
Definition at line 857 of file nrf_to_nrf.h.
| bool nrf_to_nrf::enableEncryption |
Enable use of the on-board AES CCM mode encryption
Cipher block chaining - message authentication code (CCM) mode is an authenticated encryption algorithm designed to provide both authentication and confidentiality during data transfer. CCM combines counter mode encryption and CBC-MAC authentication
Users need to take extra steps to prevent specific attacks, such as replay attacks, which can be prevented by transmitting a timestamp or counter value, and only accepting packets with a current timestamp/counter value, rejecting old data.
Encryption uses a 5-byte IV and 3-byte counter, the sizes of which can be configured in nrf_to_nrf.h Maximum: 8-byte IV, 4-byte counter, plus the MAC/MIC is 4-bytes
Definition at line 890 of file nrf_to_nrf.h.