armapi  v1.0
bĂȘta
Fsk(local) radio

Macros

#define ARM_FSK_BROADCAST   255
 Constant to define the broadcast value. More...
 
#define ARM_FSK_POWER_AUTO   (-127)
 Constant to define the auto power value. More...
 

Typedefs

typedef enum armFskWor_e armFskWor_t
 Constant to define the WOR mode 'Wake On Radio'. More...
 
typedef enum armFskLbtAfa_e armFskLbtAfa_t
 Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'. More...
 

Enumerations

enum  armFskWor_e { ARM_FSK_WOR_DISABLE, ARM_FSK_WOR_LP, ARM_FSK_WOR_CS, ARM_FSK_WOR_PQT }
 Constant to define the WOR mode 'Wake On Radio'. More...
 
enum  armFskLbtAfa_e { ARM_FSK_LBTAFA_DISABLE, ARM_FSK_LBTAFA_LBT, ARM_FSK_LBTAFA_AFA, ARM_FSK_LBTAFA_LBTAFA }
 Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'. More...
 

Functions

int8_t armFskMaxPower (uint16_t radioChannel, armBaudrate_t radioBaud)
 Get The maximal possible power. More...
 
armError_t armFskSetRadio (arm_t *arm, uint16_t channel, armBaudrate_t baud, int8_t power)
 Setup the Fsk (local) radio configuration. More...
 
void armFskGetRadio (arm_t *arm, uint16_t *channel, armBaudrate_t *baud, int8_t *power)
 Get the fsk (local) radio configuration. More...
 
armError_t armFskSetRemoteAdd (arm_t *arm, uint8_t add)
 Set the radio remote address. More...
 
uint8_t armFskGetRemoteAdd (arm_t *arm)
 Get the remote address. More...
 
armError_t armFskSetLocalAdd (arm_t *arm, uint8_t add)
 Set the radio local address. More...
 
uint8_t armFskGetLocalAdd (arm_t *arm)
 Get the local address. More...
 
void armFskEnableAddressing (arm_t *arm, bool enable)
 Enable/Disable Addressing. More...
 
bool armFskIsEnableAddressing (arm_t *arm)
 Get enable Addressing. More...
 
void armFskEnableCrc (arm_t *arm, bool enable)
 Enable/Disable CRC. More...
 
bool armFskIsEnableCrc (arm_t *arm)
 Get enable CRC. More...
 
armError_t armFskEnableInfinityMode (arm_t *arm, bool enable)
 Enable/Disable Infinity mode. More...
 
bool armFskIsEnableInfinityMode (arm_t *arm)
 Get enable Infinity mode. More...
 
void armFskEnableWhitening (arm_t *arm, bool enable)
 Enable/Disable Whitening. More...
 
bool armFskIsEnableWhitening (arm_t *arm)
 Get enable Whitening. More...
 
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. More...
 
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. More...
 
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. More...
 
void armFskGetLbtAfaMode (arm_t *arm, armFskLbtAfa_t *mode, int8_t *rssiLevel, uint16_t *nSamples, uint16_t *channel2)
 Get the wake up on mode configuration. More...
 

Detailed Description

Macro Definition Documentation

#define ARM_FSK_BROADCAST   255

Constant to define the broadcast value.

Value for parameter armFskSetRemoteAdd() function.

#define ARM_FSK_POWER_AUTO   (-127)

Constant to define the auto power value.

Value for parameter power of armFskSetRemoteAdd() function.

Typedef Documentation

Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'.

See also
armFskSetLbtAfaMode()
typedef enum armFskWor_e armFskWor_t

Constant to define the WOR mode 'Wake On Radio'.

See also
armFskSetWorMode()

Enumeration Type Documentation

Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'.

See also
armFskSetLbtAfaMode()
Enumerator
ARM_FSK_LBTAFA_DISABLE 

Disable all LBT&AFA mode.

ARM_FSK_LBTAFA_LBT 

Enable Listen Before Talk .

ARM_FSK_LBTAFA_AFA 

Enable Adaptive Frequency Agility, is used to receive data on one channel of the two.

ARM_FSK_LBTAFA_LBTAFA 

Enable Listen Before Talk and adaptive Frequency Agility, listen on the tow channels and talk on the free channels.

Constant to define the WOR mode 'Wake On Radio'.

See also
armFskSetWorMode()
Enumerator
ARM_FSK_WOR_DISABLE 

Disable WOR mode.

ARM_FSK_WOR_LP 

Enable long preamble for the transmitter, then wake up the receptor.

ARM_FSK_WOR_CS 

Enable WOR mode in 'Carrier Sense'.

Note
The ARM is wake up on level rssi (choose this mode for speed).
ARM_FSK_WOR_PQT 

Enable WOR mode in 'Preamble Quality Threshold'.

Note
The ARM is wake up on the preamble (choose this mode for quality reception).

Function Documentation

void armFskEnableAddressing ( arm_t *  arm,
bool  enable 
)

Enable/Disable Addressing.

Note
In the case where this function in not supported by your ARM this functions is ignored.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
enabletrue to enable Addressing or false to disable.
Note
You need to call armUpdateConfig() to update the parameters in you ARM.
See also
armFskIsEnableAddressing()
void armFskEnableCrc ( arm_t *  arm,
bool  enable 
)

Enable/Disable CRC.

Warning
This functions disable automatically the infinity mode.
Note
In the case where this function in not supported by your ARM this functions is ignored.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
enabletrue to enable CRC or false to disable.
Note
You need to call armUpdateConfig() to update the parameters in you ARM.
See also
armFskIsEnableCrc()
armFskEnableInfinityMode()
armError_t armFskEnableInfinityMode ( arm_t *  arm,
bool  enable 
)

Enable/Disable Infinity mode.

Warning
This functions disable automatically the CRC.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
enabletrue to enable Infinity mode or false to disable.
Returns
Error available:
Note
You need to call armUpdateConfig() to update the parameters in you ARM.
See also
armFskIsEnableInfinityMode()
armFskEnableCrc()
void armFskEnableWhitening ( arm_t *  arm,
bool  enable 
)

Enable/Disable Whitening.

Note
In the case where this function in not supported by your ARM this functions is ignored.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
enabletrue to enable Whitening false to disable.
Note
You need to call armUpdateConfig() to update the parameters in you ARM.
See also
armFskIsEnableWhitening()
void armFskGetLbtAfaMode ( arm_t *  arm,
armFskLbtAfa_t mode,
int8_t *  rssiLevel,
uint16_t *  nSamples,
uint16_t *  channel2 
)

Get the wake up on mode configuration.

Please, for more information about parameters consult the documentation of the armFskSetLbtAfaMode() function.

Note
If you don't went get a parameter you can give the NULL value.
In the case where this function in not supported by your ARM the value of parameters is no modified.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
modeIf the pointer is valid, the mode is set.
rssiLevelIf the pointer is valid, the rssiLevel is set. If the mode is ARM_FSK_LBTAFA_DISABLE the value is not workable.
nSamplesIf the pointer is valid, the nSamples is set. If the mode is ARM_FSK_LBTAFA_DISABLE the value is not workable.
channel2If the pointer is valid, the channel2 is set. If the mode is ARM_FSK_LBTAFA_DISABLE the value is not workable.
See also
armFskSetLbtAfaMode()
uint8_t armFskGetLocalAdd ( arm_t *  arm)

Get the local address.

Note
In the case where this function in not supported by your ARM the returned value is unfeasible.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
Returns
The local address.
See also
armFskSetLocalAdd()
void armFskGetRadio ( arm_t *  arm,
uint16_t *  channel,
armBaudrate_t baud,
int8_t *  power 
)

Get the fsk (local) radio configuration.

Please, for more information about parameter consult the documentation of the armFskSetRadio() function.

Note
If you don't went get a parameter you can give the NULL value.
In the case where this function in not supported by your ARM the value of parameters is no modified.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
channelIf the pointer is valid, the channel is set.
baudIf the pointer is valid, the baud is set. If ARM_BAUDRATE_NONE is set, there is probably a error.
powerIf the pointer is valid, the power is set. If the power is no particularity specified, the ARM_FSK_POWER_AUTO value is set.
See also
armFskSetRadio()
uint8_t armFskGetRemoteAdd ( arm_t *  arm)

Get the remote address.

Note
In the case where this function in not supported by your ARM the returned value is unfeasible.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
Returns
The remote address.
See also
armFskSetRemoteAdd()
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.

Please, for more information about parameters consult the documentation of the armFskSetWorMode() function.

Note
If you don't went get a parameter you can give the NULL value.
In the case where this function in not supported by your ARM the value of parameters is no modified.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
modeIf the pointer is valid, the mode is set.
periodTimeIf the pointer is valid, the periodTime is set. If the mode is ARM_FSK_WOR_DISABLE the value is not workable.
postTimeIf the pointer is valid, the postTime is set. If the mode is ARM_FSK_WOR_DISABLE the value is not workable.
rssiLevelIf the pointer is valid, the rssiLevel is set. If the mode is not ARM_FSK_WOR_CS the value is not workable.
filterLongPreambleIf the pointer is valid, the filterLongPreamble is set. If the mode is ARM_FSK_WOR_DISABLE or ARM_FSK_WOR_LP the value is not workable.
See also
armFskSetWorMode()
bool armFskIsEnableAddressing ( arm_t *  arm)

Get enable Addressing.

Note
In the case where this function in not supported by your ARM the returned value is unfeasible.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
Returns
true if the Addressing is enable or false if disable.
See also
armFskEnableAddressing()
bool armFskIsEnableCrc ( arm_t *  arm)

Get enable CRC.

Note
In the case where this function in not supported by your ARM the returned value is unfeasible.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
Returns
true if the CRC is enable or false if disable.
See also
armFskEnableCrc()
bool armFskIsEnableInfinityMode ( arm_t *  arm)

Get enable Infinity mode.

Note
In the case where this function in not supported by your ARM the returned value is unfeasible.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
Returns
true if the Infinity mode is enable or false if disable.
See also
armFskEnableInfinityMode()
bool armFskIsEnableWhitening ( arm_t *  arm)

Get enable Whitening.

Note
In the case where this function in not supported by your ARM the returned value is unfeasible.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
Returns
true if the Whitening is enable or false if disable.
See also
armFskEnableWhitening()
int8_t armFskMaxPower ( uint16_t  radioChannel,
armBaudrate_t  radioBaud 
)

Get The maximal possible power.

Get the maximal possible power of function channel and baudrate. For more information, please consulate Fsk (Local) radio page.

Parameters
radioChannelThe radio channel.
radioBaudThe radio baudrate.
Returns
The maximal power possible in dBm. -1 if no power possible.
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.

Warning
If you have the WOR mode enable (in ARM_FSK_WOR_CS see armFskSetWorMode()) and the mode is not ARM_FSK_LBTAFA_DISABLE the rssiLevel is the same register in ARM, so if change this value with this function, the rssiLevel value of the WOR mode is also modified.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
modeThe value available:
rssiLevelThis parameter in dBm is used by ARM_FSK_LBTAFA_AFA and ARM_FSK_LBTAFA_LBTAFA (the default value is -95) for define the level rssi who say if the channels is busy or not.
nSamplesThis is the number of rssi sample (the default value is 240).
channel2The secondary channel, the primary channel (and the other radio parameters) must be set with armFskSetRadio() function.
Returns
Error available:
Note
To configured the other radio parameters please call armFskSetRadio() function.
You need to call armUpdateConfig() for update the parameters in you ARM.
See also
armFskGetLbtAfaMode()
armFskSetRadio()
armFskSetWorMode()
armFskMaxPower()
armError_t armFskSetLocalAdd ( arm_t *  arm,
uint8_t  add 
)

Set the radio local address.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
addLocal address of 0 to 255.
Returns
Error available:
Note
You need to call armUpdateConfig() to update the parameters in you ARM.
See also
armFskGetLocalAdd()
armFskSetRemoteAdd()
armFskEnableAddressing()
armError_t armFskSetRadio ( arm_t *  arm,
uint16_t  channel,
armBaudrate_t  baud,
int8_t  power 
)

Setup the Fsk (local) radio configuration.

For more information, please consulate Fsk (Local) radio page.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
channelThe main radio channel.
baudThe radio baudrate.
powerThe radio output power.
  • If you have a ARM in LD 'Long Distence' version the max value is 27 for 27dBm.
  • If you have a ARM in LP 'Low Power' version the max value is 14 for 14dBm.
  • The min value is -18 for -18dBm.
  • You can passe the ARM_FSK_POWER_AUTO value to set the max power according from the channel and baud parameter. In this case, you can choose the channel and baud value without worry the power value.
Returns
Error available:
Note
You need to call armUpdateConfig() to update the parameters in you ARM.
See also
armFskGetRadio()
armFskMaxPower()
armError_t armFskSetRemoteAdd ( arm_t *  arm,
uint8_t  add 
)

Set the radio remote address.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
addRemote address of 0 to 255. The 255 value is used for broadcast, the macro ARM_FSK_BROADCAST (255) can be used in this case.
Returns
Error available:
Note
You need to call armUpdateConfig() to update the parameters in you ARM.
See also
armFskGetRemoteAdd()
armFskSetLocalAdd()
armFskEnableAddressing()
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.

Warning
If ARMPORT_WITH_nSLEEP is not defined and the mode is ARM_FSK_WOR_CS or ARM_FSK_WOR_PQT this function enable the wake up on uart (see armEnableWakeUpUart()) and change the serial baudrate if necessary. In other mode (and if ARMPORT_WITH_nSLEEP is not defined) this function disable the wake up on uart.
If you have the LBT mode enable (in ARM_FSK_LBTAFA_LBT or ARM_FSK_LBTAFA_LBTAFA see armFskSetLbtAfaMode()) and the mode is ARM_FSK_WOR_CS the rssiLevel is the same register in ARM, so if change this value with this function, the rssiLevel value of the LBT is also modified.

This function is supported by:

  • ARM_N8_LP, ARM Nano in 868Mhz Low Power (and Sigfox).
  • ARM_N8_LD, ARM Nano in 868MHz Long Distance.
Parameters
armPointer to your ARM structure.
modeThe value available:
  • ARM_FSK_WOR_DISABLE To disable the wake on radio mode. The other parameters is ignored.
  • ARM_FSK_WOR_LP To enable the long preamble, necessary for the transmitter to wake up the receptor. The parameters rssiLevel and filterLongPreamble is ignored.
  • ARM_FSK_WOR_CS To enable the wake on radio in 'Carrier Sense' (choose this mode for speed).
  • ARM_FSK_WOR_PQT To enable the wake on radio in 'Preamble Quality Threshold' (choose this mode for quality reception). The parameter rssiLevel is ignored.
periodTimeThe period time in milliseconds.
  • The maximal value possible is 900.
  • The function, return the error ARM_ERR_PARAM_OUT_OF_RANGE if this value is out of rang.
  • If the mode is ARM_FSK_WOR_CS or ARM_FSK_WOR_PQT the periodTime is the time between two wake up. If the condition of mode is check, the ARM keep awaken to receive the frame. This value must be same of emitter (mode in ARM_FSK_WOR_LP).
  • If the mode is ARM_FSK_WOR_LP the periodTime is the time of emission long preamble. It is necessary to emit the loge preamble for considerate the wake-up period of the receiver. This value must be same of receptor (mode in ARM_FSK_WOR_CS or ARM_FSK_WOR_PQT).
postTimeThe time in milliseconds where the WOR is disable.
  • The maximal value possible is 2550.
  • The function, return the error ARM_ERR_PARAM_OUT_OF_RANGE if this value is out of rang.
  • In the case or mode is:
    • ARM_FSK_WOR_CS or ARM_FSK_WOR_PQT, the postTime is the time here the ARM keep awaken after the receive the last frame.
    • ARM_FSK_WOR_LP after send the first frame with long preamble, the next frames are send without long preamble. After the last frame send and after the postTime the ARM send the next frame with long preamble.
rssiLevelThis parameter in dBm is used by ARM_FSK_WOR_CS (the default value is -95). In ARM_FSK_WOR_CS mode the wake up is generate by the rssi level. This Level is configurable by rssiLevel parameter.
filterLongPreambleIn the case where mode is ARM_FSK_WOR_CS or ARM_FSK_WOR_PQT, if filterLongPreamble is true the receive frames with long preamble is not push on the serial port.
Returns
Error available:
Note
You need to call armUpdateConfig() for update the parameters in you ARM.
After call armUpdateConfig() functions, the ARM go to sleep:
  • If the ARMPORT_WITH_nSLEEP is not defined.
  • If ARMPORT_WITH_nSLEEP is defined and sleep is enable (see armSleep()).
See also
armFskGetWorMode()
armEnableWakeUpUart()
armFskSetLbtAfaMode()
armSleep()