40 #include "armconfig.h" 53 #define ARM_FSK_BROADCAST 255 60 #define ARM_FSK_POWER_AUTO (-127) 68 #define ARM_LW_UNCONFIRMED(val) ((-1)*(val)) 76 #define ARM_LW_IS_UNCONFIRMED(val) ((val)<=0) 202 typedef struct uint128_s
211 typedef struct armReg_s
221 typedef struct armN8LpLd_s
223 armReg_t regsH[_ARM_N8LPLD_REGH_SIZE];
229 typedef struct armN8Lw_s
231 armReg_t regsM[_ARM_N8LW_REGM_SIZE];
232 armReg_t regsO[_ARM_N8LW_REGO_SIZE];
244 #ifdef ARM_WITH_N8_LPLD 247 #ifdef ARM_WITH_N8_LW 882 void armFskGetWorMode(arm_t* arm,
armFskWor_t* mode, uint16_t* periodTime, uint16_t* postTime, int8_t* rssiLevel,
bool* filterLongPreamble);
932 #if defined ARMPORT_WITH_nSLEEP || defined __DOXYGEN__ 950 void armSleep(arm_t* arm,
bool sleep);
1086 armError_t armLwSetRadio(arm_t* arm, uint8_t txChannel, uint8_t power, uint8_t txSf, uint8_t rx2Sf, uint8_t rx2Channel);
1107 void armLwGetRadio(arm_t* arm, uint8_t* txChannel, uint8_t* power, uint8_t* txSf, uint8_t* rx2Sf, uint8_t* rx2Channel);
1456 uint128_t* appSKey);
1546 int armSend(arm_t* arm,
const void* buf,
size_t nbyte);
1567 int armReceive(arm_t* arm,
void* buf,
size_t nbyte,
int timeout);
armError_t armLwSetRadio(arm_t *arm, uint8_t txChannel, uint8_t power, uint8_t txSf, uint8_t rx2Sf, uint8_t rx2Channel)
Setup the LoraWan radio configuration.
115200 bps.
Definition: arm.h:126
armError_e
Constant to define the errors.
Definition: arm.h:86
bool armLwIsEnableOtaa(arm_t *arm)
Get if Over The Air Activation is enable.
Enable Adaptive Frequency Agility, is used to receive data on one channel of the two.
Definition: arm.h:165
armPortParity_t
Constant to define the parity type.
Definition: armport.h:91
The LED is 'off' all the time.
Definition: arm.h:151
void armFskGetWorMode(arm_t *arm, armFskWor_t *mode, uint16_t *periodTime, uint16_t *postTime, int8_t *rssiLevel, bool *filterLongPreamble)
Get the wake on radio mode configuration.
Disable WOR mode.
Definition: arm.h:136
enum armBaudrate_e armBaudrate_t
Constant to define the baudrate value.
void armLwSetPortField(arm_t *arm, uint8_t port)
Set the port field.
That is probably a error.
Definition: arm.h:118
armError_t armSfxEnableDownlink(arm_t *arm, bool enable)
Enable/Disable the Sigfox downlink.
9600 bps.
Definition: arm.h:122
enum armFskLbtAfa_e armFskLbtAfa_t
Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'.
uint8_t armFskGetRemoteAdd(arm_t *arm)
Get the remote address.
enum armType_e armType_t
Type of ARM.
Port Error, at the port reading.
Definition: arm.h:93
armError_t armInfo(arm_t *arm, armType_t *armType, uint8_t *rev, uint64_t *sn, uint16_t *rfFreq, uint8_t *rfPower)
Get information about the ARM.
ARM commend Error, from AT commend.
Definition: arm.h:107
armFskWor_e
Constant to define the WOR mode 'Wake On Radio'.
Definition: arm.h:134
Mode for Fsk (local) radio.
Definition: arm.h:176
void armSetLed(arm_t *arm, armLed_t led)
Set the LED behavior.
void armFskEnableAddressing(arm_t *arm, bool enable)
Enable/Disable Addressing.
armBaudrate_e
Constant to define the baudrate value.
Definition: arm.h:116
void armLwEnableTxAdaptiveSpeed(arm_t *arm, bool enable)
Enable/Disable Tx Adaptive Speed.
void armFskGetRadio(arm_t *arm, uint16_t *channel, armBaudrate_t *baud, int8_t *power)
Get the fsk (local) radio configuration.
enum armMode_e armMode_t
Constant to define the working mode.
Mode for Sigfox network.
Definition: arm.h:177
void armFskGetLbtAfaMode(arm_t *arm, armFskLbtAfa_t *mode, int8_t *rssiLevel, uint16_t *nSamples, uint16_t *channel2)
Get the wake up on mode configuration.
uint8_t armFskGetLocalAdd(arm_t *arm)
Get the local address.
Enable Listen Before Talk and adaptive Frequency Agility, listen on the tow channels and talk on the ...
Definition: arm.h:166
No error.
Definition: arm.h:88
armError_t armFskSetRadio(arm_t *arm, uint16_t channel, armBaudrate_t baud, int8_t power)
Setup the Fsk (local) radio configuration.
armLed_e
Constant to define the comportment of the LED.
Definition: arm.h:149
armType_e
Type of ARM.
Definition: arm.h:186
Error, the parameters is incompatible between them.
Definition: arm.h:99
void armLwEnableRx2Adaptive(arm_t *arm, bool enable)
Enable/Disable Rx2 windows Adaptive.
armError_t armLwSetConfirmedFrame(arm_t *arm, int8_t nbFrame)
Enable/Disable and set the confirmed frame.
armMode_e
Constant to define the working mode.
Definition: arm.h:174
void armLwEnableDutyCycle(arm_t *arm, bool enable)
Enable/Disable Duty Cycle.
enum armError_e armError_t
Constant to define the errors.
Port Error, at the port writing.
Definition: arm.h:94
The LED is 'off' on RF activity and 'on' other time.
Definition: arm.h:152
armLed_t armGetLed(arm_t *arm)
Get the LED behavior.
ARM Nano in 868MHz low power version (and Sigfox).
Definition: arm.h:189
19200 bps.
Definition: arm.h:123
armFskLbtAfa_e
Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'.
Definition: arm.h:161
ARM commend Error, from set register.
Definition: arm.h:109
armError_t armReboot(arm_t *arm)
Reboot the ARM.
bool armFskIsEnableCrc(arm_t *arm)
Get enable CRC.
armError_t armLwIds(arm_t *arm, uint32_t *devAddr, uint64_t *devEui, uint64_t *appEui, uint128_t *appKey, uint128_t *nwkSKey, uint128_t *appSKey)
Get the IDs.
bool armIsEnableWakeUpUart(arm_t *arm)
Get if Wake Up Uart is enable.
void armSleep(arm_t *arm, bool sleep)
Enable/Disable sleep with pin.
armPortDatabits_t
Constant to define the data bits value.
Definition: armport.h:81
ARM Nano in 868MHz LoraWan version.
Definition: arm.h:191
void armLwEnableOtaa(arm_t *arm, bool enable)
Enable/Disable Over The Air Activation.
armPortBaudrate_t
Constant to define the baudrate value.
Definition: armport.h:63
armError_t armUpdateConfig(arm_t *arm)
Update the configuration in ARM.
ARM commend Error, can't switch to AT commend.
Definition: arm.h:105
ARM Nano in 868MHz long distance version.
Definition: arm.h:190
void armLwEnableTxAdaptiveChannel(arm_t *arm, bool enable)
Enable/Disable Tx Adaptive Channel.
bool armLwIsEnableRx2Adaptive(arm_t *arm)
Get if Rx2 windows Adaptive is enable.
int8_t armLwGetConfirmedFrame(arm_t *arm)
Get the setup of confirmed frame.
armError_t armFskEnableInfinityMode(arm_t *arm, bool enable)
Enable/Disable Infinity mode.
enum armLed_e armLed_t
Constant to define the comportment of the LED.
4800 bps.
Definition: arm.h:121
void armFskEnableWhitening(arm_t *arm, bool enable)
Enable/Disable Whitening.
armError_t armEnableWakeUpUart(arm_t *arm, bool enable)
Enable/Disable the Wake Up Uart.
armPortStopbit_t
Constant to define the number stop bits.
Definition: armport.h:102
Functionality no supported by theARM.
Definition: arm.h:89
void armGetSerial(arm_t *arm, armPortBaudrate_t *baud, armPortDatabits_t *databits, armPortParity_t *parity, armPortStopbit_t *stopbit)
Get the serial port configuration.
ARM commend Error, can't quit AT commend.
Definition: arm.h:106
bool armFskIsEnableAddressing(arm_t *arm)
Get enable Addressing.
int armReceive(arm_t *arm, void *buf, size_t nbyte, int timeout)
Receive data from ARM.
armError_t armSetSerial(arm_t *arm, armPortBaudrate_t baud, armPortDatabits_t databits, armPortParity_t parity, armPortStopbit_t stopbit)
Setup serial port configuration.
bool armLwIsEnableTxAdaptiveChannel(arm_t *arm)
Get if Tx Adaptive Channel is enable.
Error, one or more of parameters is out of range.
Definition: arm.h:98
armError_t armFskSetRemoteAdd(arm_t *arm, uint8_t add)
Set the radio remote address.
uint8_t armLwGetPortField(arm_t *arm)
Get the port field.
bool armLwIsEnableRxWindows(arm_t *arm)
Get if Rx windows is enable.
bool armLwIsEnableDutyCycle(arm_t *arm)
Get if Duty Cycle is enable.
Port Error, at the port closing.
Definition: arm.h:96
Port Error, at the port configuring.
Definition: arm.h:92
bool armFskIsEnableInfinityMode(arm_t *arm)
Get enable Infinity mode.
Disable all LBT&AFA mode.
Definition: arm.h:163
Port Error, at the port opening.
Definition: arm.h:91
The LED is 'on' on RF activity and 'off' other time.
Definition: arm.h:153
int8_t armFskMaxPower(uint16_t radioChannel, armBaudrate_t radioBaud)
Get The maximal possible power.
armMode_t armGetMode(arm_t *arm)
Get the mode.
armError_t armSetMode(arm_t *arm, armMode_t mode)
Set the mode.
enum armFskWor_e armFskWor_t
Constant to define the WOR mode 'Wake On Radio'.
bool armLwIsEnableTxAdaptiveSpeed(arm_t *arm)
Get if Tx Adaptive Speed is enable.
Enable long preamble for the transmitter, then wake up the receptor.
Definition: arm.h:137
2400 bps.
Definition: arm.h:120
38400 bps.
Definition: arm.h:124
57600 bps.
Definition: arm.h:125
Enable Listen Before Talk .
Definition: arm.h:164
Mode for Lora network (LoRaWan).
Definition: arm.h:178
armError_t armFskSetWorMode(arm_t *arm, armFskWor_t mode, uint16_t periodTime, uint16_t postTime, int8_t rssiLevel, bool filterLongPreamble)
Enable/Disable and configure the wake on radio mode.
Port Error, at the port reading/writing.
Definition: arm.h:95
No Arm type.
Definition: arm.h:188
void armFskEnableCrc(arm_t *arm, bool enable)
Enable/Disable CRC.
armError_t armDeInit(arm_t *arm)
De-initialize the port.
ARM commend Error, from get register.
Definition: arm.h:108
void armLwGetRadio(arm_t *arm, uint8_t *txChannel, uint8_t *power, uint8_t *txSf, uint8_t *rx2Sf, uint8_t *rx2Channel)
Get the LoraWan radio configuration.
void armLwEnableRxWindows(arm_t *arm, bool enable)
Enable/Disable Rx windows.
armError_t armFskSetLbtAfaMode(arm_t *arm, armFskLbtAfa_t mode, int8_t rssiLevel, uint16_t nSamples, uint16_t channel2)
Enable/Disable and configure the Lbt&Afa mode.
bool armSfxIsEnableDownlink(arm_t *arm)
Get if the Sigfox downlink is enable.
bool armFskIsEnableWhitening(arm_t *arm)
Get enable Whitening.
armError_t armInit(arm_t *arm, void *port)
Initialize the structure, port and ARM.
int armSend(arm_t *arm, const void *buf, size_t nbyte)
Send data to ARM.
armError_t armFskSetLocalAdd(arm_t *arm, uint8_t add)
Set the radio local address.
1200 bps.
Definition: arm.h:119