https://wiki.nemeus.fr/api.php?action=feedcontributions&user=Lcs&feedformat=atomnemeuswiki - User contributions [en]2024-03-28T09:11:04ZUser contributionsMediaWiki 1.28.2https://wiki.nemeus.fr/index.php?title=NIS-UL_UltraSonic_Sensor&diff=726NIS-UL UltraSonic Sensor2021-03-17T14:45:18Z<p>Lcs: /* Uplink data Frame format */</p>
<hr />
<div>[[Category:Sensors]]<br />
[[File:MS006-overview.jpeg|thumb|400px|Ultrasonic sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= WARNING =<br />
This sensor is not designed for critical purposes.<br />
It should never be used in an application where a malfunction of the device could cause personal injury. <br />
Due to ultrasonic physics, we can not guarantee 100% reliability at close distances.<br />
<br />
= Ultrasonic sensor properties =<br />
Default configuration allows target detection until 3 meters.<br />
<br />
Objects from 0cm to 20cm range are reported as 20cm (0 is at the transducer, at the bottom of the cone).<br />
<br />
The acoustic detection pattern has an angle of 7°. <br />
The geometry of the detection pattern depends mainly on the size, orientation, and acoustic properties of the target, but also on the atmospheric pressure, temperature and humidity.<br />
<br />
Each sensor is factory calibrated to unify results between sensors.<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
<span style="color:#FF0000">'''Note :''' Frame format of sensors delivered before 1st of November 2017 can be found [[NIS-UL UltraSonic Sensor - Frame Format v0.x|here]] </span> <br />
<br><br><br />
The uplink payload contains multiple fields:<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field. Absence of <nb_meas> means <nb_meas> = 1.<br />
<br />
bit 1 : indicates the presence of <usonic_dist> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field. <span style="color:red">Only available for versions before 19W03</span><br />
<br />
bit 3 : indicates the presence of <internal_temp> field. <span style="color:red">Only available for versions before 19W03</span><br />
<br />
bit 4 : is reserved.<br />
<br />
bit 5 : indicates the presence of <cause> field. Absence of <cause> field means <cause> = periodic only.<br />
<br />
bit 6 : is reserved.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<usonic_dist>: 2*<nb_meas> bytes containing the distances measured by the ultrasonic sensor in centimeters (1 to 300 cm in big endian).<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (usonic_dist > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (usonic_dist < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (usonic_dist < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (usonic_dist > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><usonic_dist1>...<usonic_distN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x8B which means that the default frame is <mask><nb_meas><usonic_dist1>...<usonic_distN><temp1>...<tempN> (the voltage is not present)<br />
<br />
Some examples (in hexadecimal):<br />
* “8B02009700981f19”: the frame indicates two measurements of 151cm and 152cm followed by two temperatures of 31°C and 25°C.<br />
* “8200a0”: the frame indicates a single measurement of 160cm without temperature.<br />
* “881e”: the frame indicates one temperature of 30°C.<br />
<br />
== Downlink Frame format ==<br />
<br />
<span style="color:#FF0000">'''Note :''' Frame format of sensors delivered before 1st of November 2017 can be found [[NIS-UL UltraSonic Sensor - Frame Format v0.x|here]] </span> <br />
<br><br><br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
<meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
<period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<mode>: bit field enabling/disabling the measures (threshold detections and periodic measures)<br />
<subperiod>: subdivision of period for threshold detection, actual measurement period is (<meas_period>*<period_unit>)/<subperiod> seconds<br />
<high_threshold>: value of high threshold<br />
<high_hysteresis>: value of high hysteresis<br />
<low_threshold>: value of low threshold<br />
<low_hysteresis>: value of low hysteresis<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol.<br><br />
'''The downlink frame must be sent on the LoRaWAN port 8.'''<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.<br />
<br />
Bit0 indicates the presence of <up_frame_mask> field<br />
<br />
Bit1 indicates the presence of <nb_meas_for_tx> field<br />
<br />
Bit2 indicates the presence of <meas_period> and <period_unit> fields<br />
<br />
Bit3 indicates the presence of <mode> and <subperiod> fields<br />
<br />
Bit4 indicates the presence of <high_threshold> and <high_hysteresis> fields<br />
<br />
Bit5 indicates the presence of <low_threshold> and <low_hysteresis> fields<br />
<br />
Bit6 is reserved<br />
<br />
Bit7 is reserved<br />
<br />
If (mask.bit0 == 1):<br />
<br />
<up_frame_mask>: 1 byte containing the uplink frame mask<br />
<br />
If (mask.bit1 == 1):<br />
<br />
<nb_meas_for_tx>: 1 byte containing the number of measurements required to trigger a transmission<br />
<br />
If (mask.bit2 == 1):<br />
<br />
<meas_period>: 2 bytes in little endian (LSB first) containing the period of measurements in <period_unit> seconds<br />
<period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
If (mask.bit3 == 1):<br />
<mode>: 1 byte encoded as follows:<br />
bit0: enable(1)/disable(0) high threshold detection<br />
bit1: enable(1)/disable(0) high hysteresis detection (when leaving high threshold state)<br />
bit2: enable(1)/disable(0) low threshold detection<br />
bit3: enable(1)/disable(0) low hysteresis detection (when leaving low threshold state)<br />
bit4: enable(1)/disable(0) periodic measurements<br />
bit5: reserved<br />
bit6: reserved<br />
bit7: reserved<br />
<subperiod>: 2 bytes in little endian containing the period subdivision<br />
<br />
If (mask.bit4 == 1):<br />
<br />
<high_threshold>: unsigned integer on 2 bytes in little endian containing the high threshold in cm [20..299]<br />
<high_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving high threshold state in cm [1..255]<br />
<br />
If (mask.bit5 == 1):<br />
<br />
<low_threshold>: unsigned integer on 2 bytes in little endian containing the low threshold in cm [21..300]<br />
<low_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving low threshold state in cm [1..255]<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit><mode><subperiod><high_threshold><high_hysteresis><low_threshold> <low_hysteresis>.<br />
<br />
Some examples in hexadecimal:<br />
<br />
“028182”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <usonic_dist> field only<br />
“028E04605401100100”: set <nb_meas_for_tx> to 4, <meas_period> to 21600*<period_unit> seconds, <period_unit> to 1 second and enable periodic measurements only with subperiod to 1 => one measurement every 6 hours and one transmission every 4 measures (every day). Each uplink frame will include 4 measurements<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/7Z9r3VnBuApcPSzj|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-TH_Temperature_Hygrometry_Sensor&diff=725NIS-TH Temperature Hygrometry Sensor2021-03-17T14:44:35Z<p>Lcs: /* Uplink data Frame format */</p>
<hr />
<div>[[Category:Sensors]]<br />
[[File:2 Exp Humidity and Temperature sensor.png|thumb|400px|RTD Temperature Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= TH Temperature Hygrometry sensor properties =<br />
<br />
== Humidity Sensor Specification ==<br />
<br />
Specified range : [0RH - 90RH]<br />
<br />
Accuracy tolerance : Typ +-2% RH<br />
<br />
Long-term drift : Typ <0.25% RH/year<br />
<br />
== Temperature Sensor Specification ==<br />
<br />
Specified range : [-40°C to 90°C]<br />
<br />
Accuracy tolerance : typ +-0.3°C<br />
<br />
Long Term Drift : max <0.03°C/year<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <th_temp> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field. <span style="color:red">Only available for versions before 19W03</span><br />
<br />
bit 3 : indicates the presence of <internal_temp> field. <span style="color:red">Only available for versions before 19W03</span><br />
<br />
bit 4 : indicates the presence of <th_hygro> field.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<th_temp>: 2*<nb_meas> bytes containing the temperature values in 0.1 °C. Each temperature value is a signed integer on 16 bits in big endian [-32768..+32767].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit4 == 1) :<br />
<th_hygro>: 2*<nb_meas> bytes containing the hygrometry values in 0.01 %. Each hygrometry value is an unsigned integer on 16 bits in big endian [0..9999].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (temperature > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (temperature < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (temperature < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (temperature > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><rtd_temp1>...<rtd_tempN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><rtd_temp1>...<rtd_tempN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“820119”: the frame indicates one temperature measurement of +28.1 °C.<br />
“8302FFCB000C”: the frame indicates two temperature measurements of -5.3 °c and +1.2 °C.<br />
“9201190120”: the frame indicates one measurements of temperature +28.1 °C followed by one measurement of hygrometry of 28.8%.<br />
“93020119012002000210”: the frame indicates two measurements of temperature +28.1 °C.and +28.8 °C followed by two measurements of hygrometry of 51.2% and 52.8%.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
<meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
<period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<mode>: bit field enabling/disabling the measures (threshold detections and periodic measures)<br />
<subperiod>: subdivision of period for threshold detection, actual measurement period is (<meas_period>*<period_unit>)/<subperiod> seconds<br />
<high_threshold>: value of high threshold<br />
<high_hysteresis>: value of high hysteresis<br />
<low_threshold>: value of low threshold<br />
<low_hysteresis>: value of low hysteresis<br />
<sensor_type>: identifies the type of sensor<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol. The downlink frame must be sent on the MS008 LoRaWAN port (10).<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.<br />
<br />
Bit0 indicates the presence of <up_frame_mask> field<br />
<br />
Bit1 indicates the presence of <nb_meas_for_tx> field<br />
<br />
Bit2 indicates the presence of <meas_period> and <period_unit> fields<br />
<br />
Bit3 indicates the presence of <mode> and <subperiod> fields<br />
<br />
Bit4 indicates the presence of <high_threshold> and <high_hysteresis> fields<br />
<br />
Bit5 indicates the presence of <low_threshold> and <low_hysteresis> fields<br />
<br />
Bit6 indicates the presence of <sensor_type> field<br />
<br />
If (mask.bit0 == 1):<br />
<br />
<up_frame_mask>: 1 byte containing the uplink frame mask<br />
<br />
If (mask.bit1 == 1):<br />
<br />
<nb_meas_for_tx>: 1 byte containing the number of measurements required to trigger a transmission<br />
<br />
If (mask.bit2 == 1):<br />
<br />
<meas_period>: 2 bytes in little endian (LSB first) containing the period of measurements in <period_unit> seconds<br />
<period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
If (mask.bit3 == 1):<br />
<mode>: 1 byte encoded as follows:<br />
bit0: enable(1)/disable(0) high threshold detection<br />
bit1: enable(1)/disable(0) high hysteresis detection (when leaving high threshold state)<br />
bit2: enable(1)/disable(0) low threshold detection<br />
bit3: enable(1)/disable(0) low hysteresis detection (when leaving low threshold state)<br />
bit4: enable(1)/disable(0) periodic measurements<br />
bit5 to bit7: reserved<br />
<subperiod>: 2 bytes in little endian containing the period subdivision<br />
<br />
If (mask.bit4 == 1):<br />
<br />
<high_threshold>: signed integer on 2 bytes in little endian containing the high threshold in 0.1 °C [-2000..+8000]<br />
<high_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving high threshold state in 0.1 °C [0..255]<br />
<br />
If (mask.bit5 == 1):<br />
<br />
<low_threshold>: signed integer on 2 bytes in little endian containing the low threshold in 0.1 °C [-2000..+8000]<br />
<low_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving low threshold state in 0.1 °C [0..255]<br />
<br />
If (mask.bit6 == 1):<br />
<br />
<sensor_type>: unsigned integer on 1 byte containing the sensor type [11..16]<br />
11(0x0B): N/A<br />
12(0x0C): N/A<br />
13(0x0D): ...<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit><mode><subperiod><high_threshold><high_hysteresis><low_threshold> <low_hysteresis><sensor_type>.<br />
<br />
Some examples in hexadecimal:<br />
<br />
“028182”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <th_temp> field only<br />
“028E04605401100100”: set <nb_meas_for_tx> to 4, <meas_period> to 21600*<period_unit> seconds, <period_unit> to 1 second and enable periodic measurements only with subperiod to 1 => one measurement every 6 hours and one transmission every 4 measures (every day). Each uplink frame will include 4 measurements<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-TR_Temperature_Sensor_(RTD)&diff=724NIS-TR Temperature Sensor (RTD)2021-03-17T14:43:44Z<p>Lcs: /* Uplink data Frame format */</p>
<hr />
<div>[[Category:Sensors]]<br />
[[File:1 Exp PE RTD sensor.png|thumb|400px|RTD Temperature Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= RTD Temperature sensor properties =<br />
<br />
* Handles 100Ω to 1kΩ (at 0°C) Platinum RTDs (PT100 to PT1000)<br />
<br />
* 2-wires, 3-wires or 4-wires connection<br />
<br />
* 15-Bit ADC Resolution; Nominal Temperature Resolution 0.03125°C (Varies Due to RTD Nonlinearity)<br />
<br />
* Total Accuracy Over All Operating Conditions: 0.5°C (0.05% of Full Scale) max<br />
<br />
* ±45V Input Protection<br />
<br />
* Fault Detection (Open RTD Element, RTD Shorted to Out-of-Range Voltage, or Short Across RTD Element)<br />
<br />
* Direct fifth-order linearization for best accuracy<br />
<br />
= Wiring =<br />
<br />
[[File:MS008 config3.jpeg|picture of sensor pcb and box]]<br />
<br />
{| class="wikitable"<br />
|+Probe settings<br />
|-<br />
|number of wires<br />
|jumpers configuration<br />
|Probe connection<br />
|-<br />
|rowspan="3"|4 wires<br />
|JP2 jumper on 1-2 <br />
|rowspan="3"|FORCE+ IN+ IN- FORCE-<br />
|-<br />
|JP3 NC<br />
|-<br />
|JP4 NC<br />
|-<br />
|rowspan="3"|3 wires<br />
|JP2 jumper on 2-3<br />
|rowspan="3"|FORCE+ IN+ IN-<br />
|-<br />
|JP3 NC<br />
|-<br />
|JP4 jumper ON <br />
|-<br />
|rowspan="3"|2 wires<br />
|JP2 jumper on 1-2<br />
|rowspan="3"|IN+ IN-<br />
|-<br />
|JP3 jumper ON<br />
|-<br />
|JP4 jumper ON <br />
|}<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <rtd_temp> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field. <span style="color:red">Only available for versions before 19W03</span><br />
<br />
bit 3 : indicates the presence of <internal_temp> field. <span style="color:red">Only available for versions before 19W03</span><br />
<br />
bit 4 : is reserved.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<rtd_temp>: 2*<nb_meas> bytes containing the temperature values in 0.1 °C. Each temperature value is a signed integer on 16 bits in big endian [-32768..+32767].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (temperature > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (temperature < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (temperature < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (temperature > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><rtd_temp1>...<rtd_tempN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><rtd_temp1>...<rtd_tempN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“820119”: the frame indicates one temperature measurement of +28.1 °C.<br />
“8302FFCB000C”: the frame indicates two temperature measurements of -5.3 °c and +1.2 °C.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
<meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
<period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<mode>: bit field enabling/disabling the measures (threshold detections and periodic measures)<br />
<subperiod>: subdivision of period for threshold detection, actual measurement period is (<meas_period>*<period_unit>)/<subperiod> seconds<br />
<high_threshold>: value of high threshold<br />
<high_hysteresis>: value of high hysteresis<br />
<low_threshold>: value of low threshold<br />
<low_hysteresis>: value of low hysteresis<br />
<sensor_type>: identifies the type of sensor (PT100/PT1000 and 2/3/4 wires)<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol.<br><br />
'''The downlink frame must be sent on the MS008 LoRaWAN port (10).'''<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.<br />
<br />
Bit0 indicates the presence of <up_frame_mask> field<br />
<br />
Bit1 indicates the presence of <nb_meas_for_tx> field<br />
<br />
Bit2 indicates the presence of <meas_period> and <period_unit> fields<br />
<br />
Bit3 indicates the presence of <mode> and <subperiod> fields<br />
<br />
Bit4 indicates the presence of <high_threshold> and <high_hysteresis> fields<br />
<br />
Bit5 indicates the presence of <low_threshold> and <low_hysteresis> fields<br />
<br />
Bit6 indicates the presence of <sensor_type> field<br />
<br />
If (mask.bit0 == 1):<br />
<br />
<up_frame_mask>: 1 byte containing the uplink frame mask<br />
<br />
If (mask.bit1 == 1):<br />
<br />
<nb_meas_for_tx>: 1 byte containing the number of measurements required to trigger a transmission<br />
<br />
If (mask.bit2 == 1):<br />
<br />
<meas_period>: 2 bytes in little endian (LSB first) containing the period of measurements in <period_unit> seconds<br />
<period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
If (mask.bit3 == 1):<br />
<mode>: 1 byte encoded as follows:<br />
bit0: enable(1)/disable(0) high threshold detection<br />
bit1: enable(1)/disable(0) high hysteresis detection (when leaving high threshold state)<br />
bit2: enable(1)/disable(0) low threshold detection<br />
bit3: enable(1)/disable(0) low hysteresis detection (when leaving low threshold state)<br />
bit4: enable(1)/disable(0) periodic measurements<br />
bit5 to bit7: reserved<br />
<subperiod>: 2 bytes in little endian containing the period subdivision<br />
<br />
If (mask.bit4 == 1):<br />
<br />
<high_threshold>: signed integer on 2 bytes in little endian containing the high threshold in 0.1 °C [-2000..+8000]<br />
<high_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving high threshold state in 0.1 °C [0..255]<br />
<br />
If (mask.bit5 == 1):<br />
<br />
<low_threshold>: signed integer on 2 bytes in little endian containing the low threshold in 0.1 °C [-2000..+8000]<br />
<low_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving low threshold state in 0.1 °C [0..255]<br />
<br />
If (mask.bit6 == 1):<br />
<br />
<sensor_type>: unsigned integer on 1 byte containing the sensor type [11..16]<br />
11(0x0B): PT100 2 wires<br />
12(0x0C): PT100 3 wires<br />
13(0x0D): PT100 4 wires<br />
14(0x0E): PT1000 2 wires<br />
15(0x0F): PT1000 3 wires<br />
16(0x10): PT1000 4 wires<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit><mode><subperiod><high_threshold><high_hysteresis><low_threshold> <low_hysteresis><sensor_type>.<br />
<br />
Some examples in hexadecimal:<br />
<br />
“028182”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <rtd_temp> field only<br />
“028E04605401100100”: set <nb_meas_for_tx> to 4, <meas_period> to 21600*<period_unit> seconds, <period_unit> to 1 second and enable periodic measurements only with subperiod to 1 => one measurement every 6 hours and one transmission every 4 measures (every day). Each uplink frame will include 4 measurements<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/D3upefvYafJ0EQ7i|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-LS_21Wxx_AT_Commands&diff=407MM002-LS 21Wxx AT Commands2021-03-12T08:15:51Z<p>Lcs: Created page with "Category:MM002 Category:Modules AT commands are used as an interface with Nemeus Communication modules. Modules can be driven at 3 different levels: * Radio level: em..."</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
AT commands are used as an interface with Nemeus Communication modules. Modules can be driven at 3 different levels:<br />
<br />
* Radio level: embedded AT server uses RF SX127x driver API (LoRa™and FSK modulations can be used).<br />
* LoRa™WAN level: embedded AT server uses LoRa™WAN library API(available only when the library is present in embedded software).<br />
* SIGFOX™ level: embedded AT server uses SIGFOX™ library API(available only when the library is present in embedded software).<br />
<br />
<u>'''When radio level is used'''</u>, no device personalization is required, it is up to AT client application to implement network layer according to the network the device is attached (the module doesn’t know the network).<br />
<br />
<u>'''When LoRa™WAN level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* Whatever the activation type, a 64 bits device unique identifier.<br />
* When Activation By Personalization (ABP) is used:<br />
** An AES128 network security key for MIC computation and encryptionof MAC control commands on port 0.<br />
** An AES128 application security key for encryption of applicationpayloads (not required when data encryption is disabled on themodule).<br />
* When Over The Air Activation (OTAA) is used:<br />
** A 64 bits application unique identifier.<br />
** An AES128 application Key used to derive the network andapplication security keys.<br />
<br />
In first software versions (before 15W40) the module generates unique identifiers and keys, these default LoRa™WAN personalization parameters are modifiable by AT commands. It allows customers to personalize their devices according to the network operator rules.<br />
<br />
In further software versions, modules are personalized with Nemeus OUI during production phase and they can’t be modified. In this case the device unique identifier is read-only and the AES128 keys are hidden. The application unique identifier is still modifiable by AT command.<br />
<br />
<u>'''When SIGFOX™ level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* The read-only device unique identifier.<br />
* The hidden AES128 security key.<br />
* The initial read-only Portability Access Code (PAC).<br />
<br />
Before driving the module, the AT client application must activate the level it wants to use.<br />
<br />
Only one level can be activated at a time.<br />
<br />
When activating a level, a previously activated level is automatically deactivated.<br />
<br />
<br />
[[File:Mm002_serial_diagram.png|center|500px]]<br />
<br><br><br />
For evaluation/test purpose, Nemeus recommends to use NemeusATK java application to drive the module.<br />
<br><br><br />
{{TOC limit|3}}<br />
<br />
== UART configuration ==<br />
<br />
The UART configuration for Modem connection is as follows:<br />
<br />
* Baud Rate : 38400<br />
* Data : 8 bits<br />
* Parity : None<br />
* Stop : 1 bit<br />
* Flow control : None<br />
* End line character : &lt;LF&gt;<br />
<br />
<br><br />
<br><br />
<br />
E.g. Typical configuration given by ‘stty’ command on linux:<br />
<br />
''speed 38400 baud; rows 0; columns 0; line = 0;''<br />
<br />
''intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 = &lt;undef&gt;;swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;flush = ^O; min = 1; time = 0;''<br />
<br />
''-parenb -parodd cs8 hupcl -cstopb cread clocal –crtsct signbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff –iuclc -ixany -imaxbel -iutf8''<br />
<br />
''-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop –echoprt -echoctl -echoke''<br />
<br />
<br><br />
<br />
== AT commands ==<br />
<br />
---- <br />
At command are split according to communication layers. This is a list of main AT commands for SW given in ‘compatibility’ paragraph. The full list and limitation can be found in SW delivery note.<br />
<br />
Formalism is the following:<br />
<br />
<br> <br />
<br><br />
[[File:AT-command-line.png|center]]<br />
<br><br />
<br><br />
<br />
For each group among RF, RFRX, RFTX, MAC and SFX, the command AT+&lt;group&gt;= HELP describes available sub-commands. Example:<br />
<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SET,SCH,RCH,STI,RTI,SRX,RRX,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br />
When a sub-command has parameter, AT+&lt;group&gt;= &lt;cmd&gt;? Describes the parameter list. Example:<br />
<br />
AT+MAC=SNDTXT?<br />
+MAC: SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
OK<br />
<br />
When command is unknown “command not found (‘try help’)” is returned.<br />
<br />
AT commands are not cancelable, thus AT client application must wait for AT response before sending a new command.<br />
<br />
<br><br />
<br />
== Generic Parameter description ==<br />
<br />
---- <br />
Following table describes mains parameters used with AT commands.<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Type'''<br />
<br />
|-<br />
| <br />
'''&lt;mod&gt;'''<br />
<br />
| <br />
Modulation to be use<br />
<br />
| <br />
LORA/FSK<br />
<br />
|-<br />
| <br />
'''&lt;freq&gt;'''<br />
<br />
| <br />
Carrier frequency<br />
<br />
| <br />
Expressed in Hertz *<br />
<br />
|-<br />
| <br />
'''&lt;pwr&gt;'''<br />
<br />
| <br />
Tx power (range depends on Module definition; e.g. MM001 -1dBm to 14dBm)<br />
<br />
| <br />
In dBm *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;bw&gt;'''<br />
<br />
| <br />
Bandwidth from 125kHz to 500 kHz<br />
<br />
| <br />
In Hertz *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;dr&gt;'''<br />
<br />
| <br />
Spreading Factor in LoRa mode<br />
<br />
Data rate in FSK mode<br />
<br />
| <br />
6/7 to 12 *<br />
<br />
In kb/s<br />
<br />
|-<br />
| <br />
'''&lt;cr&gt;'''<br />
<br />
| <br />
Coding Rate (LoRa mode only)<br />
<br />
| <br />
1 to 4<br />
<br />
|-<br />
| <br />
'''&lt;min/maxdr&gt;'''<br />
<br />
| <br />
Data rate range<br />
<br />
| <br />
SF7BW125 to SF12BW125, SF7BW250 or FSK50KBPS<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxcrcon&gt;'''<br />
<br />
| <br />
Flag for CRC check activation in TX or RX<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;preamble&gt;'''<br />
<br />
| <br />
Length of the preamble<br />
<br />
| <br />
6 to 65535<br />
<br />
|-<br />
| <br />
'''&lt;f_dev&gt;'''<br />
<br />
| <br />
Frequency deviation (FSK mode only)<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;fixed_len&gt;'''<br />
<br />
| <br />
When true, PHY payload is constant (no header)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxiqinv'''<br />
<br />
| <br />
Flag for IQ inversion in TX or RX (LoRa mode only)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;rxw1&gt;'''<br />
<br />
| <br />
Delay before RX windows 1<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;rxw2&gt;'''<br />
<br />
| <br />
Delay before RX windows 2 ; NOTE: rx_w2 must be longer than rx_w1.<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;tstamp&gt;'''<br />
<br />
| <br />
Rx ot Tx timestamp<br />
<br />
| <br />
In ticks<br />
<br />
|-<br />
| <br />
'''&lt;symbtimeout&gt;'''<br />
<br />
| <br />
Number of symbols before RX timeout<br />
<br />
| <br />
5 to 1023<br />
<br />
|-<br />
| <br />
'''&lt;port&gt;'''<br />
<br />
| <br />
MAC port<br />
<br />
| <br />
0 to 10<br />
<br />
|-<br />
| <br />
'''&lt;textpayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in ASCII<br />
<br />
| <br />
ASCII string<br />
<br />
|-<br />
| <br />
'''&lt; binarypayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in hexadecimal coded in ASCII<br />
<br />
| <br />
ASCII string containing 0 to F characters<br />
<br />
|-<br />
| <br />
'''&lt;chan&gt;'''<br />
<br />
| <br />
Identifies one of the 8 MAC channels<br />
<br />
| <br />
0 to 7<br />
<br />
|-<br />
| <br />
'''&lt;enable&gt;'''<br />
| <br />
Indicates the status of a channel<br />
|<br />
True or false<br />
|-<br />
| <br />
'''&lt;nbrepeat&gt;'''<br />
| <br />
Number of repetitions when sending a payload.<br />
<br />
At MAC level this parameter indicates if data confirmed must be used or not (0 means unacked mode&gt;).<br />
<br />
| <br />
0 to N<br />
<br />
|-<br />
| <br />
'''&lt;interval&gt;'''<br />
| <br />
Time interval between repetitions<br />
| <br />
In ms<br />
|-<br />
| <br />
'''&lt;hexaddress&gt;'''<br />
| <br />
Address of a registry in hexadecimal<br />
| <br />
<br><br />
|-<br />
| <br />
'''&lt;nbbytes&gt;'''<br />
| <br />
<br><br />
| <br />
0 to 4<br />
|-<br />
| <br />
'''&lt;byteN&gt;'''<br />
| <br />
Byte to write<br />
| <br />
0x00 to 0xFF<br />
|-<br />
| <br />
'''&lt;margin&gt;'''<br />
| <br />
Link demodulation margin above the demodulation floor computed by the nearest gateway<br />
| <br />
0 to 254 in dB<br />
|-<br />
| <br />
'''&lt;gwcnt&gt;'''<br />
| <br />
Number of gateways which received the MAC message<br />
| <br />
1 to N<br />
|-<br />
| <br />
'''&lt;devuid&gt;'''<br />
| <br />
Device unique identifier<br />
| <br />
8 bytes<br />
|-<br />
| <br />
'''&lt;devaddr&gt;'''<br />
| <br />
Device address (4 LSB of &lt;devuid&gt;)<br />
| <br />
4 bytes<br />
|-<br />
| <br />
'''&lt;more&gt;'''<br />
| <br />
Indicates if more downlink data is pending<br />
| <br />
true or false<br />
|-<br />
| <br />
'''&lt;mode&gt;'''<br />
| <br />
LoRa MAC transmission mode<br />
| <br />
0 for confirmed data<br />
not 0 for unconfirmed data<br />
|-<br />
| <br />
'''&lt;rxw1freq&gt;'''<br />
| <br />
Channel frequency used for Rx window 1<br />
<br />
| <br />
In Hz, 0 means same as Tx frequency<br />
<br />
|-<br />
| <br />
'''&lt;eirp&gt;'''<br />
<br />
| <br />
Effective Isotropic Radiated Power received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
In dBm<br />
<br />
|-<br />
| <br />
'''&lt;updwell&gt;'''<br />
<br />
| <br />
Uplink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;dwdwell&gt;'''<br />
<br />
| <br />
Downlink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;backoff&gt;'''<br />
<br />
| <br />
Ack mode retransmission back-off procedure<br />
<br />
| <br />
false means disabled<br />
<br />
true means enabled<br />
<br />
|} <br />
<br><br />
<br />
* Depends on Module in use<br />
<br />
<br><br />
<br />
== Generic Response description ==<br />
<br />
---- <br />
<br><br />
<br />
Every AT command send a response of one of the following types:<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Visible output'''<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
'''Generic'''<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;OK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
OK response<br />
<br />
<br><br />
<br />
| <br />
OK<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response<br />
<br />
<br><br />
<br />
| <br />
ERROR<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR NOACK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response due to a missing ACK<br />
<br />
| <br />
ERROR_NOACK<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+MAC: '''<br />
<br />
| <br />
Response from MAC layer<br />
<br />
<br><br />
<br />
| <br />
+MAC:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFTX: '''<br />
<br />
| <br />
Response from RF layer (TX)<br />
<br />
<br><br />
<br />
| <br />
+RFTX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFRX: '''<br />
<br />
| <br />
Response from RF layer (RX)<br />
<br />
<br><br />
<br />
| <br />
+RFRX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+DEBUG: '''<br />
<br />
| <br />
Response from debug layer<br />
<br />
| <br />
+DEBUG:<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
|} <br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT Generic commands ==<br />
<br />
---- <br />
Intentionally left blank<br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT RF commands ==<br />
<br />
---- <br />
RF commands are dealing with the RF Layer. This layer should be started before using most of RF commands listed in this section (unless stated otherwise).<br />
<br />
3 groups of commands exist:<br />
<br />
* +RF group: commands common to TX and RX functions.<br />
* +RFTX group: commands dedicated to TX functions.<br />
* +RFRX group: commands dedicated to RX functions.<br />
<br><br />
----<br />
=== AT+RF=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RF=HELP<br />
+RF: &lt;cmd&gt;<br />
+RF: &lt;cmd&gt; are ON,OFF,?,RPER,SPER,RSW,SSW<br />
+RF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RF=ON ===<br />
<br />
This command is used to start RF layer (Radio driver) and is mandatory in order to use most of RF commands listed in this section (unless otherwise stated).<br />
<br />
==== Response ====<br />
<br />
ERROR is returned if either LoRa™WAN stack or SIGFOX™ stack is using the radio (Tx or Rx is ongoing).<br />
<br />
Else OK is returned.<br />
<br />
If LoRa™WAN stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
If SIGFOX™ stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
<br><br />
----<br />
=== AT+RF=OFF ===<br />
<br />
This command is used to stop RF layer (Radio driver). After calling this command, most of RF commands listed in this section will return ERROR (unless stated otherwise).<br />
<br />
RF layer stop (Radio driver).<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+RF=? ===<br />
<br />
This command is used to read the current RF layer state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=?<br />
+RF: OFF<br />
OK<br />
<br><br />
----<br />
=== AT+RF=RPER ===<br />
<br />
This command is used to read the Packet Error Rate state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RPER<br />
+RF: false<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SPER, === <br />
This command is used to set the Packet Error Rate state and the power offset<br />
<br />
The following formalism is used. It can be checked by the AT+RF=SPER?command:<br />
<br />
+RF=SPER,&lt;per_state&gt;,&lt;pwroffset&gt;,&lt;loracsoffset&gt;,&lt;fskcsoffset&gt;,&lt;freqcoffset&gt;<br />
<br />
&lt;per_state&gt; PER state, unchanged when absent.<br />
<br />
&lt;pwroffset&gt; is the Power offset<br />
<br />
&lt;loracoffset&gt; is the RSSI Power offset in LoRa (dB)<br />
<br />
&lt;fskcoffset&gt; is the RSSI Power offset in Fsk and Sigfox (dB)<br />
<br />
&lt;freqcoffset&gt; is the frequency offset in Sigfox (Hz) (Available in 17w01 and newer versions)<br />
<br />
<br />
When PER state is true, a counter is added at the beginning of Tx frames. This counter is used on Rx side to compute the Packet Error Rate.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;per_state&gt; is “true”, “false” or omitted.<br />
<br />
ERROR if &lt;per_state&gt; is syntactically incorrect.<br />
<br />
==== Example ====<br />
AT+RF=SPER,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RF=RSW ===<br />
<br />
This command is used to read the current LoRa and FSK synchro words. Synchro words are in hexadecimal format (see formalism on SSW command)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RSW<br />
+RF: 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SSW, === <br />
This command is used to set the synchro words.<br />
<br />
AT+RF=SSW,&lt;LoRa_SyncWord&gt;,&lt;Fsk_SyncWord&gt;<br />
<br />
&lt;LoRa_SyncWord&gt; LoRa Synchro Word (one byte)<br />
<br />
&lt;Fsk_SyncWord&gt; FSK Synchro Word (up to six bytes)<br />
<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+RF=SSW, 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFTX=HELP<br />
+RFTX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFTX: &lt;cmd&gt; are ?,SET,SEND,SNDTXT,SNDBIN,START,STOP<br />
+RFTX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=? ===<br />
<br />
Read TX parameters. This command does not need the RF layer to be ON.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFTX: &lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;<br />
<br />
==== Example ====<br />
AT+RFTX=?<br />
+RFTX : LORA,868100000,14,125000,7,1,true,8,0,false,false,0,0,0,5,false,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SET, === <br />
Write Tx parameters. This command does not need the RF layer to be ON. Only modified parameters can be specified.<br />
<br />
The following formalism is used. It can be checked by the '''''AT+RFTX=SET?''''' command:<br />
<br />
+RFTX= SET,&lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;,&lt;rxaftertx&gt;<br />
<br />
The parameters &lt;symbtimeout&gt;, &lt;rxiqinv&gt; and &lt;rxcrcon&gt; are used only when an Rx window is specified.<br />
<br />
&lt;tstamp&gt; is the absolute clock time of the module. If the time is over, the frame is immediately transmitted. Usually this timestamp is a delay added to an Rx timestamp (feature not fully implemented)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To set the &lt;pwr&gt; to 12 and the &lt;txcrcon&gt; to false:<br />
<br />
AT+RFTX=SET,,,12,,,,false<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RFTX=SEND, (for test purpose) === <br />
Transmit &lt;nb_frames&gt; numbered frames every &lt;interval&gt; ms.<br />
<br />
AT+RFTX= SEND,&lt;nb_frames&gt;,&lt;interval&gt;<br />
<br />
Default values : &lt;nb_frames&gt; = 1, &lt;interval&gt; = 500 (ms).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), transmitted frames contain a counter on 4 bytes followed by a 32 bytes fixed pattern.<br />
<br />
This command is used as a generator for Packet Error Rate (PER) computing.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nb_frames&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SEND,3,500<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=START (for test purpose) ===<br />
<br />
FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=START<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=STOP (for test purpose) ===<br />
<br />
Stop FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDTXT, === <br />
Repeat &lt;nbrepeat&gt; text frames every 500 ms.<br />
<br />
AT+RFTX= SNDTXT,&lt;txt&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat&gt; = 1.<br />
<br />
&lt;txt&gt; parameter is transmitted as received on serial link, the module doesn’t manage any character set.<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SNDTXT,HELLO WORLD,3<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDBIN, === <br />
Repeat &lt;nbrepeat&gt; binary frames every 500 ms.<br />
<br />
AT+RFTX= SNDBIN,&lt;bin&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat &gt; = 1<br />
<br />
&lt;bin&gt; parameter is hexadecimal coded in ASCII (2 ASCII characters for 1 binary byte).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
<br />
To send 2 times the 3 bytes 1A 2B 3C:<br />
<br />
AT+RFTX=SNDBIN,1A2B3C,2<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFRX=HELP<br />
+RFRX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFRX: &lt;cmd&gt; are ?,SET,RECV,START,STOP,CONTRX,LVL<br />
+RFRX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=? ===<br />
<br />
Read RX parameters.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFRX: &lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Example ====<br />
AT+RFRX=?<br />
,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=SET, === <br />
Set Rx parameters. Only modified parameter can be specified.<br />
<br />
The following formalism is used. It can be check by the '''''AT+RFRX=SET?'''''command:&lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
==== Example ====<br />
<br />
To set &lt;dr&gt; parameter to 7:<br />
<br />
AT+RFRX=SET,,,,7<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=RECV (for test purpose) ===<br />
<br />
Single frame reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer comes back to IDLE state after reception or after AT+RFRX=STOP command.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
+RFRX: &lt;per&gt;,&lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
Then, when a frame is received the unsolicited response below is sent:<br />
<br />
If &lt;per_state&gt; is true (see +RF=SPER command):<br />
<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA…<br />
<br />
Where 100% is the PER, -35.00 is the RSSI level, 7.00 is the SNR, 0 is “no CRC error”, 1521551302 is the Rx clock time in ms and 12000000CAFEDECA is the received payload, starting with the 4 bytes counter.<br />
<br />
If &lt;per_state&gt; is false:<br />
<br />
+RFRX: ,-35.00,7.00,0,1521551302,CAFEDECA…<br />
<br />
PER is not displayed and the 4 bytes counter is not present in the payload (it means that Tx device also has &lt;per_state&gt; set to false.<br />
<br />
After frame reception the Rx is automatically stopped.<br />
<br />
==== Example ====<br />
AT+RFRX=RECV<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
<br><br />
----<br />
=== AT+RFRX=START (for test purpose) ===<br />
<br />
Continuous reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer stays in RX until Rx stop command is sent (see AT+RFRX=STOP)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
When a TX has been performed during Reception, An AT+RFRX=STOP command may be needed to avoid ERROR from this command<br />
<br />
After frame reception RF layer stays in RX (RX stop command must be used to leave RX mode).<br />
<br />
==== Example ====<br />
AT+RFRX=START<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
+RFRX: 100%,-32.00,7.00,0,1521554506,13000000CAFEDECA<br />
…<br />
<br><br />
----<br />
=== AT+RFRX=STOP ===<br />
<br />
Stop single or continuous reception.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is in RX.<br />
<br />
ERROR if RF layer is not in RX.<br />
<br />
==== Example ====<br />
AT+RFRX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=CONTRX ===<br />
<br />
Continuous reception without PER computation.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
Then, for each received frame, the unsolicited response below is sent:<br />
<br />
+RFRX: &lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
<br><br />
----<br />
=== AT+RFRX=LVL (for test purpose) ===<br />
<br />
Last reception parameters read (RSSI, SNR)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
Response information is as below:<br />
<br />
+RFRX: LVL,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+RFRX=LVL<br />
+RFRX: LVL,-77.00,8.00<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
<br />
==== LoRa Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency.<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,LORA,,125000,7 <br />
OK<br />
| <br />
:Set some RX parameters. Let the channel to default frequency<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,LORA,868100000,14,125000,7<br />
OK<br />
| <br />
:set Tx modulation LoRa, freq 868100000, Tx power 14dbm, bandwidth 125KHz, SF7<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
==== FSK Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency. For FSK some rules apply on selected "bandwith/datarate" in RX and "frequency deviation/datarate" in TX. This is described in ([[MM002-xx-EU datasheet#Reference|sx1272 datasheet]])<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,FSK,868100000,125000,1200 <br />
OK<br />
| <br />
:Set some RX parameters.freq 868100000,Bandwith 125 000, Datarate 1200<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,FSK,868100000,14,,1200,,,,50000<br />
OK<br />
| <br />
:set Tx modulation FSK, freq 868100000, Tx power 14dbm, Datarate 1200, Deviation Frequency 50 000<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
== AT LoRa™WAN (MAC) commands ==<br />
<br />
---- <br />
3 types of AT strings are specified:<br />
<br />
* MAC commands: AT+MAC=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* MAC solicited responses: +MAC: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to MAC commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the MAC command and the OK response.<br />
* MAC unsolicited responses: +MAC: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the MAC command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+MAC=? to know the current MAC mode (ABP or OTAA, Class A or C).<br />
* AT+MAC=OFF and AT+MAC=ON,… to change the MAC mode.<br />
* AT+MAC=DEVADRR and unsolicited +MAC: DEVADDR,… to know the current state of an OTAA device.<br />
* AT+MAC=SNDBIN,… to send uplink frame.<br />
* +MAC: RCVBIN,… when receiving downlink frames and to know Rx windows termination.<br />
<br />
All other commands are not really required, they are mainly used by NemeusATK Java application to manage the LoRa™WAN layer (for IOT purpose, device provisioning …).<br />
<br />
<br><br />
----<br />
=== AT+MAC=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SCH,RCH,SDR,RDR,STI,RTI,SRX2,RRX2,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=ON, === <br />
This command is used to start LoRa™WAN layer and is mandatory in order to use most of MAC commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
''AT+MAC=ON,&lt;minor_ver&gt;,&lt;class&gt;,&lt;otaa&gt;''<br />
<br />
*&lt;minor_ver&gt; can be 1 or 3 (default is 3 for LoRa™WAN V1.0). V1 is no more maintained.<br />
*&lt;class&gt; is A or C.<br />
*&lt;otaa&gt; is 0 for ABP and 1 for OTAA.<br />
<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
Start LoRa™WAN layer in class A with OTAA:<br />
<br />
AT+MAC=ON,3,A,1<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=OFF ===<br />
<br />
Stop LoRa™WAN layer.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+MAC=? ===<br />
<br />
Read current LoRa™WAN layer status.<br />
<br />
To change LoRa™WAN layer status, AT+MAC=OFF and AT+MAC=ON,… must be performed.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;state&gt;,&lt;minor_ver&gt;,&lt;class&gt;,&lt;ch_pages&gt;,&lt;ism_band&gt;,&lt;otaa&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;minor_ver&gt; can be '''V'''1 or '''V'''3 (default is 3 for LoRa™WAN V1.0).<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;page&gt; is the number of pages of 16 channels available at LoRa™WAN layer (in terms of memory space).<br />
<br />
&lt;ism_band&gt; is 4 for EU433MHz, 7 for China779-787MHz, 8 is EU863-870MHz, 9 for US902-928MHz and 10 for AS923MHz. ISM band can’t be modified dynamically, it is set at compilation time.<br />
<br />
&lt;otaa&gt; is 0 or 2 for ABP and 1 for OTAA (2 means ABP, and OTAA is not supported by the module).<br />
<br />
<br><br />
<br />
==== Example ====<br />
<br />
A class A US902-928MHz device with 80 channels (5*16) which doesn’t support OTAA:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,5,9,2<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+MAC= SNDBIN,&lt;binpyload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application).<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC=SNDBIN,1A2B3C,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVBIN, === <br />
Register for receiving downlink frames on specified port, payload is output as binary hexa string.<br />
<br />
AT+MAC= RCVBIN,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVBIN,&lt;port&gt;,&lt;more&gt;,&lt;binarypayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
The RCVBIN unsolicited response is always sent after a Tx, even if no frame has been received. It indicates the end of Rx windows.<br />
<br />
For a class A device, it is sent when a downlink frame has been received or at the end of the Rx window 2 (if no downlink frame has been received).<br />
<br />
For a class C device, it is sent when a downlink frame has been received or at the end of the Rx window 1 (if no downlink frame has been received).<br />
<br />
If the Tx was in ack mode, the RCVBIN is sent before the OK (or ERROR NOACK) response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
If the Tx was in unack mode, the RCVBIN is sent after the OK response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
==== Example ====<br />
AT+MAC= RCVBIN,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVBIN,2,true,1A2B3C4D,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC=SNDTXT, === <br />
It is the same command as AT+MAC=SNDBIN except that the payload is interpreted as text and is transmitted as received on serial link (no translation from hexa ASCII to hexa binary is performed).<br />
<br />
AT+MAC= SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
Text frame transmission.<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application)<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC= SNDTXT,HELLO WORLD,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVTXT, === <br />
Register for receiving downlink frames on specified port, payload is output as text string (translation to binary hexa string is not performed).<br />
<br />
AT+MAC=RCVTXT,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
'''By default, downlink payload are processed as binary payload, thus if the AT client application needs to receive the payload as text (without any binary hexa string translation), it must uses this command.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVTXT,&lt;port&gt;,&lt;more&gt;,&lt;textpayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
==== Example ====<br />
AT+MAC=RCVTXT,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVTXT,2,true,HELLO WORLD,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC= STOPRCV, === <br />
Unregister for receiving downlink frames on specified port.<br />
<br />
AT+MAC=STOPRCV,&lt;port&gt;<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid.<br />
<br />
ERROR if MAC is OFF or port is invalid.<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+MAC=SNDLCR, === <br />
Send a Link Check Request.<br />
<br />
AT+MAC=SNDLCR,&lt;nbrepeat&gt;<br />
<br />
&lt;nbrepeat&gt; = 0 means the LCR message is sent in unack mode on port 0.<br />
<br />
&lt;nbrepeat&gt; != 0 means the LCR message is sent in ack mode on port 0 with &lt;nbrepeat&gt; transmissions.<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and Link Check Answer has been received.<br />
<br />
ERROR if MAC is OFF or Link Check Answer has not been received and Tx was in unack mode.<br />
<br />
ERROR NOACK if Link Check Answer has not been received and Tx was in ack mode.<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
Received data is sent back as<br />
<br />
+MAC: &lt;margin&gt;,&lt;gwcnt&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+MAC=SNDLCR<br />
+MAC: 20,3,-45.00,8.00<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RCH, === <br />
Read MAC channels command.<br />
<br />
AT+MAC=RCH,&lt;chan&gt;,&lt;page&gt;,&lt;unsol_evt&gt;<br />
<br />
&lt;chan&gt; specifies the channel to read (all channels of the page if omitted or if 16)<br />
<br />
&lt;page&gt; specifies the channel page (all pages if omitted or if number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;unsol_evt&gt; specifies if unsolicited events are required (0 when not required). The unsolicited events inform the AT client application when a MAC parameter has been changed by the LoRa™WAN layer.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
For each channel, the following information is output:<br />
<br />
+MAC: &lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;busytime&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
&lt;chan&gt;: the channel index in the page (0 to 15).<br />
<br />
&lt;frequency&gt;: the frequency in Hz (0 means channel is disabled).<br />
<br />
&lt;mindr&gt;: minimum datarate allowed on the channel.<br />
<br />
&lt;maxdr&gt;: maximum datarate allowed on the channel.<br />
<br />
&lt;dutycycle&gt;: restricted duty cycle assigned to the channel (applies only when more restricted than ISM regulation specification).<br />
<br />
&lt;busytime&gt;: time in ms before the channel can be used again for Tx (due to duty cycle restrictions).<br />
<br />
&lt;page&gt;: channel page (0 to number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;rxw1freq&gt;: frequency used to open Rx window 1. 0 means same frequency as &lt;frequency&gt; parameter (available only from LoRaWAN V1.0.2, if the parameter is absent in the response, it means the firmware version is older).<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when &lt;busytime&gt; changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RCH<br />
+MAC: 0,868100000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 1,868300000,SF12BW125,SF7BW125,100,0,0,869525000<br />
+MAC: 2,868500000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 3,868850000,SF12BW125,SF7BW125,1000,0,0,0<br />
…<br />
+MAC: 15,000000000,SF12BW125,FSK50KBPS,1,0,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SCH, === <br />
Set MAC channel command.<br />
<br />
AT+MAC=SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;min_dr&gt;,&lt;max_dr&gt;,&lt;dutycycle&gt;,&lt;page&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=SCH?'''''Command.<br />
<br />
&lt;dutycycle&gt; is applied only if it is more restricted than the ISM regulation specification. 1 means 100%, 10 means 10%, 100 means 1%, ...<br />
<br />
&lt;rxw1freq&gt; is available only from LoRaWAN V1.0.2<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when LoRa™WAN layer modifies a channel and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
==== Example ====<br />
<br />
To modify channel 0:<br />
<br />
AT+MAC=SCH,0,868100000,SF12BW125,SF7BW125,100,0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC= RDR ===<br />
<br />
Read current MAC datarate command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;,&lt;antennagain&gt;<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt;, &lt;dwdwell&gt; and &lt;antennagain&gt; parameters are present only in case of Asian band firmware<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current datarate changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;,&lt;antennagain&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RDR<br />
+MAC: SF12BW125,11,001F,0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=SDR, === <br />
Set MAC data rate command.<br />
<br />
AT+MAC=SDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;,&lt;antennagain&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
Set the data rate, Tx power and number of repetitions for uplink transmission (applied to all channels compatible with the datarate). &lt;nbrep&gt; applies only to unconfirmed transmissions.<br />
<br />
&lt;chanmask&gt; and &lt;chanmaskctrl&gt; specify the channels usable for uplink access.<br />
<br />
The parameter list can be found by '''''AT+MAC=SDR?'''''Command.<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt;, &lt;dwdwell&gt; and &lt;antennagain&gt; parameters are present only in case of Asian band.<br />
<br />
Programmed Tx power = &lt;eirp&gt; - 2*TxPower - &lt;antennagain&gt; (TxPower is described in LoRaWANRegionalParameters specification: 0=>MaxEIRP, 1=>MaxEIRP-2dB, ...)<br />
<br />
Because of SX1272 hardware, Tx power = 13 dBm is never programmed, 14 dBm is set instead.<br />
<br />
Thus when &lt;eirp&gt; = 16 and &lt;antennagain&gt; = 3 then computed Tx power = 13 dBm but programmed Tx power = 14 dBm<br />
<br />
The maximum Tx power supported by the standard version of MM002 is 14 dBm, so when (&lt;eirp&gt; - &lt;antennagain&gt;) > 14 dBm then 14 dBm is programmed<br />
<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify current datarate:<br />
<br />
AT+MAC=SDR,SF12BW125,10,001F,0,0<br />
<br />
<br><br />
<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=RTI ===<br />
<br />
Read MAC Time Information command.<br />
<br />
Read common channel time information.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current time info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RTI,&lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Example ====<br />
AT+MAC= RTI<br />
+MAC: 1000,2000,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC= STI, === <br />
Set MAC time information command.<br />
<br />
AT+MAC=STI,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;symbtimeout&gt;<br />
<br />
Only modified parameter can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=STI?'''''Command.<br />
<br />
The parameters &lt;rxw1&gt; and &lt;symbtimeout&gt; are common to all channels.<br />
<br />
The &lt;''rxw2''&gt; parameter is no more used because &lt;''rxw2''&gt; value is set to &lt;rxw1&gt; value + 1000 ms. It is still present for compatibility with old devices.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To modify time info:<br />
<br />
AT+MAC=STI,1000,,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RRX ===<br />
<br />
Read MAC Rx information command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current Rx info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RRX,&lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RRX<br />
+MAC: 869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SRX, === <br />
Set MAC Rx information command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SRX?'''''Command.<br />
<br />
The parameters are common to all channels.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify Rx parameters:<br />
<br />
AT+MAC=SRX,869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RSW ===<br />
<br />
This command is used to read the current LoRa™ and FSK synchro words used by LoRa™WAN layer. Synchro words are in hexadecimal format.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;LoRa™ sync_word&gt;,&lt;FSK sync_word&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RSW<br />
+MAC: 34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SSW, === <br />
This command is used to set the synchro words used by LoRa™WAN layer.<br />
<br />
AT+MAC=SSW,&lt;LoRaSyncWord&gt;,&lt;FskSyncWord&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
Synchro words are in hexadecimal.<br />
<br />
The parameter list can be found by '''''AT+MAC=SSW?'''''Command.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+MAC=SSW,34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RVAR ===<br />
<br />
This command is used to read the miscellaneous LoRa™WAN variables.<br />
<br />
This variables are Tx/Rx counters, aggregated DC and data encryption.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;txcounter&gt;,&lt;rxcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
&lt;aggregateddc&gt; values: 1 means 100%, 10 means 10%, 100 means 1%, …<br />
<br />
&lt;encryption&gt; values: 0 means no encryption, != 0 means encryption enabled.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent only when current aggregated DC changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RVAR,,,&lt;aggregateddc&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RVAR<br />
+MAC: 0,0,1,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SVAR, === <br />
This command is used to set some LoRa™WAN variables.<br />
<br />
AT+MAC=SVAR,&lt;txcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SVAR?'''''Command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To disable encryption:<br />
<br />
AT+MAC=SVAR,,,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RADR ===<br />
<br />
This command is used to read the current LoRa™WAN ADR, piggyback and back-off states.<br />
<br />
'''The ack mode retransmission back-off procedure was initially linked to ADR bit. When ADR bit was on/off, the back-off procedure was on/off. From now, the back-off procedure is linked to the back-off state, it allows to enable ADR bit without enabling the back-off procedure. If &lt;backoff&gt; parameter is absent in RADR response, it means that back-off procedure is still linked to ADR bit (older firmware version).'''<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
&lt;adr&gt;, &lt;piggyback&gt; and &lt;backoff&gt; values: true or false.<br />
<br />
==== Example ====<br />
AT+MAC=RADR<br />
+MAC: true,false,false<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SADR, === <br />
This command is used to set some LoRa™WAN ADR and piggyback states.<br />
<br />
AT+MAC=SADR,&lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SADR?'''''Command.<br />
<br />
When ADR state value is changed, ADR ack counter is reset.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct.<br />
<br />
==== Example ====<br />
<br />
To enable piggyback:<br />
<br />
AT+MAC=SADR,,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=RDEVUID ===<br />
<br />
Read device unique identifier.<br />
<br />
Device UID is coded on 8 bytes.<br />
<br />
''This command obsoletes AT+MAC=DEVUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
UID is returned as<br />
<br />
+MAC: &lt;devuid&gt;,&lt;rand_seed&gt;,&lt;read_only&gt;<br />
<br />
When read_only value is 1, it means that the device unique identifier is built from Nemeus 36 bits OUI (70B3D5326xxxxxxx). In this case the device UID can’t be modified and the security keys are not readable.<br />
<br />
==== Example ====<br />
AT+MAC=RDEVUID<br />
0010203,306A0327,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVADDR ===<br />
<br />
Read device address.<br />
<br />
''This command obsoletes AT+MAC=DEVADDR command.''<br />
<br />
''Old command still works and returns the same solicited response.''<br />
<br />
''Warning: unsolicited response changed, old one is no more sent!!!''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Address is returned as<br />
<br />
+MAC: &lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
In ABP mode, the device address is the 4 LSB of the device unique identifier.<br />
<br />
In OTAA mode, the device address is assigned by the network.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when device is in OTAA mode and at least one AT+MAC=? command has been sent.<br />
<br />
+MAC: RDEVADDR,&lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
==== Example ====<br />
<br />
Read device address of an OTAA device when not yet joint to network:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
<br />
After receipt of valid join accept, unsolicited response is sent:<br />
<br />
DEVADDR,0870C367,010203 <br />
<br><br />
----<br />
=== AT+MAC=SDEVADDR, === <br />
This command is used to modify device address when ABP mode is used.<br />
<br />
AT+MAC=SDEVADDR,&lt;devaddr&gt;<br />
<br />
If MAC layer is on in ABP mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devaddr&gt; length is 8 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVADDR,01020304<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPUID ===<br />
<br />
Read application Unique ID.<br />
<br />
Application UID is coded on 8 bytes.<br />
<br />
By default it is set to 0000000000000000.<br />
<br />
It can be modified by sending the following AT command:<br />
<br />
AT+GA=DIND,1,8301000008xxxxxxxxxxxxxxxx0000<br />
<br />
Where xxxxxxxxxxxxxxxx is the new application UID LSB first.<br />
<br />
MAC layer must be restarted to take into account new application UID (AT+MAC=OFF and AT+MAC=ON).<br />
<br />
Application UID can also be modified using AT+MAC=SAPPUID,&lt;app_uid&gt;.<br />
<br />
''This command obsoletes AT+MAC=APPUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Application UID is returned as<br />
<br />
+MAC: &lt;appuid&gt;<br />
<br />
==== Example ====<br />
<br />
Read default application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: 0000000000000000<br />
OK<br />
<br />
Set application UID to FEDCBA9876543210:<br />
<br />
0000<br />
OK<br />
<br />
Restart MAC layer:<br />
<br />
AT+MAC=OFF<br />
OK<br />
AT+MAC=ON<br />
OK<br />
<br />
Read new application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: FEDCBA9876543210<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SAPPUID, === <br />
This command is used to modify application UID.<br />
<br />
AT+MAC=SAPPUID,&lt;appuid&gt;<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;appuid&gt; length is 16 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SAPPUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPKEY ===<br />
<br />
Read application key.<br />
<br />
Application Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPKEY command.''<br />
<br />
''Old command still works and returns the &lt;appkey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application key is returned as<br />
<br />
+MAC: &lt;appkey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPKEY<br />
+MAC: A8FA642E2E3245BB9B8CAC7E2456EF3C<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPKEY<br />
+MAC: 3CEF56247EAC8C9BBB45322E2E64FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RNSKEY ===<br />
<br />
Read Network Session Key.<br />
<br />
Network Session Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=NSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=NSKEY command.''<br />
<br />
''Old command still works and returns the &lt;nskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Network session key is returned as<br />
<br />
+MAC: &lt;nskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RNSKEY<br />
+MAC: A8F1642E2E32453B9B8CAC7C2456EF72<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=NSKEY<br />
+MAC: 72EF56247CAC8C9B3B45322E2E64F1A8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPSKEY ===<br />
<br />
Read application session key.<br />
<br />
Application session key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPSKEY command.''<br />
<br />
''Old command still works and returns the &lt;appskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application session key is returned as<br />
<br />
+MAC: &lt;appskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPSKEY<br />
+MAC: A8FA672E2E4245BB9ECCCA7E64F54C38<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPSKEY<br />
+MAC: 384CF5647ECACC9EBB45422E2E67FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RMC ===<br />
<br />
Read MultiCast parameters. <span style="color:red">Multicast is only available from master18Wxx</span>.<br />
<br />
==== Response ====<br />
<br />
OK when the command is supported by the firmware.<br />
<br />
ERROR when it is not supported.<br />
<br />
Multicast parameters are returned as<br />
<br />
+MAC: &lt;addr&gt;,&lt;addr_mask&gt;,&lt;group_mask&gt;,&lt;fcnt_dw&gt;,&lt;net_skey&gt;,&lt;app_skey&gt;<br />
<br />
- &lt;addr&gt;: the multicast address (32 bits)<br />
- &lt;addr_mask&gt;: the significant part of the multicast address (More Significant bits) coded on 32 bits.<br />
- &lt;group_mask&gt;: the groups the device can receive (32 bits => groups 0 to 31).<br />
- &lt;fcnt_dw&gt;: the current value of the downlink frame counter (32 bits).<br />
- &lt;net_skey&gt;: the network security key for integrity checking (128 bits).<br />
- &lt;app_skey&gt;: the application security key for payload ciphering (128 bits).<br />
<br />
The address mask specifies which part of the received address is processed as an address and which part is processed as a group.<br />
The address mask can take the following values:<br />
- 0x00000000: the multicast function is disabled<br />
- 0xFFFFFFFF: only 1 group is possible<br />
- 0xFFFFFFFE: 2 groups are possible<br />
- 0xFFFFFFFC: 4 groups are possible<br />
- 0xFFFFFFF8: 8 groups are possible<br />
- 0xFFFFFFF0: 16 groups are possible<br />
- 0xFFFFFFE0: 32 groups are possible<br />
<br />
==== Example ====<br />
AT+MAC=RMC<br />
+MAC: 789ABCDE,FFFFFFFC,00000007,0,0102030405060708090A0B0C0D0E0F00,0102030405060708090A0B0C0D0E0F00<br />
OK<br />
With such parameters, the following received addresses are processed:<br />
- 0x789ABCDC: valid multicast address, group 0 is accepted because bit0 of group mask is set<br />
- 0x789ABCDD: valid multicast address, group 1 is accepted because bit1 of group mask is set<br />
- 0x789ABCDE: valid multicast address, group 2 is accepted because bit2 of group mask is set<br />
- 0x789ABCDF: valid multicast address, group 3 is rejected because bit3 of group mask is not set<br />
When the address is accepted (valid multicast address and accepted group) then the MIC is computed thanks to network security key.<br />
If the computed MIC matches with the received MIC then the payload is deciphered thanks to application security key and the resulting payload is pushed to the application addressed by the LoRaWAN port.<br />
<br />
<br><br />
----<br />
<br />
=== AT+MAC=SMC ===<br />
<br />
Set MultiCast parameters. <span style="color:red">Multicast is only available from master18Wxx</span>.<br />
AT+MAC=SMC,&lt;addr&gt;,&lt;addr_mask&gt;,&lt;group_mask&gt;,&lt;fcnt_dw&gt;,&lt;net_skey&gt;,&lt;app_skey&gt;<br />
See AT+MAC=RMC for parameter description.<br />
<br />
'''The multicast parameters are not saved in non volatile memory, thus they are lost after a cold reset (reset pin or power-cycle).'''<br />
<br />
==== Response ====<br />
<br />
OK when the command is supported by the firmware and the parameters are valid.<br />
<br />
ERROR when it is not supported or parameters are invalid (especially &lt;group_mask&gt; parameter which can take 7 different values).<br />
<br />
<br />
==== Example ====<br />
AT+MAC=SMC,789ABCDE,FFFFFFFC,00000007,0,0102030405060708090A0B0C0D0E0F00,0102030405060708090A0B0C0D0E0F00<br />
OK<br />
<br />
<br><br />
----<br />
<br />
=== Informative examples ===<br />
==== Device start ====<br />
<br />
AT client application can detect a device start or restart when the unsolicited response +DEBUG: START,&lt;version&gt; is received. Depending on initialization timing, AT client application is not sure to receive this unsolicited response, that’s the reason why it is recommended that AT client application use AT+MAC=? command to synchronize with the device.<br />
<br />
<br><br />
<br />
<u>'''OTAA case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
+MAC: RDEVADDR,0870C367,010203 <br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<u>'''ABP case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,0 <br />
OK<br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<br><br />
<br />
==== Send unconfirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''No downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
AT+MAC=SNDBIN,,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
==== Send confirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''Ack received, no downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,0,false,,-60.00,7.00 <br />
OK <br />
<br />
<u>'''Ack not received:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
ERROR NOACK <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
OK <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
AT+MAC=SNDBIN,,0,2,1 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
OK <br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT SIGFOX™ commands ==<br />
<br />
---- <br />
These commands are available only on Nemeus modules embedding SIGFOX™ library. If the library is not embedded then ERROR is returned.<br />
<br />
3 type of AT strings are specified:<br />
<br />
* SF commands: AT+SF=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* SF solicited responses: +SF: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to SF commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the SF command and the OK response.<br />
* SF unsolicited responses: +SF: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the SF command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+SF=? to know the current SIGFOX™ layer state.<br />
* AT+SF=OFF and AT+SF=ON to stop and start SIGFOX™ layer.<br />
* AT+SF=SNDBIN,… to send uplink frame.<br />
* AT+SF=SNDBIT,… to send uplink bit.<br />
* AT+SF=SNDOOB to send uplink out of band message (keep alive messages).<br />
* +SF: RCVBIN,… when receiving downlink frames.<br />
<br />
All other commands are not really required, they are mainly used to configure SIGFOX™ layer and to perform SIGFOX™ qualification tests.<br />
<br />
SIGFOX™ proprietary AT command set is also supported but not described in this document.<br />
<br />
<br><br />
----<br />
=== AT+SF=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+SF=HELP<br />
+SF: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+SF: &lt;cmd&gt; are ON,OFF,?,SNDBIN,SNDBIT,SNDOOB,SREP,RREP,STXF,RTXF,SRXF,RRXF,STXP,RTXP<br />
+SF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+SF=ON ===<br />
<br />
This command is used to start SIGFOX™ layer and is mandatory in order to use most of SF commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
==== Response ====<br />
<br />
If LoRa™WAN stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=ON<br />
OK<br />
<br><br />
----<br />
=== AT+SF=OFF ===<br />
<br />
Stop SIGFOX™ layer.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=OFF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=? ===<br />
<br />
Read current SIGFOX™ layer status.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ library is embedded OK is returned.<br />
<br />
Else ERROR is returned.<br />
<br />
+SF: &lt;state&gt;,&lt;NMS_lib_ver&gt;,&lt;SFX_lib_ver&gt;,&lt;dev_id&gt;,&lt;initial_pac&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;NMS_lib_ver&gt; is the version of Nemeus library used to communicate with SIGFOX™ network.<br />
<br />
&lt;SFX_lib_ver&gt; is the version of SIGFOX™ library.<br />
<br />
&lt;dev_id&gt; is the device unique identifier on SIGFOX™ network.<br />
<br />
&lt;initial_pac&gt; is the first Portability Access Code used to register the device on SIGFOX™ network. It is used one time for first registration.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=?<br />
+SF: ON,NMS-SFX-LIB-1.2,UDL1-1.6.0,000ABCDE,0123456789ABCDEF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+SF=SNDBIN,&lt;binpayload&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the frame is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the frame is sent in acknowledged mode.<br />
<br />
The frame is sent when channel becomes free regarding duty cycle limitations.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIN,CAFE,1<br />
+SF: SND,4576<br />
+SF: SND,0<br />
+SF: 6282<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDBIT, === <br />
Bit transmission.<br />
<br />
AT+SF=SNDBIT,&lt;bitvalue&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the bit is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the bit is sent in acknowledged mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIT,0,1<br />
+SF: SND,6422<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDOOB ===<br />
<br />
Out Of Band message transmission.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it can be used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent.<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent.<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
==== Example ====<br />
AT+SF=SNDOOB<br />
+SF: SND,3987<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
<br><br />
----<br />
=== AT+SF=RREP ===<br />
<br />
Read Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;repeat&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 2 repetitions.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RREP<br />
+SF: 2<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SREP, === <br />
<br />
Set Tx repetitions used in acked mode.<br />
<br />
AT+SF=SREP,&lt;repeatnb&gt;<br />
<br />
==== Response ====<br />
<br />
Default value is 2 repetitions.<br />
<br />
OK if number of repetitions &lt;= 2.<br />
<br />
ERROR if number of repetitions &gt; 2.<br />
<br />
==== Example ====<br />
AT+SF=SREP,1<br />
OK<br />
AT+SF=SREP,3<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXF ===<br />
<br />
Read output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 868130000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXF<br />
+SF: 868130000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXF, === <br />
Set output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= tx_frequency &lt;= 870000000.<br />
<br />
ERROR if tx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=STXF,868200000<br />
OK<br />
AT+SF=STXF,862200000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RRXF ===<br />
<br />
Read reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;rx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 869525000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RRXF<br />
+SF: 869525000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SRXF, === <br />
Set reception carrier macro channel.<br />
<br />
AT+SF=SRXF,&lt;rx_frequency&gt;<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= rx_frequency &lt;= 870000000.<br />
<br />
ERROR if rx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=SRXF,869525000<br />
OK<br />
AT+SF=SRXF,869525000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXP (for test purpose) ===<br />
<br />
Read Tx power applied to FSK continuous wave<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_power&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 14 dBm.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXP<br />
+SF: 14<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SF=STXP (for test purpose) === <br />
Set Tx power applied to FSK continuous wave<br />
<br />
==== Response ====<br />
<br />
OK if tx_power &lt;= 14 dBm.<br />
<br />
ERROR if tx_power &gt; 14 dBm.<br />
<br />
==== Example ====<br />
AT+SF=STXP,10<br />
OK<br />
AT+SF=STXP,20<br />
ERROR<br />
<br />
<br><br />
<br />
== AT Generic command ==<br />
<br />
---- <br />
AT Generic command can be used to activate/deactivate some generic functionalities.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8801 ===<br />
<br />
This command is use to know the status of PowerSaving.<br />
<br />
==== Response ====<br />
<br />
+GA : DIND,1,0801&lt;pwr_state&gt;<br />
<br />
Always OK.<br />
<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,8801<br />
<br />
+GA : DIND,1,080100<br />
<br />
OK.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8802&lt;pwr_state&gt; ===<br />
<br><br />
'''WARNING: CONNECT CORRECTLY THE WAKEUP PIN BEFORE ACTIVATION OF POWERSAVING'''<br />
<br><br />
This command is use to set the PowerSaving.<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
PowerSaving can be activated once after boot-up, and from this point will go in stop mode as soon as possible and is wake-up by RTC or Wakeup pin.<br />
Please note that once power-saving is activated, user should toggle wake-up pin before sending an AT command.<br />
<br />
If the module is reset, the powersaving is set back to OFF. So User should ensure setting it to ON after any reset<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,880201<br />
<br />
OK<br />
<br />
<br><br />
----<br />
<br />
== AT debug command ==<br />
<br />
---- <br />
AT debug command can be used to activate/deactivate some debug functionalities.<br />
<br />
<br><br />
----<br />
=== AT+DEBUG= HELP ===<br />
<br />
This commandis use to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= HELP<br />
+DEBUG: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+DEBUG: &lt;cmd&gt; are MVER,MVOFF,MVON,MV?,MEOFF,MEON,ME?,MPOFF,MPON,MP?,RREAD,RWRITE<br />
+DEBUG: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG=MVER ===<br />
<br />
Read Mcu software version.<br />
<br />
Furthermore, when the device boots the software version is sent as an unsolicited response:<br />
<br />
+DEBUG: START,&lt;version&gt;<br />
<br />
This unsolicited response can be used to detect a reset of the device.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: MVER,&lt;version&gt;<br />
<br />
==== Example ====<br />
<br />
AT boot:<br />
<br />
+DEBUG: START,Nemeus 1.x<br />
<br />
When requested:<br />
<br />
AT+DEBUG= MVER<br />
+DEBUG: MVER,Nemeus 1.x<br />
OK<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+DEBUG= MVOFF ===<br />
<br />
Disable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MVON ===<br />
<br />
Enable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
OK if software is compiled with debug traces.<br />
<br />
ERROR if software is compiled without debug traces.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MV? ===<br />
<br />
Read current verbose mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;verbose&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MV?<br />
+DEBUG: MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEOFF ===<br />
<br />
Disable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEON ===<br />
<br />
Enable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= ME? ===<br />
<br />
Read current echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;echo&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= ME?<br />
+DEBUG: MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPOFF ===<br />
<br />
Disable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPON ===<br />
<br />
Enable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MP? ===<br />
<br />
Read current prompt mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;prompt&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MP?<br />
+DEBUG: MPON<br />
OK<br />
<br />
== AT Static Context Header Compression (SCHC) command ==<br />
<br />
---- <br />
AT SCHC command can be used to communicate through Acklio IPCore network.<br />
Currently, the default firmware doesn't support SCHC command.<br />
<br />
<br><br />
----<br />
=== AT+SCHC=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+SCHC=HELP<br />
+SCHC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+SCHC: &lt;cmd&gt; are VER,RL2,SL2,RSTATE,SSTATE,SOCKET,RSOCKET,CLOSE,BIND,SENDTO<br />
+SCHC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SCHC=VER ===<br />
<br />
Read version of SCHC stack.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br><br />
+SCHC: &lt;version&gt;<br />
&lt;version&gt;: the library version<br />
<br><br />
<br />
==== Example ====<br />
AT+SCHC=VER<br />
+SCHC: 2.0.0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SCHC=RL2 ===<br />
<br />
Read available L2 which can be used by SCHC stack.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br><br />
For each LoRaWAN L2:<br />
<br><br />
+SCHC: &lt;l2_id&gt;,&lt;l2_type&gt;,&lt;join_chan_mask&gt;,&lt;join_dr&gt;,&lt;first_dr&gt;,&lt;adr&gt;,&lt;nb_trans&gt;,&lt;piggyback&gt;,&lt;backoff&gt;,&lt;force_dr&gt;,&lt;ack&gt;,&lt;class_c&gt;<br />
&lt;l2_id&gt;: the identifier which addresses the L2<br />
&lt;l2_type&gt;: 0 for LoRaWAN<br />
&lt;join_chan_mask&gt;: channels used by join procedure 0 for ABP mode, 1 for 868.1 channel, 2 for 868.3 channel, 4 for 868.5 channel, 7 for all default channels<br />
&lt;join_dr&gt;: data rate to start the join procedure (0 to 5)<br />
&lt;first_dr&gt;: data rate of the first uplink frame sent after the join procedure<br />
&lt;adr&gt;: ADR bit (0 or 1)<br />
&lt;nb_trans&gt;: number of transmissions of unconfirmed frames (0 to 15)<br />
&lt;piggyback&gt;: piggyback enable(1)/disable(0)<br />
&lt;backoff&gt;: backoff when confirmed frames are unacked enable(1)/disable(0)<br />
&lt;force_dr&gt;: forced data rate (15 means do not force, use current one)<br />
&lt;ack&gt;: ack mode enable(1)/disable(0)<br />
&lt;class_c&gt;: device class C enable(1)/disable(0)<br />
<br><br />
For Sigfox L2:<br />
<br><br />
Not yet available<br />
<br />
==== Example ====<br />
AT+SCHC=RL2<br />
+SCHC: 0,0,7,0,15,1,0,0,0,15,0,1<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SCHC=SL2 ===<br />
<br />
Set L2 parameters.<br />
<br><br />
For a LoRaWAN L2:<br />
<br><br />
AT+SCHC=SL2,&lt;l2_id&gt;,&lt;join_chan_mask&gt;,&lt;join_dr&gt;,&lt;first_dr&gt;,&lt;adr&gt;,&lt;nb_trans&gt;,&lt;piggyback&gt;,&lt;backoff&gt;,&lt;force_dr&gt;,&lt;ack&gt;,&lt;class_c&gt;<br />
<br><br />
For Sigfox L2:<br />
<br><br />
Not yet available<br />
<br />
<br />
==== Response ====<br />
<br />
OK when all specified parameters are valid.<br />
<br />
==== Example ====<br />
AT+SCHC=SL2,0,7,0,15,1,0,0,0,15,0,1<br />
OK<br />
----<br />
<br />
=== AT+SCHC=RSTATE ===<br />
<br />
Read current state of SCHC stack.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br><br />
Response to command:<br />
<br><br />
+SCHC: &lt;r_state&gt;,&lt;l2_id&gt;<br />
&lt;r_state&gt;: the current SCHC stack state: 0 when stack is off, 1 when stack is initializing (joining when LoRaWAN L2), 2 when stack is idle, 3 when stack is transmitting<br />
&lt;l2_id&gt;: the L2 used by SCHC stack<br />
Unsolicited response (when stack state changes):<br />
<br><br />
+SCHC: RSTATE,&lt;r_state&gt;,&lt;l2_id&gt;<br />
<br />
==== Example ====<br />
AT+SCHC=RSTATE<br />
+SCHC: 0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SCHC=SSTATE ===<br />
<br />
Set state of SCHC stack.<br />
AT+SCHC=SSTATE,&lt;s_state&gt;,&lt;l2_id&gt;<br />
&lt;s_state&gt;: the requested SCHC stack state: 0 to switch-off the stack, 1 to initialize the stack<br />
&lt;l2_id&gt;: the L2 the SCHC stack must use<br />
<br />
==== Response ====<br />
<br />
OK when all specified parameters are valid.<br />
<br><br />
Unsolicited response (when stack state changes):<br />
<br><br />
+SCHC: RSTATE,&lt;r_state&gt;,&lt;l2_id&gt;<br />
<br />
==== Example ====<br />
Switch-on the stack with l2_id 0<br />
AT+SCHC=SSTATE,1,0<br />
OK<br />
+SCHC: RSTATE,1,0<br />
+SCHC: RSTATE,2,0<br />
Switch-off the stack<br />
AT+SCHC=SSTATE,0<br />
OK<br />
+SCHC: RSTATE,0,0<br />
<br><br />
----<br />
<br />
=== AT+SCHC=SOCKET ===<br />
<br />
Create a socket.<br />
<br><br />
AT+SCHC=SOCKET,&lt;ip_version&gt;,&lt;compression&gt;<br />
&lt;ip_version&gt;: 4 for IPv4, 6 for IPv6<br />
&lt;compression&gt;: NONE for no compression, LIGHT for light compression, FULL for full compression<br />
<br />
==== Response ====<br />
<br />
OK when all specified parameters are valid, maximum number of sockets (1) is not reached and SCHC stack is on.<br />
<br><br />
Response to command:<br />
<br><br />
+SCHC: &lt;sock_id&gt;<br />
&lt;sock_id&gt;: the socket identifier<br />
<br />
==== Example ====<br />
AT+SCHC=SOCKET,6,FULL<br />
+SCHC: 0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SCHC=RSOCKET ===<br />
<br />
List all created sockets.<br />
<br><br />
AT+SCHC=RSOCKET<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br><br />
Response to command:<br />
<br><br />
For each socket:<br />
<br><br />
+SCHC: &lt;sock_id&gt;,&lt;ip_addr&gt;,&lt;port&gt;,&lt;compression&gt;<br />
&lt;sock_id&gt;: the socket identifier<br />
&lt;ip_addr&gt;: the bound IP address (32 characters for IPv6 and 8 characters for IPv4)<br />
&lt;compression&gt;: NONE, LIGHT or FULL<br />
<br />
==== Example ====<br />
AT+SCHC=RSOCKET<br />
+SCHC: 0,01020304,CDDC,LIGHT<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SCHC=BIND ===<br />
<br />
Bind a socket on local IP address and port.<br />
AT+SCHC=BIND,&lt;sock_id&gt;,&lt;ip_addr&gt;,&lt;port&gt;<br />
&lt;sock_id&gt;: the socket identifier<br />
&lt;ip_addr&gt;: the IP address to bind (32 characters for IPv6 and 8 characters for IPv4)<br />
&lt;port&gt;: the port to bind<br />
<br />
==== Response ====<br />
<br />
OK when all specified parameters are valid and the addressed socket exists<br />
<br><br />
<br />
==== Example ====<br />
AT+SCHC=BIND,0,01020304,CDDC<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SCHC=CLOSE ===<br />
<br />
Close a socket.<br />
AT+SCHC=CLOSE,&lt;sock_id&gt;<br />
&lt;sock_id&gt;: the socket identifier<br />
<br />
==== Response ====<br />
<br />
OK when the addressed socket exists<br />
<br><br />
<br />
==== Example ====<br />
AT+SCHC=CLOSE,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SCHC=SENDTO ===<br />
<br />
Send a frame on a socket.<br />
AT+SCHC=SENDTO,&lt;sock_id&gt;,&lt;dest_ip_addr&gt;,&lt;dest_port&gt;,&lt;payload&gt;<br />
&lt;sock_id&gt;: the socket identifier<br />
&lt;dest_ip_addr&gt;: destination IP address (32 or 8 characters)<br />
&lt;dest_port&gt;: destination port (4 characters)<br />
&lt;payload&gt;: the payload to send (hexa string)<br />
<br />
==== Response ====<br />
<br />
OK when the addressed socket exists, there is no ongoing transmission and the transmission succeeded<br />
<br><br />
Unsolicited response (when downlink payload is received):<br />
<br><br />
+SCHC: RCVFROM,&lt;sock_id&gt;,&lt;src_ip_addr&gt;,&lt;src_port&gt;,&lt;payload&gt;<br />
&lt;sock_id&gt;: the socket identifier<br />
&lt;src_ip_addr&gt;: source IP address (32 or 8 characters)<br />
&lt;src_port&gt;: source port (4 characters)<br />
&lt;payload&gt;: the received payload (hexa string)<br />
<br />
==== Example ====<br />
AT+SCHC=SENDTO,0,01020304,FDDF,CAFEDECA<br />
+SCHC: RSTATE,3,0<br />
+SCHC: RSTATE,2,0<br />
OK<br />
+SCHC: RCVFROM,0,01020304,FDDF,CAFECAFE<br />
<br></div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_Nemeus_Multicast_Overview&diff=358Application Note: Nemeus Multicast Overview2019-02-18T16:07:16Z<p>Lcs: </p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
[[Category:Gateways]]<br />
[[Category:Application Notes]]<br />
<br />
Purpose of this Application Note is to help engineer to integrate Nemeus Multicast Mechanism. This Application Note is valid for all MM002-xx-EU [[:Category:Modules |Modules]] and MG003 [[:Category:Gateways |Gateways]] from 18W41.<br />
<br /><br />
<br />
<br />
= LoRaWan Multicast = <br />
<br />
When a device network contain devices that should get same information from server it could be useful to perform multicast, that is sending same payload to several devices in one shot. Of course, all device should listen, so multicast should be done whit class C devices. <br />
<br />
= Nemeus Implementation =<br />
<br />
Nemeus Multicast adress can be defined with following formalism:<br />
0xFFFFFFFFxxxxxxxx<br />
<br />
For the device configuration only the 4 LSB are used<br />
<br />
The five less significant bits could be used to manage up to 32 groups and should be set/unset as follow:<br />
* 1 1111 : 1 group available <br />
* 1 1110 : 2 groups available <br />
* 1 1100 : 4 groups available <br />
* 1 1000 : 8 groups available <br />
* 1 0000 : 16 groups available <br />
* 0 0000 : 32 groups available <br />
<br />
<br />
= Example with two devices with multicast on 4 groups =<br />
<br />
Multicast Adress : FFFFFFFF789ABCDC (4 groups)<br><br />
nwk_skey : 0102030405060708090A0B0C0D0E0FCA<br><br />
apps_key : 0102030405060708090A0B0C0D0E0F00<br><br />
Device 1 in group 0 (bit 0 set in the mask => 0x1))<br><br />
Device 2 in group 3 (bit 3 set in the mask => 0x8)<br><br />
Device 3 in group 1 and 3 (bit 1 and bit 3 set in the mask => 0xA)<br><br />
<br />
<br />
== Devices configuration ==<br />
<br />
Device #1<br />
AT+MAC=SMC,789ABCDC,FFFFFFFC,00000001,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #2<br />
AT+MAC=SMC,789ABCDC,FFFFFFFC,00000008,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #3<br />
AT+MAC=SMC,789ABCDC,FFFFFFFC,0000000A,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
<br />
<pre style="color: red">Please Note that to behave correctly, the device must have sent at least one payload to the gateway </pre><br />
<br />
== Gateway configuration ==<br />
<br />
First we need to add a specific device that will represent the multicast channel:<br />
<br /><br /><br />
<br />
[[File:Multicast add device.png | Multicast add device]]<br />
<br />
<br /><br /><br />
We can see now in devices list our 'devices' along with the multicast virtual device:<br />
<br /><br /><br />
<br />
[[File:Multicast devices list.png |Multicast devices list]]<br />
<br />
<br /><br /><br />
We can send the data via the virtual device context:<br />
<br /><br /><br />
<br />
[[File:Multicast device context.png|Multicast Context]]<br />
<br />
In this example only device # 3 will receive the data</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_Nemeus_Multicast_Overview&diff=357Application Note: Nemeus Multicast Overview2019-02-18T15:27:56Z<p>Lcs: /* Example with two devices with multicast on 4 groups */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
[[Category:Gateways]]<br />
[[Category:Application Notes]]<br />
<br />
Purpose of this Application Note is to help engineer to integrate Nemeus Multicast Mechanism. This Application Note is valid for all MM002-xx-EU [[:Category:Modules |Modules]] and MG003 [[:Category:Gateways |Gateways]] from 18W41.<br />
<br /><br />
<br />
<br />
= LoRaWan Multicast = <br />
<br />
When a device network contain devices that should get same information from server it could be useful to perform multicast, that is sending same payload to several devices in one shot. Of course, all device should listen, so multicast should be done whit class C devices. <br />
<br />
= Nemeus Implementation =<br />
<br />
Nemeus Multicast adress can be defined with following formalism:<br />
0xFFFFFFFFxxxxxxxx<br />
<br />
For the device configuration only the 4 LSB are used<br />
<br />
The five less significant bits could be used to manage up to 32 groups and should be set/unset as follow:<br />
* 1 1111 : 1 group available <br />
* 1 1110 : 2 groups available <br />
* 1 1100 : 4 groups available <br />
* 1 1000 : 8 groups available <br />
* 1 0000 : 16 groups available <br />
* 0 0000 : 32 groups available <br />
<br />
<br />
= Example with two devices with multicast on 4 groups =<br />
<br />
Multicast Adress : FFFFFFFF789ABCDC (4 groups)<br><br />
nwk_skey : 0102030405060708090A0B0C0D0E0FCA<br><br />
apps_key : 0102030405060708090A0B0C0D0E0F00<br><br />
Device 1 in group 0 (bit 0 set in the mask => 0x1))<br><br />
Device 2 in group 3 (bit 3 set in the mask => 0x8)<br><br />
Device 3 in group 1 and 3 (bit 1 and bit 3 set in the mask => 0xA)<br><br />
<br />
<br />
== Devices configuration ==<br />
<br />
Device #1<br />
AT+MAC=SMC,789ABCDC,FFFFFFFC,00000001,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #2<br />
AT+MAC=SMC,789ABCDC,FFFFFFFC,00000008,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #3<br />
AT+MAC=SMC,789ABCDC,FFFFFFFC,0000000A,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
== Gateway configuration ==<br />
<br />
First we need to add a specific device that will represent the multicast channel:<br />
<br /><br /><br />
<br />
[[File:Multicast add device.png | Multicast add device]]<br />
<br />
<br /><br /><br />
We can see now in devices list our 'devices' along with the multicast virtual device:<br />
<br /><br /><br />
<br />
[[File:Multicast devices list.png |Multicast devices list]]<br />
<br />
<br /><br /><br />
We can send the data via the virtual device context:<br />
<br /><br /><br />
<br />
[[File:Multicast device context.png|Multicast Context]]<br />
<br />
In this example only device # 3 will receive the data</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-TH_Temperature_Hygrometry_Sensor&diff=356NIS-TH Temperature Hygrometry Sensor2019-01-23T09:55:54Z<p>Lcs: /* Uplink data Frame format */</p>
<hr />
<div>[[Category:Sensors]]<br />
[[File:2 Exp Humidity and Temperature sensor.png|thumb|400px|RTD Temperature Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= TH Temperature Hygrometry sensor properties =<br />
<br />
== Humidity Sensor Specification ==<br />
<br />
Specified range : [0RH - 90RH]<br />
<br />
Accuracy tolerance : Typ +-2% RH<br />
<br />
Long-term drift : Typ <0.25% RH/year<br />
<br />
== Temperature Sensor Specification ==<br />
<br />
Specified range : [-40°C to 90°C]<br />
<br />
Accuracy tolerance : typ +-0.3°C<br />
<br />
Long Term Drift : max <0.03°C/year<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <th_temp> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : indicates the presence of <th_hygro> field.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<th_temp>: 2*<nb_meas> bytes containing the temperature values in 0.1 °C. Each temperature value is a signed integer on 16 bits in big endian [-32768..+32767].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit4 == 1) :<br />
<th_hygro>: 2*<nb_meas> bytes containing the hygrometry values in 0.01 %. Each hygrometry value is an unsigned integer on 16 bits in big endian [0..9999].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (temperature > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (temperature < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (temperature < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (temperature > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><rtd_temp1>...<rtd_tempN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><rtd_temp1>...<rtd_tempN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“820119”: the frame indicates one temperature measurement of +28.1 °C.<br />
“8302FFCB000C”: the frame indicates two temperature measurements of -5.3 °c and +1.2 °C.<br />
“9201190120”: the frame indicates one measurements of temperature +28.1 °C followed by one measurement of hygrometry of 28.8%.<br />
“93020119012002000210”: the frame indicates two measurements of temperature +28.1 °C.and +28.8 °C followed by two measurements of hygrometry of 51.2% and 52.8%.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
<meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
<period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<mode>: bit field enabling/disabling the measures (threshold detections and periodic measures)<br />
<subperiod>: subdivision of period for threshold detection, actual measurement period is (<meas_period>*<period_unit>)/<subperiod> seconds<br />
<high_threshold>: value of high threshold<br />
<high_hysteresis>: value of high hysteresis<br />
<low_threshold>: value of low threshold<br />
<low_hysteresis>: value of low hysteresis<br />
<sensor_type>: identifies the type of sensor<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol. The downlink frame must be sent on the MS008 LoRaWAN port (10).<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.<br />
<br />
Bit0 indicates the presence of <up_frame_mask> field<br />
<br />
Bit1 indicates the presence of <nb_meas_for_tx> field<br />
<br />
Bit2 indicates the presence of <meas_period> and <period_unit> fields<br />
<br />
Bit3 indicates the presence of <mode> and <subperiod> fields<br />
<br />
Bit4 indicates the presence of <high_threshold> and <high_hysteresis> fields<br />
<br />
Bit5 indicates the presence of <low_threshold> and <low_hysteresis> fields<br />
<br />
Bit6 indicates the presence of <sensor_type> field<br />
<br />
If (mask.bit0 == 1):<br />
<br />
<up_frame_mask>: 1 byte containing the uplink frame mask<br />
<br />
If (mask.bit1 == 1):<br />
<br />
<nb_meas_for_tx>: 1 byte containing the number of measurements required to trigger a transmission<br />
<br />
If (mask.bit2 == 1):<br />
<br />
<meas_period>: 2 bytes in little endian (LSB first) containing the period of measurements in <period_unit> seconds<br />
<period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
If (mask.bit3 == 1):<br />
<mode>: 1 byte encoded as follows:<br />
bit0: enable(1)/disable(0) high threshold detection<br />
bit1: enable(1)/disable(0) high hysteresis detection (when leaving high threshold state)<br />
bit2: enable(1)/disable(0) low threshold detection<br />
bit3: enable(1)/disable(0) low hysteresis detection (when leaving low threshold state)<br />
bit4: enable(1)/disable(0) periodic measurements<br />
bit5 to bit7: reserved<br />
<subperiod>: 2 bytes in little endian containing the period subdivision<br />
<br />
If (mask.bit4 == 1):<br />
<br />
<high_threshold>: signed integer on 2 bytes in little endian containing the high threshold in 0.1 °C [-2000..+8000]<br />
<high_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving high threshold state in 0.1 °C [0..255]<br />
<br />
If (mask.bit5 == 1):<br />
<br />
<low_threshold>: signed integer on 2 bytes in little endian containing the low threshold in 0.1 °C [-2000..+8000]<br />
<low_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving low threshold state in 0.1 °C [0..255]<br />
<br />
If (mask.bit6 == 1):<br />
<br />
<sensor_type>: unsigned integer on 1 byte containing the sensor type [11..16]<br />
11(0x0B): N/A<br />
12(0x0C): N/A<br />
13(0x0D): ...<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit><mode><subperiod><high_threshold><high_hysteresis><low_threshold> <low_hysteresis><sensor_type>.<br />
<br />
Some examples in hexadecimal:<br />
<br />
“028182”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <th_temp> field only<br />
“028E04605401100100”: set <nb_meas_for_tx> to 4, <meas_period> to 21600*<period_unit> seconds, <period_unit> to 1 second and enable periodic measurements only with subperiod to 1 => one measurement every 6 hours and one transmission every 4 measures (every day). Each uplink frame will include 4 measurements<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_NIS_Devices_configuration&diff=355Application Note: NIS Devices configuration2019-01-14T09:07:24Z<p>Lcs: /* Usage */</p>
<hr />
<div>[[Category:Sensors]]<br />
[[Category:Application Notes]]<br />
<br />
= Configuration with Nemeus USB stick = <br />
<br />
Most of Nemeus devices can be reconfigured thanks to Nemeus USB stick and [[MM002_Configuration_Tool_Java|MM002 Java application]].<br />
<br />
In addition of the Java application and the USB stick, it needs Yaml File for the device configuration.<br />
<br />
<br />
<br />
<br />
<br />
= Usage = <br />
<br />
== Connect to USB stick ==<br />
<br><br />
<br />
First, the USB stick should be connected: Select the correct COM port from the menu and press connect <br />
<br><br />
[[File:ModuleApp.png|Module APP windows]]<br />
<br><br />
<br />
== LoRa Device Config ==<br />
<br><br />
<br />
Open "LoRa device config" in config Menu. The following display will show up :<br />
<br />
[[File:NIS_device_configuration_1.png|Device configuration windows]]<br />
<br />
The "devUid" field must be filled up with the device Uid of the device to be configured.<br />
<br />
The "Authentication Key" field must be filled up with the App<span style="color:#00FF00">S</span>Key of the device to be configured.<br />
<br />
<br><br />
<br />
<br />
== Reading device == <br />
<br><br />
When ready, user should set the device in "Test mode" as explained in the wiki (e.g. [[NIS-TR_Temperature_Sensor_(RTD)#Test_mode|Test mode for NIS-TR]] ). Then if you press "Read Device" button the following window should pop up.<br />
<br />
[[File:NIS_device_configuration_pt100_1.png|Device configuration windows for pt100]]<br />
<br />
This is an example for NIS TR product. If the window did not show up, please verify the following point:<br />
- device to be read is set in "Test mode" (Led of the device should blink regularly)<br />
- correct devUid and App<span style="color:#00FF00">S</span>Key has been entered. Please note that the key is the App<span style="color:#00FF00">S</span>Key and not the AppKey<br />
<br />
== Writing device ==<br />
<br />
Just push to the Write Dev button.<br />
<br><br />
If the device has been disconnected from Test Mode you just need to put it again in Test mode and write the device (you don't need to read it again).<br />
<br />
== Applying new configuration ==<br />
<br />
Depending on the parameters, the configuration could be used directly or you might need to restart the device, <br />
To do so <br />
-a) remove, insert battery<br />
-b) Set the magnet around 20 seconds (until it stop blinking and then remove it immediatly) <br />
<br />
After restart you may need to set the device back to IDLE mode, A join will be performed by LoRaWan device.<br />
<br />
<br />
== Device parameters == <br />
<br />
<br />
=== Device sensor/application parameters === <br />
<br />
<br />
=== Device network parameters ===</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_NIS_Devices_configuration&diff=354Application Note: NIS Devices configuration2019-01-11T17:36:42Z<p>Lcs: </p>
<hr />
<div>[[Category:Sensors]]<br />
[[Category:Application Notes]]<br />
<br />
= Configuration with Nemeus USB stick = <br />
<br />
Most of Nemeus devices can be reconfigured thanks to Nemeus USB stick and [[MM002_Configuration_Tool_Java|MM002 Java application]].<br />
<br />
In addition of the Java application and the USB stick, it needs Yaml File for the device configuration.<br />
<br />
<br />
<br />
<br />
<br />
= Usage = <br />
<br />
Open "LoRa device config" in config Menu. The following display will show up :<br />
<br />
[[File:NIS_device_configuration_1.png|Device configuration windows]]<br />
<br />
The "devUid" field must be filled up with the device Uid of the device to be configured.<br />
<br />
The "Authentication Key" field must be filled up with the App<span style="color:#00FF00">S</span>Key of the device to be configured.<br />
<br />
<br />
<br />
== Reading device == <br />
<br />
When ready, user should set the device in "Test mode" as explained in the wiki (e.g. [[NIS-TR_Temperature_Sensor_(RTD)#Test_mode|Test mode for NIS-TR]] ). Then if you press "Read Device" button the following window should pop up.<br />
<br />
[[File:NIS_device_configuration_pt100_1.png|Device configuration windows for pt100]]<br />
<br />
This is an example for NIS TR product. If the window did not show up, please verify the following point:<br />
- device to be read is set in "Test mode" (Led of the device should blink regularly)<br />
- correct devUid and App<span style="color:#00FF00">S</span>Key has been entered. Please note that the key is the App<span style="color:#00FF00">S</span>Key and not the AppKey<br />
<br />
== Writing device ==<br />
<br />
Just push to the Write Dev button.<br />
<br><br />
If the device has been disconnected from Test Mode you just need to put it again in Test mode and write the device (you don't need to read it again).<br />
<br />
== Applying new configuration ==<br />
<br />
Depending on the parameters, the configuration could be used directly or you might need to restart the device, <br />
To do so <br />
-a) remove, insert battery<br />
-b) Set the magnet around 20 seconds (until it stop blinking and then remove it immediatly) <br />
<br />
After restart you may need to set the device back to IDLE mode, A join will be performed by LoRaWan device.<br />
<br />
<br />
== Device parameters == <br />
<br />
<br />
=== Device sensor/application parameters === <br />
<br />
<br />
=== Device network parameters ===</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-TR_Temperature_Sensor_(RTD)&diff=353NIS-TR Temperature Sensor (RTD)2018-11-30T14:19:56Z<p>Lcs: /* Downlink Frame format */</p>
<hr />
<div>[[Category:Sensors]]<br />
[[File:1 Exp PE RTD sensor.png|thumb|400px|RTD Temperature Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= RTD Temperature sensor properties =<br />
<br />
* Handles 100Ω to 1kΩ (at 0°C) Platinum RTDs (PT100 to PT1000)<br />
<br />
* 2-wires, 3-wires or 4-wires connection<br />
<br />
* 15-Bit ADC Resolution; Nominal Temperature Resolution 0.03125°C (Varies Due to RTD Nonlinearity)<br />
<br />
* Total Accuracy Over All Operating Conditions: 0.5°C (0.05% of Full Scale) max<br />
<br />
* ±45V Input Protection<br />
<br />
* Fault Detection (Open RTD Element, RTD Shorted to Out-of-Range Voltage, or Short Across RTD Element)<br />
<br />
* Direct fifth-order linearization for best accuracy<br />
<br />
= Wiring =<br />
<br />
[[File:MS008 config3.jpeg|picture of sensor pcb and box]]<br />
<br />
{| class="wikitable"<br />
|+Probe settings<br />
|-<br />
|number of wires<br />
|jumpers configuration<br />
|Probe connection<br />
|-<br />
|rowspan="3"|4 wires<br />
|JP2 jumper on 1-2 <br />
|rowspan="3"|FORCE+ IN+ IN- FORCE-<br />
|-<br />
|JP3 NC<br />
|-<br />
|JP4 NC<br />
|-<br />
|rowspan="3"|3 wires<br />
|JP2 jumper on 2-3<br />
|rowspan="3"|FORCE+ IN+ IN-<br />
|-<br />
|JP3 NC<br />
|-<br />
|JP4 jumper ON <br />
|-<br />
|rowspan="3"|2 wires<br />
|JP2 jumper on 1-2<br />
|rowspan="3"|IN+ IN-<br />
|-<br />
|JP3 jumper ON<br />
|-<br />
|JP4 jumper ON <br />
|}<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <rtd_temp> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : is reserved.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<rtd_temp>: 2*<nb_meas> bytes containing the temperature values in 0.1 °C. Each temperature value is a signed integer on 16 bits in big endian [-32768..+32767].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (temperature > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (temperature < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (temperature < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (temperature > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><rtd_temp1>...<rtd_tempN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><rtd_temp1>...<rtd_tempN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“820119”: the frame indicates one temperature measurement of +28.1 °C.<br />
“8302FFCB000C”: the frame indicates two temperature measurements of -5.3 °c and +1.2 °C.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
<meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
<period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<mode>: bit field enabling/disabling the measures (threshold detections and periodic measures)<br />
<subperiod>: subdivision of period for threshold detection, actual measurement period is (<meas_period>*<period_unit>)/<subperiod> seconds<br />
<high_threshold>: value of high threshold<br />
<high_hysteresis>: value of high hysteresis<br />
<low_threshold>: value of low threshold<br />
<low_hysteresis>: value of low hysteresis<br />
<sensor_type>: identifies the type of sensor (PT100/PT1000 and 2/3/4 wires)<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol.<br><br />
'''The downlink frame must be sent on the MS008 LoRaWAN port (10).'''<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.<br />
<br />
Bit0 indicates the presence of <up_frame_mask> field<br />
<br />
Bit1 indicates the presence of <nb_meas_for_tx> field<br />
<br />
Bit2 indicates the presence of <meas_period> and <period_unit> fields<br />
<br />
Bit3 indicates the presence of <mode> and <subperiod> fields<br />
<br />
Bit4 indicates the presence of <high_threshold> and <high_hysteresis> fields<br />
<br />
Bit5 indicates the presence of <low_threshold> and <low_hysteresis> fields<br />
<br />
Bit6 indicates the presence of <sensor_type> field<br />
<br />
If (mask.bit0 == 1):<br />
<br />
<up_frame_mask>: 1 byte containing the uplink frame mask<br />
<br />
If (mask.bit1 == 1):<br />
<br />
<nb_meas_for_tx>: 1 byte containing the number of measurements required to trigger a transmission<br />
<br />
If (mask.bit2 == 1):<br />
<br />
<meas_period>: 2 bytes in little endian (LSB first) containing the period of measurements in <period_unit> seconds<br />
<period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
If (mask.bit3 == 1):<br />
<mode>: 1 byte encoded as follows:<br />
bit0: enable(1)/disable(0) high threshold detection<br />
bit1: enable(1)/disable(0) high hysteresis detection (when leaving high threshold state)<br />
bit2: enable(1)/disable(0) low threshold detection<br />
bit3: enable(1)/disable(0) low hysteresis detection (when leaving low threshold state)<br />
bit4: enable(1)/disable(0) periodic measurements<br />
bit5 to bit7: reserved<br />
<subperiod>: 2 bytes in little endian containing the period subdivision<br />
<br />
If (mask.bit4 == 1):<br />
<br />
<high_threshold>: signed integer on 2 bytes in little endian containing the high threshold in 0.1 °C [-2000..+8000]<br />
<high_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving high threshold state in 0.1 °C [0..255]<br />
<br />
If (mask.bit5 == 1):<br />
<br />
<low_threshold>: signed integer on 2 bytes in little endian containing the low threshold in 0.1 °C [-2000..+8000]<br />
<low_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving low threshold state in 0.1 °C [0..255]<br />
<br />
If (mask.bit6 == 1):<br />
<br />
<sensor_type>: unsigned integer on 1 byte containing the sensor type [11..16]<br />
11(0x0B): PT100 2 wires<br />
12(0x0C): PT100 3 wires<br />
13(0x0D): PT100 4 wires<br />
14(0x0E): PT1000 2 wires<br />
15(0x0F): PT1000 3 wires<br />
16(0x10): PT1000 4 wires<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit><mode><subperiod><high_threshold><high_hysteresis><low_threshold> <low_hysteresis><sensor_type>.<br />
<br />
Some examples in hexadecimal:<br />
<br />
“028182”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <rtd_temp> field only<br />
“028E04605401100100”: set <nb_meas_for_tx> to 4, <meas_period> to 21600*<period_unit> seconds, <period_unit> to 1 second and enable periodic measurements only with subperiod to 1 => one measurement every 6 hours and one transmission every 4 measures (every day). Each uplink frame will include 4 measurements<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/D3upefvYafJ0EQ7i|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-UL_UltraSonic_Sensor&diff=352NIS-UL UltraSonic Sensor2018-11-30T14:19:22Z<p>Lcs: </p>
<hr />
<div>[[Category:Sensors]]<br />
[[File:MS006-overview.jpeg|thumb|400px|Ultrasonic sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= WARNING =<br />
This sensor is not designed for critical purposes.<br />
It should never be used in an application where a malfunction of the device could cause personal injury. <br />
Due to ultrasonic physics, we can not guarantee 100% reliability at close distances.<br />
<br />
= Ultrasonic sensor properties =<br />
Default configuration allows target detection until 6 meters.<br />
<br />
Objects from 0cm to 20cm range are reported as 20cm.<br />
<br />
The acoustic detection pattern has an angle of 7°. <br />
The geometry of the detection pattern depends mainly on the size, orientation, and acoustic properties of the target, but also on the atmospheric pressure, temperature and humidity.<br />
<br />
Each sensor is factory calibrated to unify results between sensors.<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
<span style="color:#FF0000">'''Note :''' Frame format of sensors delivered before 1st of November 2017 can be found [[NIS-UL UltraSonic Sensor - Frame Format v0.x|here]] </span> <br />
<br><br><br />
The uplink payload contains multiple fields:<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field. Absence of <nb_meas> means <nb_meas> = 1.<br />
<br />
bit 1 : indicates the presence of <usonic_dist> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : is reserved.<br />
<br />
bit 5 : indicates the presence of <cause> field. Absence of <cause> field means <cause> = periodic only.<br />
<br />
bit 6 : is reserved.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<usonic_dist>: 2*<nb_meas> bytes containing the distances measured by the ultrasonic sensor in centimeters (1 to 300 cm in big endian).<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (usonic_dist > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (usonic_dist < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (usonic_dist < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (usonic_dist > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><usonic_dist1>...<usonic_distN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x8B which means that the default frame is <mask><nb_meas><usonic_dist1>...<usonic_distN><temp1>...<tempN> (the voltage is not present)<br />
<br />
Some examples (in hexadecimal):<br />
* “8B02009700981f19”: the frame indicates two measurements of 151cm and 152cm followed by two temperatures of 31°C and 25°C.<br />
* “8200a0”: the frame indicates a single measurement of 160cm without temperature.<br />
* “881e”: the frame indicates one temperature of 30°C.<br />
<br />
== Downlink Frame format ==<br />
<br />
<span style="color:#FF0000">'''Note :''' Frame format of sensors delivered before 1st of November 2017 can be found [[NIS-UL UltraSonic Sensor - Frame Format v0.x|here]] </span> <br />
<br><br><br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
<meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
<period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<mode>: bit field enabling/disabling the measures (threshold detections and periodic measures)<br />
<subperiod>: subdivision of period for threshold detection, actual measurement period is (<meas_period>*<period_unit>)/<subperiod> seconds<br />
<high_threshold>: value of high threshold<br />
<high_hysteresis>: value of high hysteresis<br />
<low_threshold>: value of low threshold<br />
<low_hysteresis>: value of low hysteresis<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol.<br><br />
'''The downlink frame must be sent on the LoRaWAN port 8.'''<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.<br />
<br />
Bit0 indicates the presence of <up_frame_mask> field<br />
<br />
Bit1 indicates the presence of <nb_meas_for_tx> field<br />
<br />
Bit2 indicates the presence of <meas_period> and <period_unit> fields<br />
<br />
Bit3 indicates the presence of <mode> and <subperiod> fields<br />
<br />
Bit4 indicates the presence of <high_threshold> and <high_hysteresis> fields<br />
<br />
Bit5 indicates the presence of <low_threshold> and <low_hysteresis> fields<br />
<br />
Bit6 is reserved<br />
<br />
Bit7 is reserved<br />
<br />
If (mask.bit0 == 1):<br />
<br />
<up_frame_mask>: 1 byte containing the uplink frame mask<br />
<br />
If (mask.bit1 == 1):<br />
<br />
<nb_meas_for_tx>: 1 byte containing the number of measurements required to trigger a transmission<br />
<br />
If (mask.bit2 == 1):<br />
<br />
<meas_period>: 2 bytes in little endian (LSB first) containing the period of measurements in <period_unit> seconds<br />
<period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
If (mask.bit3 == 1):<br />
<mode>: 1 byte encoded as follows:<br />
bit0: enable(1)/disable(0) high threshold detection<br />
bit1: enable(1)/disable(0) high hysteresis detection (when leaving high threshold state)<br />
bit2: enable(1)/disable(0) low threshold detection<br />
bit3: enable(1)/disable(0) low hysteresis detection (when leaving low threshold state)<br />
bit4: enable(1)/disable(0) periodic measurements<br />
bit5: reserved<br />
bit6: reserved<br />
bit7: reserved<br />
<subperiod>: 2 bytes in little endian containing the period subdivision<br />
<br />
If (mask.bit4 == 1):<br />
<br />
<high_threshold>: unsigned integer on 2 bytes in little endian containing the high threshold in cm [20..299]<br />
<high_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving high threshold state in cm [1..255]<br />
<br />
If (mask.bit5 == 1):<br />
<br />
<low_threshold>: unsigned integer on 2 bytes in little endian containing the low threshold in cm [21..300]<br />
<low_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving low threshold state in cm [1..255]<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit><mode><subperiod><high_threshold><high_hysteresis><low_threshold> <low_hysteresis>.<br />
<br />
Some examples in hexadecimal:<br />
<br />
“028182”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <usonic_dist> field only<br />
“028E04605401100100”: set <nb_meas_for_tx> to 4, <meas_period> to 21600*<period_unit> seconds, <period_unit> to 1 second and enable periodic measurements only with subperiod to 1 => one measurement every 6 hours and one transmission every 4 measures (every day). Each uplink frame will include 4 measurements<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/7Z9r3VnBuApcPSzj|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_Nemeus_Multicast_Overview&diff=351Application Note: Nemeus Multicast Overview2018-11-27T17:48:28Z<p>Lcs: /* Devices configuration */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
[[Category:Gateways]]<br />
[[Category:Application Notes]]<br />
<br />
Purpose of this Application Note is to help engineer to integrate Nemeus Multicast Mechanism. This Application Note is valid for all MM002-xx-EU [[:Category:Modules |Modules]] and MG003 [[:Category:Gateways |Gateways]] from 18W41.<br />
<br /><br />
<br />
<br />
= LoRaWan Multicast = <br />
<br />
When a device network contain devices that should get same information from server it could be useful to perform multicast, that is sending same payload to several devices in one shot. Of course, all device should listen, so multicast should be done whit class C devices. <br />
<br />
= Nemeus Implementation =<br />
<br />
Nemeus Multicast adress can be defined with following formalism:<br />
0xFFFFFFFFxxxxxxxx<br />
<br />
For the device configuration only the 4 LSB are used<br />
<br />
The five less significant bits could be used to manage up to 32 groups and should be set/unset as follow:<br />
* 1 1111 : 1 group available <br />
* 1 1110 : 2 groups available <br />
* 1 1100 : 4 groups available <br />
* 1 1000 : 8 groups available <br />
* 1 0000 : 16 groups available <br />
* 0 0000 : 32 groups available <br />
<br />
<br />
= Example with two devices with multicast on 4 groups =<br />
<br />
Multicast Adress : FFFFFFFF789ABCDA (4 groups)<br><br />
nwk_skey : 0102030405060708090A0B0C0D0E0FCA<br><br />
apps_key : 0102030405060708090A0B0C0D0E0F00<br><br />
Device 1 in group 0 (bit 0 set in the mask => 0x1))<br><br />
Device 2 in group 3 (bit 3 set in the mask => 0x8)<br><br />
Device 3 in group 1 and 3 (bit 1 and bit 3 set in the mask => 0xA)<br><br />
<br />
<br />
== Devices configuration ==<br />
<br />
Device #1<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,00000001,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #2<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,00000008,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #3<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,0000000A,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
== Gateway configuration ==<br />
<br />
First we need to add a specific device that will represent the multicast channel:<br />
<br /><br /><br />
<br />
[[File:Multicast add device.png | Multicast add device]]<br />
<br />
<br /><br /><br />
We can see now in devices list our 'devices' along with the multicast virtual device:<br />
<br /><br /><br />
<br />
[[File:Multicast devices list.png |Multicast devices list]]<br />
<br />
<br /><br /><br />
We can send the data via the virtual device context:<br />
<br /><br /><br />
<br />
[[File:Multicast device context.png|Multicast Context]]<br />
<br />
In this example only device # 3 will receive the data</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_Nemeus_Multicast_Overview&diff=350Application Note: Nemeus Multicast Overview2018-11-27T17:48:04Z<p>Lcs: /* Example with two devices with multicast on 4 groups */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
[[Category:Gateways]]<br />
[[Category:Application Notes]]<br />
<br />
Purpose of this Application Note is to help engineer to integrate Nemeus Multicast Mechanism. This Application Note is valid for all MM002-xx-EU [[:Category:Modules |Modules]] and MG003 [[:Category:Gateways |Gateways]] from 18W41.<br />
<br /><br />
<br />
<br />
= LoRaWan Multicast = <br />
<br />
When a device network contain devices that should get same information from server it could be useful to perform multicast, that is sending same payload to several devices in one shot. Of course, all device should listen, so multicast should be done whit class C devices. <br />
<br />
= Nemeus Implementation =<br />
<br />
Nemeus Multicast adress can be defined with following formalism:<br />
0xFFFFFFFFxxxxxxxx<br />
<br />
For the device configuration only the 4 LSB are used<br />
<br />
The five less significant bits could be used to manage up to 32 groups and should be set/unset as follow:<br />
* 1 1111 : 1 group available <br />
* 1 1110 : 2 groups available <br />
* 1 1100 : 4 groups available <br />
* 1 1000 : 8 groups available <br />
* 1 0000 : 16 groups available <br />
* 0 0000 : 32 groups available <br />
<br />
<br />
= Example with two devices with multicast on 4 groups =<br />
<br />
Multicast Adress : FFFFFFFF789ABCDA (4 groups)<br><br />
nwk_skey : 0102030405060708090A0B0C0D0E0FCA<br><br />
apps_key : 0102030405060708090A0B0C0D0E0F00<br><br />
Device 1 in group 0 (bit 0 set in the mask => 0x1))<br><br />
Device 2 in group 3 (bit 3 set in the mask => 0x8)<br><br />
Device 3 in group 1 and 3 (bit 1 and bit 3 set in the mask => 0xA)<br><br />
<br />
<br />
== Devices configuration ==<br />
<br />
Device #1<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,00000001,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #2<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,00000008,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #3<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,0000000A,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
== Gateway configuration ==<br />
<br />
First we need to add a specific device that will represent the multicast channel:<br />
<br /><br /><br />
<br />
[[File:Multicast add device.png | Multicast add device]]<br />
<br />
<br /><br /><br />
We can see now in devices list our 'devices' along with the multicast virtual device:<br />
<br /><br /><br />
<br />
[[File:Multicast devices list.png |Multicast devices list]]<br />
<br />
<br /><br /><br />
We can send the data via the virtual device context:<br />
<br /><br /><br />
<br />
[[File:Multicast device context.png|Multicast Context]]<br />
<br />
In this example only device # 3 will receive the data</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_Nemeus_Multicast_Overview&diff=345Application Note: Nemeus Multicast Overview2018-10-22T13:39:45Z<p>Lcs: /* Gateway configuration */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
[[Category:Gateways]]<br />
[[Category:Application Notes]]<br />
<br />
Purpose of this Application Note is to help engineer to integrate Nemeus Multicast Mechanism. This Application Note is valid for all MM002-xx-EU [[:Category:Modules |Modules]] and MG003 [[:Category:Gateways |Gateways]] from 18W41.<br />
<br /><br />
<br />
<br />
= LoRaWan Multicast = <br />
<br />
When a device network contain devices that should get same information from server it could be useful to perform multicast, that is sending same payload to several devices in one shot. Of course, all device should listen, so multicast should be done whit class C devices. <br />
<br />
= Nemeus Implementation =<br />
<br />
Nemeus Multicast adress can be defined with following formalism:<br />
0xFFFFFFFFxxxxxxxx<br />
<br />
For the device configuration only the 4 LSB are used<br />
<br />
The five less significant bits could be used to manage up to 32 groups and should be set/unset as follow:<br />
* 1 1111 : 1 group available <br />
* 1 1110 : 2 groups available <br />
* 1 1100 : 4 groups available <br />
* 1 1000 : 8 groups available <br />
* 1 0000 : 16 groups available <br />
* 0 0000 : 32 groups available <br />
<br />
<br />
= Example with two devices with multicast on 4 groups =<br />
<br />
Multicast Adress : FFFFFFFF789ABCDA (4 groups)<br />
nwk_skey : 0102030405060708090A0B0C0D0E0FCA<br />
apps_key : 0102030405060708090A0B0C0D0E0F00<br />
Device 1 in group 1<br />
Device 2 in group 2<br />
<br />
<br />
== Devices configuration ==<br />
<br />
Device #1<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,00000001,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #2<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,00000002,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
== Gateway configuration ==<br />
<br />
First we need to add a specific device that will represent the multicast channel:<br />
<br /><br /><br />
<br />
[[File:Multicast add device.png | Multicast add device]]<br />
<br />
<br /><br /><br />
We can see now in devices list our 'devices' along with the multicast virtual device:<br />
<br /><br /><br />
<br />
[[File:Multicast devices list.png |Multicast devices list]]<br />
<br />
<br /><br /><br />
We can send the data via the virtual device context:<br />
<br /><br /><br />
<br />
[[File:Multicast device context.png|Multicast Context]]</div>Lcshttps://wiki.nemeus.fr/index.php?title=File:Multicast_device_context.png&diff=344File:Multicast device context.png2018-10-22T13:36:25Z<p>Lcs: </p>
<hr />
<div>Nemeus Java App windows of LoRaWan multicast device context</div>Lcshttps://wiki.nemeus.fr/index.php?title=File:Multicast_devices_list.png&diff=343File:Multicast devices list.png2018-10-22T13:35:08Z<p>Lcs: </p>
<hr />
<div>Nemeus Java App windows show LoRaWan multicast devices</div>Lcshttps://wiki.nemeus.fr/index.php?title=File:Multicast_add_device.png&diff=342File:Multicast add device.png2018-10-22T13:34:09Z<p>Lcs: </p>
<hr />
<div>Nemeus Java App windows to add LoRaWan multicast device</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_Nemeus_Multicast_Overview&diff=341Application Note: Nemeus Multicast Overview2018-10-22T12:36:58Z<p>Lcs: Created page with "Category:MM002 Category:Modules Category:Gateways Category:Application Notes Purpose of this Application Note is to help engineer to integrate Nemeus Multicas..."</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
[[Category:Gateways]]<br />
[[Category:Application Notes]]<br />
<br />
Purpose of this Application Note is to help engineer to integrate Nemeus Multicast Mechanism. This Application Note is valid for all MM002-xx-EU [[:Category:Modules |Modules]] and MG003 [[:Category:Gateways |Gateways]] from 18W41.<br />
<br /><br />
<br />
<br />
= LoRaWan Multicast = <br />
<br />
When a device network contain devices that should get same information from server it could be useful to perform multicast, that is sending same payload to several devices in one shot. Of course, all device should listen, so multicast should be done whit class C devices. <br />
<br />
= Nemeus Implementation =<br />
<br />
Nemeus Multicast adress can be defined with following formalism:<br />
0xFFFFFFFFxxxxxxxx<br />
<br />
For the device configuration only the 4 LSB are used<br />
<br />
The five less significant bits could be used to manage up to 32 groups and should be set/unset as follow:<br />
* 1 1111 : 1 group available <br />
* 1 1110 : 2 groups available <br />
* 1 1100 : 4 groups available <br />
* 1 1000 : 8 groups available <br />
* 1 0000 : 16 groups available <br />
* 0 0000 : 32 groups available <br />
<br />
<br />
= Example with two devices with multicast on 4 groups =<br />
<br />
Multicast Adress : FFFFFFFF789ABCDA (4 groups)<br />
nwk_skey : 0102030405060708090A0B0C0D0E0FCA<br />
apps_key : 0102030405060708090A0B0C0D0E0F00<br />
Device 1 in group 1<br />
Device 2 in group 2<br />
<br />
<br />
== Devices configuration ==<br />
<br />
Device #1<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,00000001,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
Device #2<br />
AT+MAC=SMC,789ABCDA,FFFFFFFC,00000002,0,0102030405060708090A0B0C0D0E0FCA,0102030405060708090A0B0C0D0E0F00<br />
<br />
== Gateway configuration ==<br />
<br />
Diapo1<br />
<br />
<br />
Diapo2<br />
<br />
<br />
Diapo3<br />
<br />
<br />
...</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_AT_Commands&diff=340MM002-xx-EU AT Commands2018-10-22T10:38:27Z<p>Lcs: /* Response */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
AT commands are used as an interface with Nemeus Communication modules. Modules can be driven at 3 different levels:<br />
<br />
* Radio level: embedded AT server uses RF SX127x driver API (LoRa™and FSK modulations can be used).<br />
* LoRa™WAN level: embedded AT server uses LoRa™WAN library API(available only when the library is present in embedded software).<br />
* SIGFOX™ level: embedded AT server uses SIGFOX™ library API(available only when the library is present in embedded software).<br />
<br />
<u>'''When radio level is used'''</u>, no device personalization is required, it is up to AT client application to implement network layer according to the network the device is attached (the module doesn’t know the network).<br />
<br />
<u>'''When LoRa™WAN level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* Whatever the activation type, a 64 bits device unique identifier.<br />
* When Activation By Personalization (ABP) is used:<br />
** An AES128 network security key for MIC computation and encryptionof MAC control commands on port 0.<br />
** An AES128 application security key for encryption of applicationpayloads (not required when data encryption is disabled on themodule).<br />
* When Over The Air Activation (OTAA) is used:<br />
** A 64 bits application unique identifier.<br />
** An AES128 application Key used to derive the network andapplication security keys.<br />
<br />
In first software versions (before 15W40) the module generates unique identifiers and keys, these default LoRa™WAN personalization parameters are modifiable by AT commands. It allows customers to personalize their devices according to the network operator rules.<br />
<br />
In further software versions, modules are personalized with Nemeus OUI during production phase and they can’t be modified. In this case the device unique identifier is read-only and the AES128 keys are hidden. The application unique identifier is still modifiable by AT command.<br />
<br />
<u>'''When SIGFOX™ level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* The read-only device unique identifier.<br />
* The hidden AES128 security key.<br />
* The initial read-only Portability Access Code (PAC).<br />
<br />
Before driving the module, the AT client application must activate the level it wants to use.<br />
<br />
Only one level can be activated at a time.<br />
<br />
When activating a level, a previously activated level is automatically deactivated.<br />
<br />
<br />
[[File:Mm002_serial_diagram.png|center|500px]]<br />
<br><br><br />
For evaluation/test purpose, Nemeus recommends to use NemeusATK java application to drive the module.<br />
<br><br><br />
{{TOC limit|3}}<br />
<br />
== UART configuration ==<br />
<br />
The UART configuration for Modem connection is as follows:<br />
<br />
* Baud Rate : 38400<br />
* Data : 8 bits<br />
* Parity : None<br />
* Stop : 1 bit<br />
* Flow control : None<br />
* End line character : &lt;LF&gt;<br />
<br />
<br><br />
<br><br />
<br />
E.g. Typical configuration given by ‘stty’ command on linux:<br />
<br />
''speed 38400 baud; rows 0; columns 0; line = 0;''<br />
<br />
''intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 = &lt;undef&gt;;swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;flush = ^O; min = 1; time = 0;''<br />
<br />
''-parenb -parodd cs8 hupcl -cstopb cread clocal –crtsct signbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff –iuclc -ixany -imaxbel -iutf8''<br />
<br />
''-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop –echoprt -echoctl -echoke''<br />
<br />
<br><br />
<br />
== AT commands ==<br />
<br />
---- <br />
At command are split according to communication layers. This is a list of main AT commands for SW given in ‘compatibility’ paragraph. The full list and limitation can be found in SW delivery note.<br />
<br />
Formalism is the following:<br />
<br />
<br> <br />
<br><br />
[[File:AT-command-line.png|center]]<br />
<br><br />
<br><br />
<br />
For each group among RF, RFRX, RFTX, MAC and SFX, the command AT+&lt;group&gt;= HELP describes available sub-commands. Example:<br />
<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SET,SCH,RCH,STI,RTI,SRX,RRX,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br />
When a sub-command has parameter, AT+&lt;group&gt;= &lt;cmd&gt;? Describes the parameter list. Example:<br />
<br />
AT+MAC=SNDTXT?<br />
+MAC: SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
OK<br />
<br />
When command is unknown “command not found (‘try help’)” is returned.<br />
<br />
AT commands are not cancelable, thus AT client application must wait for AT response before sending a new command.<br />
<br />
<br><br />
<br />
== Generic Parameter description ==<br />
<br />
---- <br />
Following table describes mains parameters used with AT commands.<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Type'''<br />
<br />
|-<br />
| <br />
'''&lt;mod&gt;'''<br />
<br />
| <br />
Modulation to be use<br />
<br />
| <br />
LORA/FSK<br />
<br />
|-<br />
| <br />
'''&lt;freq&gt;'''<br />
<br />
| <br />
Carrier frequency<br />
<br />
| <br />
Expressed in Hertz *<br />
<br />
|-<br />
| <br />
'''&lt;pwr&gt;'''<br />
<br />
| <br />
Tx power (range depends on Module definition; e.g. MM001 -1dBm to 14dBm)<br />
<br />
| <br />
In dBm *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;bw&gt;'''<br />
<br />
| <br />
Bandwidth from 125kHz to 500 kHz<br />
<br />
| <br />
In Hertz *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;dr&gt;'''<br />
<br />
| <br />
Spreading Factor in LoRa mode<br />
<br />
Data rate in FSK mode<br />
<br />
| <br />
6/7 to 12 *<br />
<br />
In kb/s<br />
<br />
|-<br />
| <br />
'''&lt;cr&gt;'''<br />
<br />
| <br />
Coding Rate (LoRa mode only)<br />
<br />
| <br />
1 to 4<br />
<br />
|-<br />
| <br />
'''&lt;min/maxdr&gt;'''<br />
<br />
| <br />
Data rate range<br />
<br />
| <br />
SF7BW125 to SF12BW125, SF7BW250 or FSK50KBPS<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxcrcon&gt;'''<br />
<br />
| <br />
Flag for CRC check activation in TX or RX<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;preamble&gt;'''<br />
<br />
| <br />
Length of the preamble<br />
<br />
| <br />
6 to 65535<br />
<br />
|-<br />
| <br />
'''&lt;f_dev&gt;'''<br />
<br />
| <br />
Frequency deviation (FSK mode only)<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;fixed_len&gt;'''<br />
<br />
| <br />
When true, PHY payload is constant (no header)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxiqinv'''<br />
<br />
| <br />
Flag for IQ inversion in TX or RX (LoRa mode only)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;rxw1&gt;'''<br />
<br />
| <br />
Delay before RX windows 1<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;rxw2&gt;'''<br />
<br />
| <br />
Delay before RX windows 2 ; NOTE: rx_w2 must be longer than rx_w1.<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;tstamp&gt;'''<br />
<br />
| <br />
Rx ot Tx timestamp<br />
<br />
| <br />
In ticks<br />
<br />
|-<br />
| <br />
'''&lt;symbtimeout&gt;'''<br />
<br />
| <br />
Number of symbols before RX timeout<br />
<br />
| <br />
5 to 1023<br />
<br />
|-<br />
| <br />
'''&lt;port&gt;'''<br />
<br />
| <br />
MAC port<br />
<br />
| <br />
0 to 10<br />
<br />
|-<br />
| <br />
'''&lt;textpayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in ASCII<br />
<br />
| <br />
ASCII string<br />
<br />
|-<br />
| <br />
'''&lt; binarypayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in hexadecimal coded in ASCII<br />
<br />
| <br />
ASCII string containing 0 to F characters<br />
<br />
|-<br />
| <br />
'''&lt;chan&gt;'''<br />
<br />
| <br />
Identifies one of the 8 MAC channels<br />
<br />
| <br />
0 to 7<br />
<br />
|-<br />
| <br />
'''&lt;enable&gt;'''<br />
| <br />
Indicates the status of a channel<br />
|<br />
True or false<br />
|-<br />
| <br />
'''&lt;nbrepeat&gt;'''<br />
| <br />
Number of repetitions when sending a payload.<br />
<br />
At MAC level this parameter indicates if data confirmed must be used or not (0 means unacked mode&gt;).<br />
<br />
| <br />
0 to N<br />
<br />
|-<br />
| <br />
'''&lt;interval&gt;'''<br />
| <br />
Time interval between repetitions<br />
| <br />
In ms<br />
|-<br />
| <br />
'''&lt;hexaddress&gt;'''<br />
| <br />
Address of a registry in hexadecimal<br />
| <br />
<br><br />
|-<br />
| <br />
'''&lt;nbbytes&gt;'''<br />
| <br />
<br><br />
| <br />
0 to 4<br />
|-<br />
| <br />
'''&lt;byteN&gt;'''<br />
| <br />
Byte to write<br />
| <br />
0x00 to 0xFF<br />
|-<br />
| <br />
'''&lt;margin&gt;'''<br />
| <br />
Link demodulation margin above the demodulation floor computed by the nearest gateway<br />
| <br />
0 to 254 in dB<br />
|-<br />
| <br />
'''&lt;gwcnt&gt;'''<br />
| <br />
Number of gateways which received the MAC message<br />
| <br />
1 to N<br />
|-<br />
| <br />
'''&lt;devuid&gt;'''<br />
| <br />
Device unique identifier<br />
| <br />
8 bytes<br />
|-<br />
| <br />
'''&lt;devaddr&gt;'''<br />
| <br />
Device address (4 LSB of &lt;devuid&gt;)<br />
| <br />
4 bytes<br />
|-<br />
| <br />
'''&lt;more&gt;'''<br />
| <br />
Indicates if more downlink data is pending<br />
| <br />
true or false<br />
|-<br />
| <br />
'''&lt;mode&gt;'''<br />
| <br />
LoRa MAC transmission mode<br />
| <br />
0 for confirmed data<br />
not 0 for unconfirmed data<br />
|-<br />
| <br />
'''&lt;rxw1freq&gt;'''<br />
| <br />
Channel frequency used for Rx window 1<br />
<br />
| <br />
In Hz, 0 means same as Tx frequency<br />
<br />
|-<br />
| <br />
'''&lt;eirp&gt;'''<br />
<br />
| <br />
Effective Isotropic Radiated Power received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
In dBm<br />
<br />
|-<br />
| <br />
'''&lt;updwell&gt;'''<br />
<br />
| <br />
Uplink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;dwdwell&gt;'''<br />
<br />
| <br />
Downlink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;backoff&gt;'''<br />
<br />
| <br />
Ack mode retransmission back-off procedure<br />
<br />
| <br />
false means disabled<br />
<br />
true means enabled<br />
<br />
|} <br />
<br><br />
<br />
* Depends on Module in use<br />
<br />
<br><br />
<br />
== Generic Response description ==<br />
<br />
---- <br />
<br><br />
<br />
Every AT command send a response of one of the following types:<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Visible output'''<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
'''Generic'''<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;OK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
OK response<br />
<br />
<br><br />
<br />
| <br />
OK<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response<br />
<br />
<br><br />
<br />
| <br />
ERROR<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR NOACK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response due to a missing ACK<br />
<br />
| <br />
ERROR_NOACK<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+MAC: '''<br />
<br />
| <br />
Response from MAC layer<br />
<br />
<br><br />
<br />
| <br />
+MAC:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFTX: '''<br />
<br />
| <br />
Response from RF layer (TX)<br />
<br />
<br><br />
<br />
| <br />
+RFTX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFRX: '''<br />
<br />
| <br />
Response from RF layer (RX)<br />
<br />
<br><br />
<br />
| <br />
+RFRX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+DEBUG: '''<br />
<br />
| <br />
Response from debug layer<br />
<br />
| <br />
+DEBUG:<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
|} <br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT Generic commands ==<br />
<br />
---- <br />
Intentionally left blank<br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT RF commands ==<br />
<br />
---- <br />
RF commands are dealing with the RF Layer. This layer should be started before using most of RF commands listed in this section (unless stated otherwise).<br />
<br />
3 groups of commands exist:<br />
<br />
* +RF group: commands common to TX and RX functions.<br />
* +RFTX group: commands dedicated to TX functions.<br />
* +RFRX group: commands dedicated to RX functions.<br />
<br><br />
----<br />
=== AT+RF=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RF=HELP<br />
+RF: &lt;cmd&gt;<br />
+RF: &lt;cmd&gt; are ON,OFF,?,RPER,SPER,RSW,SSW<br />
+RF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RF=ON ===<br />
<br />
This command is used to start RF layer (Radio driver) and is mandatory in order to use most of RF commands listed in this section (unless otherwise stated).<br />
<br />
==== Response ====<br />
<br />
ERROR is returned if either LoRa™WAN stack or SIGFOX™ stack is using the radio (Tx or Rx is ongoing).<br />
<br />
Else OK is returned.<br />
<br />
If LoRa™WAN stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
If SIGFOX™ stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
<br><br />
----<br />
=== AT+RF=OFF ===<br />
<br />
This command is used to stop RF layer (Radio driver). After calling this command, most of RF commands listed in this section will return ERROR (unless stated otherwise).<br />
<br />
RF layer stop (Radio driver).<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+RF=? ===<br />
<br />
This command is used to read the current RF layer state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=?<br />
+RF: OFF<br />
OK<br />
<br><br />
----<br />
=== AT+RF=RPER ===<br />
<br />
This command is used to read the Packet Error Rate state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RPER<br />
+RF: false<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SPER, === <br />
This command is used to set the Packet Error Rate state and the power offset<br />
<br />
The following formalism is used. It can be checked by the AT+RF=SPER?command:<br />
<br />
+RF=SPER,&lt;per_state&gt;,&lt;pwroffset&gt;,&lt;loracsoffset&gt;,&lt;fskcsoffset&gt;,&lt;freqcoffset&gt;<br />
<br />
&lt;per_state&gt; PER state, unchanged when absent.<br />
<br />
&lt;pwroffset&gt; is the Power offset<br />
<br />
&lt;loracoffset&gt; is the RSSI Power offset in LoRa (dB)<br />
<br />
&lt;fskcoffset&gt; is the RSSI Power offset in Fsk and Sigfox (dB)<br />
<br />
&lt;freqcoffset&gt; is the frequency offset in Sigfox (Hz) (Available in 17w01 and newer versions)<br />
<br />
<br />
When PER state is true, a counter is added at the beginning of Tx frames. This counter is used on Rx side to compute the Packet Error Rate.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;per_state&gt; is “true”, “false” or omitted.<br />
<br />
ERROR if &lt;per_state&gt; is syntactically incorrect.<br />
<br />
==== Example ====<br />
AT+RF=SPER,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RF=RSW ===<br />
<br />
This command is used to read the current LoRa and FSK synchro words. Synchro words are in hexadecimal format (see formalism on SSW command)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RSW<br />
+RF: 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SSW, === <br />
This command is used to set the synchro words.<br />
<br />
AT+RF=SSW,&lt;LoRa_SyncWord&gt;,&lt;Fsk_SyncWord&gt;<br />
<br />
&lt;LoRa_SyncWord&gt; LoRa Synchro Word (one byte)<br />
<br />
&lt;Fsk_SyncWord&gt; FSK Synchro Word (up to six bytes)<br />
<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+RF=SSW, 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFTX=HELP<br />
+RFTX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFTX: &lt;cmd&gt; are ?,SET,SEND,SNDTXT,SNDBIN,START,STOP<br />
+RFTX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=? ===<br />
<br />
Read TX parameters. This command does not need the RF layer to be ON.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFTX: &lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;<br />
<br />
==== Example ====<br />
AT+RFTX=?<br />
+RFTX : LORA,868100000,14,125000,7,1,true,8,0,false,false,0,0,0,5,false,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SET, === <br />
Write Tx parameters. This command does not need the RF layer to be ON. Only modified parameters can be specified.<br />
<br />
The following formalism is used. It can be checked by the '''''AT+RFTX=SET?''''' command:<br />
<br />
+RFTX= SET,&lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;,&lt;rxaftertx&gt;<br />
<br />
The parameters &lt;symbtimeout&gt;, &lt;rxiqinv&gt; and &lt;rxcrcon&gt; are used only when an Rx window is specified.<br />
<br />
&lt;tstamp&gt; is the absolute clock time of the module. If the time is over, the frame is immediately transmitted. Usually this timestamp is a delay added to an Rx timestamp (feature not fully implemented)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To set the &lt;pwr&gt; to 12 and the &lt;txcrcon&gt; to false:<br />
<br />
AT+RFTX=SET,,,12,,,,false<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RFTX=SEND, (for test purpose) === <br />
Transmit &lt;nb_frames&gt; numbered frames every &lt;interval&gt; ms.<br />
<br />
AT+RFTX= SEND,&lt;nb_frames&gt;,&lt;interval&gt;<br />
<br />
Default values : &lt;nb_frames&gt; = 1, &lt;interval&gt; = 500 (ms).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), transmitted frames contain a counter on 4 bytes followed by a 32 bytes fixed pattern.<br />
<br />
This command is used as a generator for Packet Error Rate (PER) computing.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nb_frames&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SEND,3,500<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=START (for test purpose) ===<br />
<br />
FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=START<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=STOP (for test purpose) ===<br />
<br />
Stop FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDTXT, === <br />
Repeat &lt;nbrepeat&gt; text frames every 500 ms.<br />
<br />
AT+RFTX= SNDTXT,&lt;txt&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat&gt; = 1.<br />
<br />
&lt;txt&gt; parameter is transmitted as received on serial link, the module doesn’t manage any character set.<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SNDTXT,HELLO WORLD,3<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDBIN, === <br />
Repeat &lt;nbrepeat&gt; binary frames every 500 ms.<br />
<br />
AT+RFTX= SNDBIN,&lt;bin&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat &gt; = 1<br />
<br />
&lt;bin&gt; parameter is hexadecimal coded in ASCII (2 ASCII characters for 1 binary byte).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
<br />
To send 2 times the 3 bytes 1A 2B 3C:<br />
<br />
AT+RFTX=SNDBIN,1A2B3C,2<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFRX=HELP<br />
+RFRX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFRX: &lt;cmd&gt; are ?,SET,RECV,START,STOP,CONTRX,LVL<br />
+RFRX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=? ===<br />
<br />
Read RX parameters.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFRX: &lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Example ====<br />
AT+RFRX=?<br />
,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=SET, === <br />
Set Rx parameters. Only modified parameter can be specified.<br />
<br />
The following formalism is used. It can be check by the '''''AT+RFRX=SET?'''''command:&lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
==== Example ====<br />
<br />
To set &lt;dr&gt; parameter to 7:<br />
<br />
AT+RFRX=SET,,,,7<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=RECV (for test purpose) ===<br />
<br />
Single frame reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer comes back to IDLE state after reception or after AT+RFRX=STOP command.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
+RFRX: &lt;per&gt;,&lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
Then, when a frame is received the unsolicited response below is sent:<br />
<br />
If &lt;per_state&gt; is true (see +RF=SPER command):<br />
<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA…<br />
<br />
Where 100% is the PER, -35.00 is the RSSI level, 7.00 is the SNR, 0 is “no CRC error”, 1521551302 is the Rx clock time in ms and 12000000CAFEDECA is the received payload, starting with the 4 bytes counter.<br />
<br />
If &lt;per_state&gt; is false:<br />
<br />
+RFRX: ,-35.00,7.00,0,1521551302,CAFEDECA…<br />
<br />
PER is not displayed and the 4 bytes counter is not present in the payload (it means that Tx device also has &lt;per_state&gt; set to false.<br />
<br />
After frame reception the Rx is automatically stopped.<br />
<br />
==== Example ====<br />
AT+RFRX=RECV<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
<br><br />
----<br />
=== AT+RFRX=START (for test purpose) ===<br />
<br />
Continuous reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer stays in RX until Rx stop command is sent (see AT+RFRX=STOP)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
When a TX has been performed during Reception, An AT+RFRX=STOP command may be needed to avoid ERROR from this command<br />
<br />
After frame reception RF layer stays in RX (RX stop command must be used to leave RX mode).<br />
<br />
==== Example ====<br />
AT+RFRX=START<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
+RFRX: 100%,-32.00,7.00,0,1521554506,13000000CAFEDECA<br />
…<br />
<br><br />
----<br />
=== AT+RFRX=STOP ===<br />
<br />
Stop single or continuous reception.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is in RX.<br />
<br />
ERROR if RF layer is not in RX.<br />
<br />
==== Example ====<br />
AT+RFRX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=CONTRX ===<br />
<br />
Continuous reception without PER computation.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
Then, for each received frame, the unsolicited response below is sent:<br />
<br />
+RFRX: &lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
<br><br />
----<br />
=== AT+RFRX=LVL (for test purpose) ===<br />
<br />
Last reception parameters read (RSSI, SNR)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
Response information is as below:<br />
<br />
+RFRX: LVL,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+RFRX=LVL<br />
+RFRX: LVL,-77.00,8.00<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
<br />
==== LoRa Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency.<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,LORA,,125000,7 <br />
OK<br />
| <br />
:Set some RX parameters. Let the channel to default frequency<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,LORA,868100000,14,125000,7<br />
OK<br />
| <br />
:set Tx modulation LoRa, freq 868100000, Tx power 14dbm, bandwidth 125KHz, SF7<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
==== FSK Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency. For FSK some rules apply on selected "bandwith/datarate" in RX and "frequency deviation/datarate" in TX. This is described in ([[MM002-xx-EU datasheet#Reference|sx1272 datasheet]])<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,FSK,868100000,125000,1200 <br />
OK<br />
| <br />
:Set some RX parameters.freq 868100000,Bandwith 125 000, Datarate 1200<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,FSK,868100000,14,,1200,,,,50000<br />
OK<br />
| <br />
:set Tx modulation FSK, freq 868100000, Tx power 14dbm, Datarate 1200, Deviation Frequency 50 000<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
== AT LoRa™WAN (MAC) commands ==<br />
<br />
---- <br />
3 types of AT strings are specified:<br />
<br />
* MAC commands: AT+MAC=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* MAC solicited responses: +MAC: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to MAC commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the MAC command and the OK response.<br />
* MAC unsolicited responses: +MAC: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the MAC command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+MAC=? to know the current MAC mode (ABP or OTAA, Class A or C).<br />
* AT+MAC=OFF and AT+MAC=ON,… to change the MAC mode.<br />
* AT+MAC=DEVADRR and unsolicited +MAC: DEVADDR,… to know the current state of an OTAA device.<br />
* AT+MAC=SNDBIN,… to send uplink frame.<br />
* +MAC: RCVBIN,… when receiving downlink frames and to know Rx windows termination.<br />
<br />
All other commands are not really required, they are mainly used by NemeusATK Java application to manage the LoRa™WAN layer (for IOT purpose, device provisioning …).<br />
<br />
<br><br />
----<br />
=== AT+MAC=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SCH,RCH,SDR,RDR,STI,RTI,SRX2,RRX2,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=ON, === <br />
This command is used to start LoRa™WAN layer and is mandatory in order to use most of MAC commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
''AT+MAC=ON,&lt;minor_ver&gt;,&lt;class&gt;,&lt;otaa&gt;''<br />
<br />
*&lt;minor_ver&gt; can be 1 or 3 (default is 3 for LoRa™WAN V1.0). V1 is no more maintained.<br />
*&lt;class&gt; is A or C.<br />
*&lt;otaa&gt; is 0 for ABP and 1 for OTAA.<br />
<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
Start LoRa™WAN layer in class A with OTAA:<br />
<br />
AT+MAC=ON,3,A,1<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=OFF ===<br />
<br />
Stop LoRa™WAN layer.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+MAC=? ===<br />
<br />
Read current LoRa™WAN layer status.<br />
<br />
To change LoRa™WAN layer status, AT+MAC=OFF and AT+MAC=ON,… must be performed.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;state&gt;,&lt;minor_ver&gt;,&lt;class&gt;,&lt;ch_pages&gt;,&lt;ism_band&gt;,&lt;otaa&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;minor_ver&gt; can be '''V'''1 or '''V'''3 (default is 3 for LoRa™WAN V1.0).<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;page&gt; is the number of pages of 16 channels available at LoRa™WAN layer (in terms of memory space).<br />
<br />
&lt;ism_band&gt; is 4 for EU433MHz, 7 for China779-787MHz, 8 is EU863-870MHz and 9 for US902-928MHz. ISM band can’t be modified dynamically, it is set at compilation time.<br />
<br />
&lt;otaa&gt; is 0 or 2 for ABP and 1 for OTAA (2 means ABP, and OTAA is not supported by the module).<br />
<br />
<br><br />
<br />
==== Example ====<br />
<br />
A class A US902-928MHz device with 80 channels (5*16) which doesn’t support OTAA:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,5,9,2<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+MAC= SNDBIN,&lt;binpyload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application).<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC=SNDBIN,1A2B3C,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVBIN, === <br />
Register for receiving downlink frames on specified port, payload is output as binary hexa string.<br />
<br />
AT+MAC= RCVBIN,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVBIN,&lt;port&gt;,&lt;more&gt;,&lt;binarypayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
The RCVBIN unsolicited response is always sent after a Tx, even if no frame has been received. It indicates the end of Rx windows.<br />
<br />
For a class A device, it is sent when a downlink frame has been received or at the end of the Rx window 2 (if no downlink frame has been received).<br />
<br />
For a class C device, it is sent when a downlink frame has been received or at the end of the Rx window 1 (if no downlink frame has been received).<br />
<br />
If the Tx was in ack mode, the RCVBIN is sent before the OK (or ERROR NOACK) response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
If the Tx was in unack mode, the RCVBIN is sent after the OK response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
==== Example ====<br />
AT+MAC= RCVBIN,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVBIN,2,true,1A2B3C4D,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC=SNDTXT, === <br />
It is the same command as AT+MAC=SNDBIN except that the payload is interpreted as text and is transmitted as received on serial link (no translation from hexa ASCII to hexa binary is performed).<br />
<br />
AT+MAC= SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
Text frame transmission.<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application)<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC= SNDTXT,HELLO WORLD,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVTXT, === <br />
Register for receiving downlink frames on specified port, payload is output as text string (translation to binary hexa string is not performed).<br />
<br />
AT+MAC=RCVTXT,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
'''By default, downlink payload are processed as binary payload, thus if the AT client application needs to receive the payload as text (without any binary hexa string translation), it must uses this command.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVTXT,&lt;port&gt;,&lt;more&gt;,&lt;textpayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
==== Example ====<br />
AT+MAC=RCVTXT,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVTXT,2,true,HELLO WORLD,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC= STOPRCV, === <br />
Unregister for receiving downlink frames on specified port.<br />
<br />
AT+MAC=STOPRCV,&lt;port&gt;<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid.<br />
<br />
ERROR if MAC is OFF or port is invalid.<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+MAC=SNDLCR, === <br />
Send a Link Check Request.<br />
<br />
AT+MAC=SNDLCR,&lt;nbrepeat&gt;<br />
<br />
&lt;nbrepeat&gt; = 0 means the LCR message is sent in unack mode on port 0.<br />
<br />
&lt;nbrepeat&gt; != 0 means the LCR message is sent in ack mode on port 0 with &lt;nbrepeat&gt; transmissions.<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and Link Check Answer has been received.<br />
<br />
ERROR if MAC is OFF or Link Check Answer has not been received and Tx was in unack mode.<br />
<br />
ERROR NOACK if Link Check Answer has not been received and Tx was in ack mode.<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
Received data is sent back as<br />
<br />
+MAC: &lt;margin&gt;,&lt;gwcnt&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+MAC=SNDLCR<br />
+MAC: 20,3,-45.00,8.00<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RCH, === <br />
Read MAC channels command.<br />
<br />
AT+MAC=RCH,&lt;chan&gt;,&lt;page&gt;,&lt;unsol_evt&gt;<br />
<br />
&lt;chan&gt; specifies the channel to read (all channels of the page if omitted or if 16)<br />
<br />
&lt;page&gt; specifies the channel page (all pages if omitted or if number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;unsol_evt&gt; specifies if unsolicited events are required (0 when not required). The unsolicited events inform the AT client application when a MAC parameter has been changed by the LoRa™WAN layer.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
For each channel, the following information is output:<br />
<br />
+MAC: &lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;busytime&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
&lt;chan&gt;: the channel index in the page (0 to 15).<br />
<br />
&lt;frequency&gt;: the frequency in Hz (0 means channel is disabled).<br />
<br />
&lt;mindr&gt;: minimum datarate allowed on the channel.<br />
<br />
&lt;maxdr&gt;: maximum datarate allowed on the channel.<br />
<br />
&lt;dutycycle&gt;: restricted duty cycle assigned to the channel (applies only when more restricted than ISM regulation specification).<br />
<br />
&lt;busytime&gt;: time in ms before the channel can be used again for Tx (due to duty cycle restrictions).<br />
<br />
&lt;page&gt;: channel page (0 to number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;rxw1freq&gt;: frequency used to open Rx window 1. 0 means same frequency as &lt;frequency&gt; parameter (available only from LoRaWAN V1.0.2, if the parameter is absent in the response, it means the firmware version is older).<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when &lt;busytime&gt; changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RCH<br />
+MAC: 0,868100000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 1,868300000,SF12BW125,SF7BW125,100,0,0,869525000<br />
+MAC: 2,868500000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 3,868850000,SF12BW125,SF7BW125,1000,0,0,0<br />
…<br />
+MAC: 15,000000000,SF12BW125,FSK50KBPS,1,0,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SCH, === <br />
Set MAC channel command.<br />
<br />
AT+MAC=SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;min_dr&gt;,&lt;max_dr&gt;,&lt;dutycycle&gt;,&lt;page&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=SCH?'''''Command.<br />
<br />
&lt;dutycycle&gt; is applied only if it is more restricted than the ISM regulation specification. 1 means 100%, 10 means 10%, 100 means 1%, ...<br />
<br />
&lt;rxw1freq&gt; is available only from LoRaWAN V1.0.2<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when LoRa™WAN layer modifies a channel and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
==== Example ====<br />
<br />
To modify channel 0:<br />
<br />
AT+MAC=SCH,0,868100000,SF12BW125,SF7BW125,100,0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC= RDR ===<br />
<br />
Read current MAC datarate command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band firmware<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current datarate changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RDR<br />
+MAC: SF12BW125,11,001F,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDR, === <br />
Set MAC data rate command.<br />
<br />
AT+MAC=SDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
Set the data rate, Tx power and number of repetitions for uplink transmission (applied to all channels compatible with the datarate). &lt;nbrep&gt; applies only to unconfirmed transmissions.<br />
<br />
&lt;chanmask&gt; and &lt;chanmaskctrl&gt; specify the channels usable for uplink access.<br />
<br />
The parameter list can be found by '''''AT+MAC=SDR?'''''Command.<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify current datarate:<br />
<br />
AT+MAC=SDR,SF12BW125,10,001F,0,0<br />
<br />
<br><br />
<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RTI ===<br />
<br />
Read MAC Time Information command.<br />
<br />
Read common channel time information.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current time info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RTI,&lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Example ====<br />
AT+MAC= RTI<br />
+MAC: 1000,2000,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC= STI, === <br />
Set MAC time information command.<br />
<br />
AT+MAC=STI,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;symbtimeout&gt;<br />
<br />
Only modified parameter can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=STI?'''''Command.<br />
<br />
The parameters &lt;rxw1&gt; and &lt;symbtimeout&gt; are common to all channels.<br />
<br />
The &lt;''rxw2''&gt; parameter is no more used because &lt;''rxw2''&gt; value is set to &lt;rxw1&gt; value + 1000 ms. It is still present for compatibility with old devices.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To modify time info:<br />
<br />
AT+MAC=STI,1000,,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RRX ===<br />
<br />
Read MAC Rx information command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current Rx info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RRX,&lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RRX<br />
+MAC: 869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SRX, === <br />
Set MAC Rx information command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SRX?'''''Command.<br />
<br />
The parameters are common to all channels.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify Rx parameters:<br />
<br />
AT+MAC=SRX,869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RSW ===<br />
<br />
This command is used to read the current LoRa™ and FSK synchro words used by LoRa™WAN layer. Synchro words are in hexadecimal format.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;LoRa™ sync_word&gt;,&lt;FSK sync_word&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RSW<br />
+MAC: 34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SSW, === <br />
This command is used to set the synchro words used by LoRa™WAN layer.<br />
<br />
AT+MAC=SSW,&lt;LoRaSyncWord&gt;,&lt;FskSyncWord&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
Synchro words are in hexadecimal.<br />
<br />
The parameter list can be found by '''''AT+MAC=SSW?'''''Command.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+MAC=SSW,34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RVAR ===<br />
<br />
This command is used to read the miscellaneous LoRa™WAN variables.<br />
<br />
This variables are Tx/Rx counters, aggregated DC and data encryption.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;txcounter&gt;,&lt;rxcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
&lt;aggregateddc&gt; values: 1 means 100%, 10 means 10%, 100 means 1%, …<br />
<br />
&lt;encryption&gt; values: 0 means no encryption, != 0 means encryption enabled.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent only when current aggregated DC changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RVAR,,,&lt;aggregateddc&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RVAR<br />
+MAC: 0,0,1,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SVAR, === <br />
This command is used to set some LoRa™WAN variables.<br />
<br />
AT+MAC=SVAR,&lt;txcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SVAR?'''''Command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To disable encryption:<br />
<br />
AT+MAC=SVAR,,,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RADR ===<br />
<br />
This command is used to read the current LoRa™WAN ADR, piggyback and back-off states.<br />
<br />
'''The ack mode retransmission back-off procedure was initially linked to ADR bit. When ADR bit was on/off, the back-off procedure was on/off. From now, the back-off procedure is linked to the back-off state, it allows to enable ADR bit without enabling the back-off procedure. If &lt;backoff&gt; parameter is absent in RADR response, it means that back-off procedure is still linked to ADR bit (older firmware version).'''<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
&lt;adr&gt;, &lt;piggyback&gt; and &lt;backoff&gt; values: true or false.<br />
<br />
==== Example ====<br />
AT+MAC=RADR<br />
+MAC: true,false,false<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SADR, === <br />
This command is used to set some LoRa™WAN ADR and piggyback states.<br />
<br />
AT+MAC=SADR,&lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SADR?'''''Command.<br />
<br />
When ADR state value is changed, ADR ack counter is reset.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct.<br />
<br />
==== Example ====<br />
<br />
To enable piggyback:<br />
<br />
AT+MAC=SADR,,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=RDEVUID ===<br />
<br />
Read device unique identifier.<br />
<br />
Device UID is coded on 8 bytes.<br />
<br />
''This command obsoletes AT+MAC=DEVUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
UID is returned as<br />
<br />
+MAC: &lt;devuid&gt;,&lt;rand_seed&gt;,&lt;read_only&gt;<br />
<br />
When read_only value is 1, it means that the device unique identifier is built from Nemeus 36 bits OUI (70B3D5326xxxxxxx). In this case the device UID can’t be modified and the security keys are not readable.<br />
<br />
==== Example ====<br />
AT+MAC=RDEVUID<br />
0010203,306A0327,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVADDR ===<br />
<br />
Read device address.<br />
<br />
''This command obsoletes AT+MAC=DEVADDR command.''<br />
<br />
''Old command still works and returns the same solicited response.''<br />
<br />
''Warning: unsolicited response changed, old one is no more sent!!!''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Address is returned as<br />
<br />
+MAC: &lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
In ABP mode, the device address is the 4 LSB of the device unique identifier.<br />
<br />
In OTAA mode, the device address is assigned by the network.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when device is in OTAA mode and at least one AT+MAC=? command has been sent.<br />
<br />
+MAC: RDEVADDR,&lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
==== Example ====<br />
<br />
Read device address of an OTAA device when not yet joint to network:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
<br />
After receipt of valid join accept, unsolicited response is sent:<br />
<br />
DEVADDR,0870C367,010203 <br />
<br><br />
----<br />
=== AT+MAC=SDEVADDR, === <br />
This command is used to modify device address when ABP mode is used.<br />
<br />
AT+MAC=SDEVADDR,&lt;devaddr&gt;<br />
<br />
If MAC layer is on in ABP mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devaddr&gt; length is 8 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVADDR,01020304<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPUID ===<br />
<br />
Read application Unique ID.<br />
<br />
Application UID is coded on 8 bytes.<br />
<br />
By default it is set to 0000000000000000.<br />
<br />
It can be modified by sending the following AT command:<br />
<br />
AT+GA=DIND,1,8301000008xxxxxxxxxxxxxxxx0000<br />
<br />
Where xxxxxxxxxxxxxxxx is the new application UID LSB first.<br />
<br />
MAC layer must be restarted to take into account new application UID (AT+MAC=OFF and AT+MAC=ON).<br />
<br />
Application UID can also be modified using AT+MAC=SAPPUID,&lt;app_uid&gt;.<br />
<br />
''This command obsoletes AT+MAC=APPUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Application UID is returned as<br />
<br />
+MAC: &lt;appuid&gt;<br />
<br />
==== Example ====<br />
<br />
Read default application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: 0000000000000000<br />
OK<br />
<br />
Set application UID to FEDCBA9876543210:<br />
<br />
0000<br />
OK<br />
<br />
Restart MAC layer:<br />
<br />
AT+MAC=OFF<br />
OK<br />
AT+MAC=ON<br />
OK<br />
<br />
Read new application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: FEDCBA9876543210<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SAPPUID, === <br />
This command is used to modify application UID.<br />
<br />
AT+MAC=SAPPUID,&lt;appuid&gt;<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;appuid&gt; length is 16 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SAPPUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPKEY ===<br />
<br />
Read application key.<br />
<br />
Application Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPKEY command.''<br />
<br />
''Old command still works and returns the &lt;appkey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application key is returned as<br />
<br />
+MAC: &lt;appkey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPKEY<br />
+MAC: A8FA642E2E3245BB9B8CAC7E2456EF3C<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPKEY<br />
+MAC: 3CEF56247EAC8C9BBB45322E2E64FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RNSKEY ===<br />
<br />
Read Network Session Key.<br />
<br />
Network Session Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=NSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=NSKEY command.''<br />
<br />
''Old command still works and returns the &lt;nskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Network session key is returned as<br />
<br />
+MAC: &lt;nskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RNSKEY<br />
+MAC: A8F1642E2E32453B9B8CAC7C2456EF72<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=NSKEY<br />
+MAC: 72EF56247CAC8C9B3B45322E2E64F1A8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPSKEY ===<br />
<br />
Read application session key.<br />
<br />
Application session key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPSKEY command.''<br />
<br />
''Old command still works and returns the &lt;appskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application session key is returned as<br />
<br />
+MAC: &lt;appskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPSKEY<br />
+MAC: A8FA672E2E4245BB9ECCCA7E64F54C38<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPSKEY<br />
+MAC: 384CF5647ECACC9EBB45422E2E67FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RMC ===<br />
<br />
Read MultiCast parameters. <span style="color:red">Multicast is only available from master18Wxx</span>.<br />
<br />
==== Response ====<br />
<br />
OK when the command is supported by the firmware.<br />
<br />
ERROR when it is not supported.<br />
<br />
Multicast parameters are returned as<br />
<br />
+MAC: &lt;addr&gt;,&lt;addr_mask&gt;,&lt;group_mask&gt;,&lt;fcnt_dw&gt;,&lt;net_skey&gt;,&lt;app_skey&gt;<br />
<br />
- &lt;addr&gt;: the multicast address (32 bits)<br />
- &lt;addr_mask&gt;: the significant part of the multicast address (More Significant bits) coded on 32 bits.<br />
- &lt;group_mask&gt;: the groups the device can receive (32 bits => groups 0 to 31).<br />
- &lt;fcnt_dw&gt;: the current value of the downlink frame counter (32 bits).<br />
- &lt;net_skey&gt;: the network security key for integrity checking (128 bits).<br />
- &lt;app_skey&gt;: the application security key for payload ciphering (128 bits).<br />
<br />
The address mask specifies which part of the received address is processed as an address and which part is processed as a group.<br />
The address mask can take the following values:<br />
- 0x00000000: the multicast function is disabled<br />
- 0xFFFFFFFF: only 1 group is possible<br />
- 0xFFFFFFFE: 2 groups are possible<br />
- 0xFFFFFFFC: 4 groups are possible<br />
- 0xFFFFFFF8: 8 groups are possible<br />
- 0xFFFFFFF0: 16 groups are possible<br />
- 0xFFFFFFE0: 32 groups are possible<br />
<br />
==== Example ====<br />
AT+MAC=RMC<br />
+MAC: 789ABCDE,FFFFFFFC,00000007,0,0102030405060708090A0B0C0D0E0F00,0102030405060708090A0B0C0D0E0F00<br />
OK<br />
With such parameters, the following received addresses are processed:<br />
- 0x789ABCDC: valid multicast address, group 0 is accepted because bit0 of group mask is set<br />
- 0x789ABCDD: valid multicast address, group 1 is accepted because bit1 of group mask is set<br />
- 0x789ABCDE: valid multicast address, group 2 is accepted because bit2 of group mask is set<br />
- 0x789ABCDF: valid multicast address, group 3 is rejected because bit3 of group mask is not set<br />
When the address is accepted (valid multicast address and accepted group) then the MIC is computed thanks to network security key.<br />
If the computed MIC matches with the received MIC then the payload is deciphered thanks to application security key and the resulting payload is pushed to the application addressed by the LoRaWAN port.<br />
<br />
<br><br />
----<br />
<br />
=== AT+MAC=SMC ===<br />
<br />
Set MultiCast parameters. <span style="color:red">Multicast is only available from master18Wxx</span>.<br />
AT+MAC=SMC,&lt;addr&gt;,&lt;addr_mask&gt;,&lt;group_mask&gt;,&lt;fcnt_dw&gt;,&lt;net_skey&gt;,&lt;app_skey&gt;<br />
See AT+MAC=RMC for parameter description<br />
<br />
==== Response ====<br />
<br />
OK when the command is supported by the firmware and the parameters are valid.<br />
<br />
ERROR when it is not supported or parameters are invalid (especially &lt;group_mask&gt; parameter which can take 7 different values).<br />
<br />
<br />
==== Example ====<br />
AT+MAC=SMC,789ABCDE,FFFFFFFC,00000007,0,0102030405060708090A0B0C0D0E0F00,0102030405060708090A0B0C0D0E0F00<br />
OK<br />
<br />
<br><br />
----<br />
<br />
=== Informative examples ===<br />
==== Device start ====<br />
<br />
AT client application can detect a device start or restart when the unsolicited response +DEBUG: START,&lt;version&gt; is received. Depending on initialization timing, AT client application is not sure to receive this unsolicited response, that’s the reason why it is recommended that AT client application use AT+MAC=? command to synchronize with the device.<br />
<br />
<br><br />
<br />
<u>'''OTAA case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
+MAC: RDEVADDR,0870C367,010203 <br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<u>'''ABP case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,0 <br />
OK<br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<br><br />
<br />
==== Send unconfirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''No downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
AT+MAC=SNDBIN,,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
==== Send confirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''Ack received, no downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,0,false,,-60.00,7.00 <br />
OK <br />
<br />
<u>'''Ack not received:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
ERROR NOACK <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
OK <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
AT+MAC=SNDBIN,,0,2,1 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
OK <br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT SIGFOX™ commands ==<br />
<br />
---- <br />
These commands are available only on Nemeus modules embedding SIGFOX™ library. If the library is not embedded then ERROR is returned.<br />
<br />
3 type of AT strings are specified:<br />
<br />
* SF commands: AT+SF=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* SF solicited responses: +SF: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to SF commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the SF command and the OK response.<br />
* SF unsolicited responses: +SF: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the SF command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+SF=? to know the current SIGFOX™ layer state.<br />
* AT+SF=OFF and AT+SF=ON to stop and start SIGFOX™ layer.<br />
* AT+SF=SNDBIN,… to send uplink frame.<br />
* AT+SF=SNDBIT,… to send uplink bit.<br />
* AT+SF=SNDOOB to send uplink out of band message (keep alive messages).<br />
* +SF: RCVBIN,… when receiving downlink frames.<br />
<br />
All other commands are not really required, they are mainly used to configure SIGFOX™ layer and to perform SIGFOX™ qualification tests.<br />
<br />
SIGFOX™ proprietary AT command set is also supported but not described in this document.<br />
<br />
<br><br />
----<br />
=== AT+SF=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+SF=HELP<br />
+SF: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+SF: &lt;cmd&gt; are ON,OFF,?,SNDBIN,SNDBIT,SNDOOB,SREP,RREP,STXF,RTXF,SRXF,RRXF,STXP,RTXP<br />
+SF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+SF=ON ===<br />
<br />
This command is used to start SIGFOX™ layer and is mandatory in order to use most of SF commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
==== Response ====<br />
<br />
If LoRa™WAN stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=ON<br />
OK<br />
<br><br />
----<br />
=== AT+SF=OFF ===<br />
<br />
Stop SIGFOX™ layer.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=OFF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=? ===<br />
<br />
Read current SIGFOX™ layer status.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ library is embedded OK is returned.<br />
<br />
Else ERROR is returned.<br />
<br />
+SF: &lt;state&gt;,&lt;NMS_lib_ver&gt;,&lt;SFX_lib_ver&gt;,&lt;dev_id&gt;,&lt;initial_pac&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;NMS_lib_ver&gt; is the version of Nemeus library used to communicate with SIGFOX™ network.<br />
<br />
&lt;SFX_lib_ver&gt; is the version of SIGFOX™ library.<br />
<br />
&lt;dev_id&gt; is the device unique identifier on SIGFOX™ network.<br />
<br />
&lt;initial_pac&gt; is the first Portability Access Code used to register the device on SIGFOX™ network. It is used one time for first registration.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=?<br />
+SF: ON,NMS-SFX-LIB-1.2,UDL1-1.6.0,000ABCDE,0123456789ABCDEF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+SF=SNDBIN,&lt;binpayload&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the frame is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the frame is sent in acknowledged mode.<br />
<br />
The frame is sent when channel becomes free regarding duty cycle limitations.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIN,CAFE,1<br />
+SF: SND,4576<br />
+SF: SND,0<br />
+SF: 6282<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDBIT, === <br />
Bit transmission.<br />
<br />
AT+SF=SNDBIT,&lt;bitvalue&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the bit is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the bit is sent in acknowledged mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIT,0,1<br />
+SF: SND,6422<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDOOB ===<br />
<br />
Out Of Band message transmission.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it can be used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent.<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent.<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
==== Example ====<br />
AT+SF=SNDOOB<br />
+SF: SND,3987<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
<br><br />
----<br />
=== AT+SF=RREP ===<br />
<br />
Read Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;repeat&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 2 repetitions.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RREP<br />
+SF: 2<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SREP, === <br />
<br />
Set Tx repetitions used in acked mode.<br />
<br />
AT+SF=SREP,&lt;repeatnb&gt;<br />
<br />
==== Response ====<br />
<br />
Default value is 2 repetitions.<br />
<br />
OK if number of repetitions &lt;= 2.<br />
<br />
ERROR if number of repetitions &gt; 2.<br />
<br />
==== Example ====<br />
AT+SF=SREP,1<br />
OK<br />
AT+SF=SREP,3<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXF ===<br />
<br />
Read output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 868130000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXF<br />
+SF: 868130000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXF, === <br />
Set output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= tx_frequency &lt;= 870000000.<br />
<br />
ERROR if tx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=STXF,868200000<br />
OK<br />
AT+SF=STXF,862200000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RRXF ===<br />
<br />
Read reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;rx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 869525000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RRXF<br />
+SF: 869525000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SRXF, === <br />
Set reception carrier macro channel.<br />
<br />
AT+SF=SRXF,&lt;rx_frequency&gt;<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= rx_frequency &lt;= 870000000.<br />
<br />
ERROR if rx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=SRXF,869525000<br />
OK<br />
AT+SF=SRXF,869525000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXP (for test purpose) ===<br />
<br />
Read Tx power applied to FSK continuous wave<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_power&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 14 dBm.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXP<br />
+SF: 14<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SF=STXP (for test purpose) === <br />
Set Tx power applied to FSK continuous wave<br />
<br />
==== Response ====<br />
<br />
OK if tx_power &lt;= 14 dBm.<br />
<br />
ERROR if tx_power &gt; 14 dBm.<br />
<br />
==== Example ====<br />
AT+SF=STXP,10<br />
OK<br />
AT+SF=STXP,20<br />
ERROR<br />
<br />
<br><br />
<br />
== AT Generic command ==<br />
<br />
---- <br />
AT Generic command can be used to activate/deactivate some generic functionalities.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8801 ===<br />
<br />
This command is use to know the status of PowerSaving.<br />
<br />
==== Response ====<br />
<br />
+GA : DIND,1,0801&lt;pwr_state&gt;<br />
<br />
Always OK.<br />
<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,8801<br />
<br />
+GA : DIND,1,080100<br />
<br />
OK.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8802&lt;pwr_state&gt; ===<br />
<br><br />
'''WARNING: CONNECT CORRECTLY THE WAKEUP PIN BEFORE ACTIVATION OF POWERSAVING'''<br />
<br><br />
This command is use to set the PowerSaving.<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
PowerSaving can be activated once after boot-up, and from this point will go in stop mode as soon as possible and is wake-up by RTC or Wakeup pin.<br />
Please note that once power-saving is activated, user should toggle wake-up pin before sending an AT command.<br />
<br />
If the module is reset, the powersaving is set back to OFF. So User should ensure setting it to ON after any reset<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,880201<br />
<br />
OK<br />
<br />
<br><br />
----<br />
<br />
== AT debug command ==<br />
<br />
---- <br />
AT debug command can be used to activate/deactivate some debug functionalities.<br />
<br />
<br><br />
----<br />
=== AT+DEBUG= HELP ===<br />
<br />
This commandis use to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= HELP<br />
+DEBUG: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+DEBUG: &lt;cmd&gt; are MVER,MVOFF,MVON,MV?,MEOFF,MEON,ME?,MPOFF,MPON,MP?,RREAD,RWRITE<br />
+DEBUG: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG=MVER ===<br />
<br />
Read Mcu software version.<br />
<br />
Furthermore, when the device boots the software version is sent as an unsolicited response:<br />
<br />
+DEBUG: START,&lt;version&gt;<br />
<br />
This unsolicited response can be used to detect a reset of the device.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: MVER,&lt;version&gt;<br />
<br />
==== Example ====<br />
<br />
AT boot:<br />
<br />
+DEBUG: START,Nemeus 1.x<br />
<br />
When requested:<br />
<br />
AT+DEBUG= MVER<br />
+DEBUG: MVER,Nemeus 1.x<br />
OK<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+DEBUG= MVOFF ===<br />
<br />
Disable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MVON ===<br />
<br />
Enable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
OK if software is compiled with debug traces.<br />
<br />
ERROR if software is compiled without debug traces.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MV? ===<br />
<br />
Read current verbose mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;verbose&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MV?<br />
+DEBUG: MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEOFF ===<br />
<br />
Disable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEON ===<br />
<br />
Enable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= ME? ===<br />
<br />
Read current echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;echo&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= ME?<br />
+DEBUG: MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPOFF ===<br />
<br />
Disable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPON ===<br />
<br />
Enable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MP? ===<br />
<br />
Read current prompt mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;prompt&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MP?<br />
+DEBUG: MPON<br />
OK</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_AT_Commands&diff=339MM002-xx-EU AT Commands2018-10-09T08:15:43Z<p>Lcs: /* AT+MAC=SMC */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
AT commands are used as an interface with Nemeus Communication modules. Modules can be driven at 3 different levels:<br />
<br />
* Radio level: embedded AT server uses RF SX127x driver API (LoRa™and FSK modulations can be used).<br />
* LoRa™WAN level: embedded AT server uses LoRa™WAN library API(available only when the library is present in embedded software).<br />
* SIGFOX™ level: embedded AT server uses SIGFOX™ library API(available only when the library is present in embedded software).<br />
<br />
<u>'''When radio level is used'''</u>, no device personalization is required, it is up to AT client application to implement network layer according to the network the device is attached (the module doesn’t know the network).<br />
<br />
<u>'''When LoRa™WAN level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* Whatever the activation type, a 64 bits device unique identifier.<br />
* When Activation By Personalization (ABP) is used:<br />
** An AES128 network security key for MIC computation and encryptionof MAC control commands on port 0.<br />
** An AES128 application security key for encryption of applicationpayloads (not required when data encryption is disabled on themodule).<br />
* When Over The Air Activation (OTAA) is used:<br />
** A 64 bits application unique identifier.<br />
** An AES128 application Key used to derive the network andapplication security keys.<br />
<br />
In first software versions (before 15W40) the module generates unique identifiers and keys, these default LoRa™WAN personalization parameters are modifiable by AT commands. It allows customers to personalize their devices according to the network operator rules.<br />
<br />
In further software versions, modules are personalized with Nemeus OUI during production phase and they can’t be modified. In this case the device unique identifier is read-only and the AES128 keys are hidden. The application unique identifier is still modifiable by AT command.<br />
<br />
<u>'''When SIGFOX™ level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* The read-only device unique identifier.<br />
* The hidden AES128 security key.<br />
* The initial read-only Portability Access Code (PAC).<br />
<br />
Before driving the module, the AT client application must activate the level it wants to use.<br />
<br />
Only one level can be activated at a time.<br />
<br />
When activating a level, a previously activated level is automatically deactivated.<br />
<br />
<br />
[[File:Mm002_serial_diagram.png|center|500px]]<br />
<br><br><br />
For evaluation/test purpose, Nemeus recommends to use NemeusATK java application to drive the module.<br />
<br><br><br />
{{TOC limit|3}}<br />
<br />
== UART configuration ==<br />
<br />
The UART configuration for Modem connection is as follows:<br />
<br />
* Baud Rate : 38400<br />
* Data : 8 bits<br />
* Parity : None<br />
* Stop : 1 bit<br />
* Flow control : None<br />
* End line character : &lt;LF&gt;<br />
<br />
<br><br />
<br><br />
<br />
E.g. Typical configuration given by ‘stty’ command on linux:<br />
<br />
''speed 38400 baud; rows 0; columns 0; line = 0;''<br />
<br />
''intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 = &lt;undef&gt;;swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;flush = ^O; min = 1; time = 0;''<br />
<br />
''-parenb -parodd cs8 hupcl -cstopb cread clocal –crtsct signbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff –iuclc -ixany -imaxbel -iutf8''<br />
<br />
''-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop –echoprt -echoctl -echoke''<br />
<br />
<br><br />
<br />
== AT commands ==<br />
<br />
---- <br />
At command are split according to communication layers. This is a list of main AT commands for SW given in ‘compatibility’ paragraph. The full list and limitation can be found in SW delivery note.<br />
<br />
Formalism is the following:<br />
<br />
<br> <br />
<br><br />
[[File:AT-command-line.png|center]]<br />
<br><br />
<br><br />
<br />
For each group among RF, RFRX, RFTX, MAC and SFX, the command AT+&lt;group&gt;= HELP describes available sub-commands. Example:<br />
<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SET,SCH,RCH,STI,RTI,SRX,RRX,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br />
When a sub-command has parameter, AT+&lt;group&gt;= &lt;cmd&gt;? Describes the parameter list. Example:<br />
<br />
AT+MAC=SNDTXT?<br />
+MAC: SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
OK<br />
<br />
When command is unknown “command not found (‘try help’)” is returned.<br />
<br />
AT commands are not cancelable, thus AT client application must wait for AT response before sending a new command.<br />
<br />
<br><br />
<br />
== Generic Parameter description ==<br />
<br />
---- <br />
Following table describes mains parameters used with AT commands.<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Type'''<br />
<br />
|-<br />
| <br />
'''&lt;mod&gt;'''<br />
<br />
| <br />
Modulation to be use<br />
<br />
| <br />
LORA/FSK<br />
<br />
|-<br />
| <br />
'''&lt;freq&gt;'''<br />
<br />
| <br />
Carrier frequency<br />
<br />
| <br />
Expressed in Hertz *<br />
<br />
|-<br />
| <br />
'''&lt;pwr&gt;'''<br />
<br />
| <br />
Tx power (range depends on Module definition; e.g. MM001 -1dBm to 14dBm)<br />
<br />
| <br />
In dBm *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;bw&gt;'''<br />
<br />
| <br />
Bandwidth from 125kHz to 500 kHz<br />
<br />
| <br />
In Hertz *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;dr&gt;'''<br />
<br />
| <br />
Spreading Factor in LoRa mode<br />
<br />
Data rate in FSK mode<br />
<br />
| <br />
6/7 to 12 *<br />
<br />
In kb/s<br />
<br />
|-<br />
| <br />
'''&lt;cr&gt;'''<br />
<br />
| <br />
Coding Rate (LoRa mode only)<br />
<br />
| <br />
1 to 4<br />
<br />
|-<br />
| <br />
'''&lt;min/maxdr&gt;'''<br />
<br />
| <br />
Data rate range<br />
<br />
| <br />
SF7BW125 to SF12BW125, SF7BW250 or FSK50KBPS<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxcrcon&gt;'''<br />
<br />
| <br />
Flag for CRC check activation in TX or RX<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;preamble&gt;'''<br />
<br />
| <br />
Length of the preamble<br />
<br />
| <br />
6 to 65535<br />
<br />
|-<br />
| <br />
'''&lt;f_dev&gt;'''<br />
<br />
| <br />
Frequency deviation (FSK mode only)<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;fixed_len&gt;'''<br />
<br />
| <br />
When true, PHY payload is constant (no header)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxiqinv'''<br />
<br />
| <br />
Flag for IQ inversion in TX or RX (LoRa mode only)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;rxw1&gt;'''<br />
<br />
| <br />
Delay before RX windows 1<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;rxw2&gt;'''<br />
<br />
| <br />
Delay before RX windows 2 ; NOTE: rx_w2 must be longer than rx_w1.<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;tstamp&gt;'''<br />
<br />
| <br />
Rx ot Tx timestamp<br />
<br />
| <br />
In ticks<br />
<br />
|-<br />
| <br />
'''&lt;symbtimeout&gt;'''<br />
<br />
| <br />
Number of symbols before RX timeout<br />
<br />
| <br />
5 to 1023<br />
<br />
|-<br />
| <br />
'''&lt;port&gt;'''<br />
<br />
| <br />
MAC port<br />
<br />
| <br />
0 to 10<br />
<br />
|-<br />
| <br />
'''&lt;textpayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in ASCII<br />
<br />
| <br />
ASCII string<br />
<br />
|-<br />
| <br />
'''&lt; binarypayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in hexadecimal coded in ASCII<br />
<br />
| <br />
ASCII string containing 0 to F characters<br />
<br />
|-<br />
| <br />
'''&lt;chan&gt;'''<br />
<br />
| <br />
Identifies one of the 8 MAC channels<br />
<br />
| <br />
0 to 7<br />
<br />
|-<br />
| <br />
'''&lt;enable&gt;'''<br />
| <br />
Indicates the status of a channel<br />
|<br />
True or false<br />
|-<br />
| <br />
'''&lt;nbrepeat&gt;'''<br />
| <br />
Number of repetitions when sending a payload.<br />
<br />
At MAC level this parameter indicates if data confirmed must be used or not (0 means unacked mode&gt;).<br />
<br />
| <br />
0 to N<br />
<br />
|-<br />
| <br />
'''&lt;interval&gt;'''<br />
| <br />
Time interval between repetitions<br />
| <br />
In ms<br />
|-<br />
| <br />
'''&lt;hexaddress&gt;'''<br />
| <br />
Address of a registry in hexadecimal<br />
| <br />
<br><br />
|-<br />
| <br />
'''&lt;nbbytes&gt;'''<br />
| <br />
<br><br />
| <br />
0 to 4<br />
|-<br />
| <br />
'''&lt;byteN&gt;'''<br />
| <br />
Byte to write<br />
| <br />
0x00 to 0xFF<br />
|-<br />
| <br />
'''&lt;margin&gt;'''<br />
| <br />
Link demodulation margin above the demodulation floor computed by the nearest gateway<br />
| <br />
0 to 254 in dB<br />
|-<br />
| <br />
'''&lt;gwcnt&gt;'''<br />
| <br />
Number of gateways which received the MAC message<br />
| <br />
1 to N<br />
|-<br />
| <br />
'''&lt;devuid&gt;'''<br />
| <br />
Device unique identifier<br />
| <br />
8 bytes<br />
|-<br />
| <br />
'''&lt;devaddr&gt;'''<br />
| <br />
Device address (4 LSB of &lt;devuid&gt;)<br />
| <br />
4 bytes<br />
|-<br />
| <br />
'''&lt;more&gt;'''<br />
| <br />
Indicates if more downlink data is pending<br />
| <br />
true or false<br />
|-<br />
| <br />
'''&lt;mode&gt;'''<br />
| <br />
LoRa MAC transmission mode<br />
| <br />
0 for confirmed data<br />
not 0 for unconfirmed data<br />
|-<br />
| <br />
'''&lt;rxw1freq&gt;'''<br />
| <br />
Channel frequency used for Rx window 1<br />
<br />
| <br />
In Hz, 0 means same as Tx frequency<br />
<br />
|-<br />
| <br />
'''&lt;eirp&gt;'''<br />
<br />
| <br />
Effective Isotropic Radiated Power received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
In dBm<br />
<br />
|-<br />
| <br />
'''&lt;updwell&gt;'''<br />
<br />
| <br />
Uplink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;dwdwell&gt;'''<br />
<br />
| <br />
Downlink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;backoff&gt;'''<br />
<br />
| <br />
Ack mode retransmission back-off procedure<br />
<br />
| <br />
false means disabled<br />
<br />
true means enabled<br />
<br />
|} <br />
<br><br />
<br />
* Depends on Module in use<br />
<br />
<br><br />
<br />
== Generic Response description ==<br />
<br />
---- <br />
<br><br />
<br />
Every AT command send a response of one of the following types:<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Visible output'''<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
'''Generic'''<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;OK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
OK response<br />
<br />
<br><br />
<br />
| <br />
OK<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response<br />
<br />
<br><br />
<br />
| <br />
ERROR<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR NOACK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response due to a missing ACK<br />
<br />
| <br />
ERROR_NOACK<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+MAC: '''<br />
<br />
| <br />
Response from MAC layer<br />
<br />
<br><br />
<br />
| <br />
+MAC:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFTX: '''<br />
<br />
| <br />
Response from RF layer (TX)<br />
<br />
<br><br />
<br />
| <br />
+RFTX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFRX: '''<br />
<br />
| <br />
Response from RF layer (RX)<br />
<br />
<br><br />
<br />
| <br />
+RFRX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+DEBUG: '''<br />
<br />
| <br />
Response from debug layer<br />
<br />
| <br />
+DEBUG:<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
|} <br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT Generic commands ==<br />
<br />
---- <br />
Intentionally left blank<br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT RF commands ==<br />
<br />
---- <br />
RF commands are dealing with the RF Layer. This layer should be started before using most of RF commands listed in this section (unless stated otherwise).<br />
<br />
3 groups of commands exist:<br />
<br />
* +RF group: commands common to TX and RX functions.<br />
* +RFTX group: commands dedicated to TX functions.<br />
* +RFRX group: commands dedicated to RX functions.<br />
<br><br />
----<br />
=== AT+RF=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RF=HELP<br />
+RF: &lt;cmd&gt;<br />
+RF: &lt;cmd&gt; are ON,OFF,?,RPER,SPER,RSW,SSW<br />
+RF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RF=ON ===<br />
<br />
This command is used to start RF layer (Radio driver) and is mandatory in order to use most of RF commands listed in this section (unless otherwise stated).<br />
<br />
==== Response ====<br />
<br />
ERROR is returned if either LoRa™WAN stack or SIGFOX™ stack is using the radio (Tx or Rx is ongoing).<br />
<br />
Else OK is returned.<br />
<br />
If LoRa™WAN stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
If SIGFOX™ stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
<br><br />
----<br />
=== AT+RF=OFF ===<br />
<br />
This command is used to stop RF layer (Radio driver). After calling this command, most of RF commands listed in this section will return ERROR (unless stated otherwise).<br />
<br />
RF layer stop (Radio driver).<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+RF=? ===<br />
<br />
This command is used to read the current RF layer state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=?<br />
+RF: OFF<br />
OK<br />
<br><br />
----<br />
=== AT+RF=RPER ===<br />
<br />
This command is used to read the Packet Error Rate state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RPER<br />
+RF: false<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SPER, === <br />
This command is used to set the Packet Error Rate state and the power offset<br />
<br />
The following formalism is used. It can be checked by the AT+RF=SPER?command:<br />
<br />
+RF=SPER,&lt;per_state&gt;,&lt;pwroffset&gt;,&lt;loracsoffset&gt;,&lt;fskcsoffset&gt;,&lt;freqcoffset&gt;<br />
<br />
&lt;per_state&gt; PER state, unchanged when absent.<br />
<br />
&lt;pwroffset&gt; is the Power offset<br />
<br />
&lt;loracoffset&gt; is the RSSI Power offset in LoRa (dB)<br />
<br />
&lt;fskcoffset&gt; is the RSSI Power offset in Fsk and Sigfox (dB)<br />
<br />
&lt;freqcoffset&gt; is the frequency offset in Sigfox (Hz) (Available in 17w01 and newer versions)<br />
<br />
<br />
When PER state is true, a counter is added at the beginning of Tx frames. This counter is used on Rx side to compute the Packet Error Rate.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;per_state&gt; is “true”, “false” or omitted.<br />
<br />
ERROR if &lt;per_state&gt; is syntactically incorrect.<br />
<br />
==== Example ====<br />
AT+RF=SPER,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RF=RSW ===<br />
<br />
This command is used to read the current LoRa and FSK synchro words. Synchro words are in hexadecimal format (see formalism on SSW command)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RSW<br />
+RF: 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SSW, === <br />
This command is used to set the synchro words.<br />
<br />
AT+RF=SSW,&lt;LoRa_SyncWord&gt;,&lt;Fsk_SyncWord&gt;<br />
<br />
&lt;LoRa_SyncWord&gt; LoRa Synchro Word (one byte)<br />
<br />
&lt;Fsk_SyncWord&gt; FSK Synchro Word (up to six bytes)<br />
<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+RF=SSW, 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFTX=HELP<br />
+RFTX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFTX: &lt;cmd&gt; are ?,SET,SEND,SNDTXT,SNDBIN,START,STOP<br />
+RFTX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=? ===<br />
<br />
Read TX parameters. This command does not need the RF layer to be ON.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFTX: &lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;<br />
<br />
==== Example ====<br />
AT+RFTX=?<br />
+RFTX : LORA,868100000,14,125000,7,1,true,8,0,false,false,0,0,0,5,false,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SET, === <br />
Write Tx parameters. This command does not need the RF layer to be ON. Only modified parameters can be specified.<br />
<br />
The following formalism is used. It can be checked by the '''''AT+RFTX=SET?''''' command:<br />
<br />
+RFTX= SET,&lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;,&lt;rxaftertx&gt;<br />
<br />
The parameters &lt;symbtimeout&gt;, &lt;rxiqinv&gt; and &lt;rxcrcon&gt; are used only when an Rx window is specified.<br />
<br />
&lt;tstamp&gt; is the absolute clock time of the module. If the time is over, the frame is immediately transmitted. Usually this timestamp is a delay added to an Rx timestamp (feature not fully implemented)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To set the &lt;pwr&gt; to 12 and the &lt;txcrcon&gt; to false:<br />
<br />
AT+RFTX=SET,,,12,,,,false<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RFTX=SEND, (for test purpose) === <br />
Transmit &lt;nb_frames&gt; numbered frames every &lt;interval&gt; ms.<br />
<br />
AT+RFTX= SEND,&lt;nb_frames&gt;,&lt;interval&gt;<br />
<br />
Default values : &lt;nb_frames&gt; = 1, &lt;interval&gt; = 500 (ms).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), transmitted frames contain a counter on 4 bytes followed by a 32 bytes fixed pattern.<br />
<br />
This command is used as a generator for Packet Error Rate (PER) computing.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nb_frames&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SEND,3,500<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=START (for test purpose) ===<br />
<br />
FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=START<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=STOP (for test purpose) ===<br />
<br />
Stop FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDTXT, === <br />
Repeat &lt;nbrepeat&gt; text frames every 500 ms.<br />
<br />
AT+RFTX= SNDTXT,&lt;txt&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat&gt; = 1.<br />
<br />
&lt;txt&gt; parameter is transmitted as received on serial link, the module doesn’t manage any character set.<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SNDTXT,HELLO WORLD,3<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDBIN, === <br />
Repeat &lt;nbrepeat&gt; binary frames every 500 ms.<br />
<br />
AT+RFTX= SNDBIN,&lt;bin&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat &gt; = 1<br />
<br />
&lt;bin&gt; parameter is hexadecimal coded in ASCII (2 ASCII characters for 1 binary byte).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
<br />
To send 2 times the 3 bytes 1A 2B 3C:<br />
<br />
AT+RFTX=SNDBIN,1A2B3C,2<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFRX=HELP<br />
+RFRX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFRX: &lt;cmd&gt; are ?,SET,RECV,START,STOP,CONTRX,LVL<br />
+RFRX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=? ===<br />
<br />
Read RX parameters.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFRX: &lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Example ====<br />
AT+RFRX=?<br />
,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=SET, === <br />
Set Rx parameters. Only modified parameter can be specified.<br />
<br />
The following formalism is used. It can be check by the '''''AT+RFRX=SET?'''''command:&lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
==== Example ====<br />
<br />
To set &lt;dr&gt; parameter to 7:<br />
<br />
AT+RFRX=SET,,,,7<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=RECV (for test purpose) ===<br />
<br />
Single frame reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer comes back to IDLE state after reception or after AT+RFRX=STOP command.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
+RFRX: &lt;per&gt;,&lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
Then, when a frame is received the unsolicited response below is sent:<br />
<br />
If &lt;per_state&gt; is true (see +RF=SPER command):<br />
<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA…<br />
<br />
Where 100% is the PER, -35.00 is the RSSI level, 7.00 is the SNR, 0 is “no CRC error”, 1521551302 is the Rx clock time in ms and 12000000CAFEDECA is the received payload, starting with the 4 bytes counter.<br />
<br />
If &lt;per_state&gt; is false:<br />
<br />
+RFRX: ,-35.00,7.00,0,1521551302,CAFEDECA…<br />
<br />
PER is not displayed and the 4 bytes counter is not present in the payload (it means that Tx device also has &lt;per_state&gt; set to false.<br />
<br />
After frame reception the Rx is automatically stopped.<br />
<br />
==== Example ====<br />
AT+RFRX=RECV<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
<br><br />
----<br />
=== AT+RFRX=START (for test purpose) ===<br />
<br />
Continuous reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer stays in RX until Rx stop command is sent (see AT+RFRX=STOP)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
When a TX has been performed during Reception, An AT+RFRX=STOP command may be needed to avoid ERROR from this command<br />
<br />
After frame reception RF layer stays in RX (RX stop command must be used to leave RX mode).<br />
<br />
==== Example ====<br />
AT+RFRX=START<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
+RFRX: 100%,-32.00,7.00,0,1521554506,13000000CAFEDECA<br />
…<br />
<br><br />
----<br />
=== AT+RFRX=STOP ===<br />
<br />
Stop single or continuous reception.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is in RX.<br />
<br />
ERROR if RF layer is not in RX.<br />
<br />
==== Example ====<br />
AT+RFRX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=CONTRX ===<br />
<br />
Continuous reception without PER computation.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
Then, for each received frame, the unsolicited response below is sent:<br />
<br />
+RFRX: &lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
<br><br />
----<br />
=== AT+RFRX=LVL (for test purpose) ===<br />
<br />
Last reception parameters read (RSSI, SNR)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
Response information is as below:<br />
<br />
+RFRX: LVL,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+RFRX=LVL<br />
+RFRX: LVL,-77.00,8.00<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
<br />
==== LoRa Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency.<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,LORA,,125000,7 <br />
OK<br />
| <br />
:Set some RX parameters. Let the channel to default frequency<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,LORA,868100000,14,125000,7<br />
OK<br />
| <br />
:set Tx modulation LoRa, freq 868100000, Tx power 14dbm, bandwidth 125KHz, SF7<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
==== FSK Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency. For FSK some rules apply on selected "bandwith/datarate" in RX and "frequency deviation/datarate" in TX. This is described in ([[MM002-xx-EU datasheet#Reference|sx1272 datasheet]])<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,FSK,868100000,125000,1200 <br />
OK<br />
| <br />
:Set some RX parameters.freq 868100000,Bandwith 125 000, Datarate 1200<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,FSK,868100000,14,,1200,,,,50000<br />
OK<br />
| <br />
:set Tx modulation FSK, freq 868100000, Tx power 14dbm, Datarate 1200, Deviation Frequency 50 000<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
== AT LoRa™WAN (MAC) commands ==<br />
<br />
---- <br />
3 types of AT strings are specified:<br />
<br />
* MAC commands: AT+MAC=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* MAC solicited responses: +MAC: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to MAC commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the MAC command and the OK response.<br />
* MAC unsolicited responses: +MAC: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the MAC command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+MAC=? to know the current MAC mode (ABP or OTAA, Class A or C).<br />
* AT+MAC=OFF and AT+MAC=ON,… to change the MAC mode.<br />
* AT+MAC=DEVADRR and unsolicited +MAC: DEVADDR,… to know the current state of an OTAA device.<br />
* AT+MAC=SNDBIN,… to send uplink frame.<br />
* +MAC: RCVBIN,… when receiving downlink frames and to know Rx windows termination.<br />
<br />
All other commands are not really required, they are mainly used by NemeusATK Java application to manage the LoRa™WAN layer (for IOT purpose, device provisioning …).<br />
<br />
<br><br />
----<br />
=== AT+MAC=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SCH,RCH,SDR,RDR,STI,RTI,SRX2,RRX2,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=ON, === <br />
This command is used to start LoRa™WAN layer and is mandatory in order to use most of MAC commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
''AT+MAC=ON,&lt;minor_ver&gt;,&lt;class&gt;,&lt;otaa&gt;''<br />
<br />
*&lt;minor_ver&gt; can be 1 or 3 (default is 3 for LoRa™WAN V1.0). V1 is no more maintained.<br />
*&lt;class&gt; is A or C.<br />
*&lt;otaa&gt; is 0 for ABP and 1 for OTAA.<br />
<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
Start LoRa™WAN layer in class A with OTAA:<br />
<br />
AT+MAC=ON,3,A,1<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=OFF ===<br />
<br />
Stop LoRa™WAN layer.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+MAC=? ===<br />
<br />
Read current LoRa™WAN layer status.<br />
<br />
To change LoRa™WAN layer status, AT+MAC=OFF and AT+MAC=ON,… must be performed.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;state&gt;,&lt;minor_ver&gt;,&lt;class&gt;,&lt;ch_pages&gt;,&lt;ism_band&gt;,&lt;otaa&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;minor_ver&gt; can be '''V'''1 or '''V'''3 (default is 3 for LoRa™WAN V1.0).<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;page&gt; is the number of pages of 16 channels available at LoRa™WAN layer (in terms of memory space).<br />
<br />
&lt;ism_band&gt; is 4 for EU433MHz, 7 for China779-787MHz, 8 is EU863-870MHz and 9 for US902-928MHz. ISM band can’t be modified dynamically, it is set at compilation time.<br />
<br />
&lt;otaa&gt; is 0 or 2 for ABP and 1 for OTAA (2 means ABP, and OTAA is not supported by the module).<br />
<br />
<br><br />
<br />
==== Example ====<br />
<br />
A class A US902-928MHz device with 80 channels (5*16) which doesn’t support OTAA:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,5,9,2<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+MAC= SNDBIN,&lt;binpyload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application).<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC=SNDBIN,1A2B3C,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVBIN, === <br />
Register for receiving downlink frames on specified port, payload is output as binary hexa string.<br />
<br />
AT+MAC= RCVBIN,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVBIN,&lt;port&gt;,&lt;more&gt;,&lt;binarypayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
The RCVBIN unsolicited response is always sent after a Tx, even if no frame has been received. It indicates the end of Rx windows.<br />
<br />
For a class A device, it is sent when a downlink frame has been received or at the end of the Rx window 2 (if no downlink frame has been received).<br />
<br />
For a class C device, it is sent when a downlink frame has been received or at the end of the Rx window 1 (if no downlink frame has been received).<br />
<br />
If the Tx was in ack mode, the RCVBIN is sent before the OK (or ERROR NOACK) response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
If the Tx was in unack mode, the RCVBIN is sent after the OK response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
==== Example ====<br />
AT+MAC= RCVBIN,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVBIN,2,true,1A2B3C4D,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC=SNDTXT, === <br />
It is the same command as AT+MAC=SNDBIN except that the payload is interpreted as text and is transmitted as received on serial link (no translation from hexa ASCII to hexa binary is performed).<br />
<br />
AT+MAC= SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
Text frame transmission.<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application)<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC= SNDTXT,HELLO WORLD,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVTXT, === <br />
Register for receiving downlink frames on specified port, payload is output as text string (translation to binary hexa string is not performed).<br />
<br />
AT+MAC=RCVTXT,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
'''By default, downlink payload are processed as binary payload, thus if the AT client application needs to receive the payload as text (without any binary hexa string translation), it must uses this command.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVTXT,&lt;port&gt;,&lt;more&gt;,&lt;textpayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
==== Example ====<br />
AT+MAC=RCVTXT,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVTXT,2,true,HELLO WORLD,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC= STOPRCV, === <br />
Unregister for receiving downlink frames on specified port.<br />
<br />
AT+MAC=STOPRCV,&lt;port&gt;<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid.<br />
<br />
ERROR if MAC is OFF or port is invalid.<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+MAC=SNDLCR, === <br />
Send a Link Check Request.<br />
<br />
AT+MAC=SNDLCR,&lt;nbrepeat&gt;<br />
<br />
&lt;nbrepeat&gt; = 0 means the LCR message is sent in unack mode on port 0.<br />
<br />
&lt;nbrepeat&gt; != 0 means the LCR message is sent in ack mode on port 0 with &lt;nbrepeat&gt; transmissions.<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and Link Check Answer has been received.<br />
<br />
ERROR if MAC is OFF or Link Check Answer has not been received and Tx was in unack mode.<br />
<br />
ERROR NOACK if Link Check Answer has not been received and Tx was in ack mode.<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
Received data is sent back as<br />
<br />
+MAC: &lt;margin&gt;,&lt;gwcnt&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+MAC=SNDLCR<br />
+MAC: 20,3,-45.00,8.00<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RCH, === <br />
Read MAC channels command.<br />
<br />
AT+MAC=RCH,&lt;chan&gt;,&lt;page&gt;,&lt;unsol_evt&gt;<br />
<br />
&lt;chan&gt; specifies the channel to read (all channels of the page if omitted or if 16)<br />
<br />
&lt;page&gt; specifies the channel page (all pages if omitted or if number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;unsol_evt&gt; specifies if unsolicited events are required (0 when not required). The unsolicited events inform the AT client application when a MAC parameter has been changed by the LoRa™WAN layer.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
For each channel, the following information is output:<br />
<br />
+MAC: &lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;busytime&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
&lt;chan&gt;: the channel index in the page (0 to 15).<br />
<br />
&lt;frequency&gt;: the frequency in Hz (0 means channel is disabled).<br />
<br />
&lt;mindr&gt;: minimum datarate allowed on the channel.<br />
<br />
&lt;maxdr&gt;: maximum datarate allowed on the channel.<br />
<br />
&lt;dutycycle&gt;: restricted duty cycle assigned to the channel (applies only when more restricted than ISM regulation specification).<br />
<br />
&lt;busytime&gt;: time in ms before the channel can be used again for Tx (due to duty cycle restrictions).<br />
<br />
&lt;page&gt;: channel page (0 to number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;rxw1freq&gt;: frequency used to open Rx window 1. 0 means same frequency as &lt;frequency&gt; parameter (available only from LoRaWAN V1.0.2, if the parameter is absent in the response, it means the firmware version is older).<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when &lt;busytime&gt; changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RCH<br />
+MAC: 0,868100000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 1,868300000,SF12BW125,SF7BW125,100,0,0,869525000<br />
+MAC: 2,868500000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 3,868850000,SF12BW125,SF7BW125,1000,0,0,0<br />
…<br />
+MAC: 15,000000000,SF12BW125,FSK50KBPS,1,0,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SCH, === <br />
Set MAC channel command.<br />
<br />
AT+MAC=SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;min_dr&gt;,&lt;max_dr&gt;,&lt;dutycycle&gt;,&lt;page&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=SCH?'''''Command.<br />
<br />
&lt;dutycycle&gt; is applied only if it is more restricted than the ISM regulation specification. 1 means 100%, 10 means 10%, 100 means 1%, ...<br />
<br />
&lt;rxw1freq&gt; is available only from LoRaWAN V1.0.2<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when LoRa™WAN layer modifies a channel and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
==== Example ====<br />
<br />
To modify channel 0:<br />
<br />
AT+MAC=SCH,0,868100000,SF12BW125,SF7BW125,100,0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC= RDR ===<br />
<br />
Read current MAC datarate command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band firmware<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current datarate changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RDR<br />
+MAC: SF12BW125,11,001F,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDR, === <br />
Set MAC data rate command.<br />
<br />
AT+MAC=SDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
Set the data rate, Tx power and number of repetitions for uplink transmission (applied to all channels compatible with the datarate). &lt;nbrep&gt; applies only to unconfirmed transmissions.<br />
<br />
&lt;chanmask&gt; and &lt;chanmaskctrl&gt; specify the channels usable for uplink access.<br />
<br />
The parameter list can be found by '''''AT+MAC=SDR?'''''Command.<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify current datarate:<br />
<br />
AT+MAC=SDR,SF12BW125,10,001F,0,0<br />
<br />
<br><br />
<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RTI ===<br />
<br />
Read MAC Time Information command.<br />
<br />
Read common channel time information.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current time info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RTI,&lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Example ====<br />
AT+MAC= RTI<br />
+MAC: 1000,2000,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC= STI, === <br />
Set MAC time information command.<br />
<br />
AT+MAC=STI,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;symbtimeout&gt;<br />
<br />
Only modified parameter can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=STI?'''''Command.<br />
<br />
The parameters &lt;rxw1&gt; and &lt;symbtimeout&gt; are common to all channels.<br />
<br />
The &lt;''rxw2''&gt; parameter is no more used because &lt;''rxw2''&gt; value is set to &lt;rxw1&gt; value + 1000 ms. It is still present for compatibility with old devices.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To modify time info:<br />
<br />
AT+MAC=STI,1000,,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RRX ===<br />
<br />
Read MAC Rx information command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current Rx info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RRX,&lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RRX<br />
+MAC: 869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SRX, === <br />
Set MAC Rx information command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SRX?'''''Command.<br />
<br />
The parameters are common to all channels.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify Rx parameters:<br />
<br />
AT+MAC=SRX,869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RSW ===<br />
<br />
This command is used to read the current LoRa™ and FSK synchro words used by LoRa™WAN layer. Synchro words are in hexadecimal format.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;LoRa™ sync_word&gt;,&lt;FSK sync_word&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RSW<br />
+MAC: 34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SSW, === <br />
This command is used to set the synchro words used by LoRa™WAN layer.<br />
<br />
AT+MAC=SSW,&lt;LoRaSyncWord&gt;,&lt;FskSyncWord&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
Synchro words are in hexadecimal.<br />
<br />
The parameter list can be found by '''''AT+MAC=SSW?'''''Command.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+MAC=SSW,34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RVAR ===<br />
<br />
This command is used to read the miscellaneous LoRa™WAN variables.<br />
<br />
This variables are Tx/Rx counters, aggregated DC and data encryption.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;txcounter&gt;,&lt;rxcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
&lt;aggregateddc&gt; values: 1 means 100%, 10 means 10%, 100 means 1%, …<br />
<br />
&lt;encryption&gt; values: 0 means no encryption, != 0 means encryption enabled.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent only when current aggregated DC changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RVAR,,,&lt;aggregateddc&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RVAR<br />
+MAC: 0,0,1,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SVAR, === <br />
This command is used to set some LoRa™WAN variables.<br />
<br />
AT+MAC=SVAR,&lt;txcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SVAR?'''''Command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To disable encryption:<br />
<br />
AT+MAC=SVAR,,,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RADR ===<br />
<br />
This command is used to read the current LoRa™WAN ADR, piggyback and back-off states.<br />
<br />
'''The ack mode retransmission back-off procedure was initially linked to ADR bit. When ADR bit was on/off, the back-off procedure was on/off. From now, the back-off procedure is linked to the back-off state, it allows to enable ADR bit without enabling the back-off procedure. If &lt;backoff&gt; parameter is absent in RADR response, it means that back-off procedure is still linked to ADR bit (older firmware version).'''<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
&lt;adr&gt;, &lt;piggyback&gt; and &lt;backoff&gt; values: true or false.<br />
<br />
==== Example ====<br />
AT+MAC=RADR<br />
+MAC: true,false,false<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SADR, === <br />
This command is used to set some LoRa™WAN ADR and piggyback states.<br />
<br />
AT+MAC=SADR,&lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SADR?'''''Command.<br />
<br />
When ADR state value is changed, ADR ack counter is reset.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct.<br />
<br />
==== Example ====<br />
<br />
To enable piggyback:<br />
<br />
AT+MAC=SADR,,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=RDEVUID ===<br />
<br />
Read device unique identifier.<br />
<br />
Device UID is coded on 8 bytes.<br />
<br />
''This command obsoletes AT+MAC=DEVUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
UID is returned as<br />
<br />
+MAC: &lt;devuid&gt;,&lt;rand_seed&gt;,&lt;read_only&gt;<br />
<br />
When read_only value is 1, it means that the device unique identifier is built from Nemeus 36 bits OUI (70B3D5326xxxxxxx). In this case the device UID can’t be modified and the security keys are not readable.<br />
<br />
==== Example ====<br />
AT+MAC=RDEVUID<br />
0010203,306A0327,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVADDR ===<br />
<br />
Read device address.<br />
<br />
''This command obsoletes AT+MAC=DEVADDR command.''<br />
<br />
''Old command still works and returns the same solicited response.''<br />
<br />
''Warning: unsolicited response changed, old one is no more sent!!!''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Address is returned as<br />
<br />
+MAC: &lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
In ABP mode, the device address is the 4 LSB of the device unique identifier.<br />
<br />
In OTAA mode, the device address is assigned by the network.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when device is in OTAA mode and at least one AT+MAC=? command has been sent.<br />
<br />
+MAC: RDEVADDR,&lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
==== Example ====<br />
<br />
Read device address of an OTAA device when not yet joint to network:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
<br />
After receipt of valid join accept, unsolicited response is sent:<br />
<br />
DEVADDR,0870C367,010203 <br />
<br><br />
----<br />
=== AT+MAC=SDEVADDR, === <br />
This command is used to modify device address when ABP mode is used.<br />
<br />
AT+MAC=SDEVADDR,&lt;devaddr&gt;<br />
<br />
If MAC layer is on in ABP mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devaddr&gt; length is 8 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVADDR,01020304<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPUID ===<br />
<br />
Read application Unique ID.<br />
<br />
Application UID is coded on 8 bytes.<br />
<br />
By default it is set to 0000000000000000.<br />
<br />
It can be modified by sending the following AT command:<br />
<br />
AT+GA=DIND,1,8301000008xxxxxxxxxxxxxxxx0000<br />
<br />
Where xxxxxxxxxxxxxxxx is the new application UID LSB first.<br />
<br />
MAC layer must be restarted to take into account new application UID (AT+MAC=OFF and AT+MAC=ON).<br />
<br />
Application UID can also be modified using AT+MAC=SAPPUID,&lt;app_uid&gt;.<br />
<br />
''This command obsoletes AT+MAC=APPUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Application UID is returned as<br />
<br />
+MAC: &lt;appuid&gt;<br />
<br />
==== Example ====<br />
<br />
Read default application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: 0000000000000000<br />
OK<br />
<br />
Set application UID to FEDCBA9876543210:<br />
<br />
0000<br />
OK<br />
<br />
Restart MAC layer:<br />
<br />
AT+MAC=OFF<br />
OK<br />
AT+MAC=ON<br />
OK<br />
<br />
Read new application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: FEDCBA9876543210<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SAPPUID, === <br />
This command is used to modify application UID.<br />
<br />
AT+MAC=SAPPUID,&lt;appuid&gt;<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;appuid&gt; length is 16 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SAPPUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPKEY ===<br />
<br />
Read application key.<br />
<br />
Application Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPKEY command.''<br />
<br />
''Old command still works and returns the &lt;appkey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application key is returned as<br />
<br />
+MAC: &lt;appkey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPKEY<br />
+MAC: A8FA642E2E3245BB9B8CAC7E2456EF3C<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPKEY<br />
+MAC: 3CEF56247EAC8C9BBB45322E2E64FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RNSKEY ===<br />
<br />
Read Network Session Key.<br />
<br />
Network Session Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=NSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=NSKEY command.''<br />
<br />
''Old command still works and returns the &lt;nskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Network session key is returned as<br />
<br />
+MAC: &lt;nskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RNSKEY<br />
+MAC: A8F1642E2E32453B9B8CAC7C2456EF72<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=NSKEY<br />
+MAC: 72EF56247CAC8C9B3B45322E2E64F1A8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPSKEY ===<br />
<br />
Read application session key.<br />
<br />
Application session key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPSKEY command.''<br />
<br />
''Old command still works and returns the &lt;appskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application session key is returned as<br />
<br />
+MAC: &lt;appskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPSKEY<br />
+MAC: A8FA672E2E4245BB9ECCCA7E64F54C38<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPSKEY<br />
+MAC: 384CF5647ECACC9EBB45422E2E67FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RMC ===<br />
<br />
Read MultiCast parameters. <span style="color:red">Multicast is only available from master18Wxx</span>.<br />
<br />
==== Response ====<br />
<br />
OK when the command is supported by the firmware.<br />
<br />
ERROR when it is not supported.<br />
<br />
Multicast parameters are returned as<br />
<br />
+MAC: &lt;addr&gt;,&lt;addr_mask&gt;,&lt;group_mask&gt;,&lt;fcnt_dw&gt;,&lt;net_skey&gt;,&lt;app_skey&gt;<br />
<br />
- &lt;addr&gt;: the multicast address (32 bits)<br />
- &lt;addr_mask&gt;: the significant part of the multicast address (More Significant bits) coded on 32 bits.<br />
- &lt;group_mask&gt;: the groups the device can receive (32 bits => groups 0 to 31).<br />
- &lt;fcnt_dw&gt;: the current value of the downlink frame counter (32 bits).<br />
- &lt;net_skey&gt;: the network security key for integrity checking (128 bits).<br />
- &lt;app_skey&gt;: the application security key for payload ciphering (128 bits).<br />
<br />
The address mask specifies which part of the received address is processed as an address and which part is processed as a group.<br />
The address mask can take the following values:<br />
- 0x00000000: the multicast function is disabled<br />
- 0xFFFFFFFF: only 1 group is possible<br />
- 0xFFFFFFFE: 2 groups are possible<br />
- 0xFFFFFFFC: 4 groups are possible<br />
- 0xFFFFFFF8: 8 groups are possible<br />
- 0xFFFFFFFE: 16 groups are possible<br />
- 0xFFFFFFFE: 32 groups are possible<br />
<br />
==== Example ====<br />
AT+MAC=RMC<br />
+MAC: 789ABCDE,FFFFFFFC,00000007,0,0102030405060708090A0B0C0D0E0F00,0102030405060708090A0B0C0D0E0F00<br />
OK<br />
With such parameters, the following received addresses are processed:<br />
- 0x789ABCDC: valid multicast address, group 0 is accepted because bit0 of group mask is set<br />
- 0x789ABCDD: valid multicast address, group 1 is accepted because bit1 of group mask is set<br />
- 0x789ABCDE: valid multicast address, group 2 is accepted because bit2 of group mask is set<br />
- 0x789ABCDF: valid multicast address, group 3 is rejected because bit3 of group mask is not set<br />
When the address is accepted (valid multicast address and accepted group) then the MIC is computed thanks to network security key.<br />
If the computed MIC matches with the received MIC then the payload is deciphered thanks to application security key and the resulting payload is pushed to the application addressed by the LoRaWAN port.<br />
<br />
<br><br />
----<br />
<br />
=== AT+MAC=SMC ===<br />
<br />
Set MultiCast parameters. <span style="color:red">Multicast is only available from master18Wxx</span>.<br />
AT+MAC=SMC,&lt;addr&gt;,&lt;addr_mask&gt;,&lt;group_mask&gt;,&lt;fcnt_dw&gt;,&lt;net_skey&gt;,&lt;app_skey&gt;<br />
See AT+MAC=RMC for parameter description<br />
<br />
==== Response ====<br />
<br />
OK when the command is supported by the firmware and the parameters are valid.<br />
<br />
ERROR when it is not supported or parameters are invalid (especially &lt;group_mask&gt; parameter which can take 7 different values).<br />
<br />
<br />
==== Example ====<br />
AT+MAC=SMC,789ABCDE,FFFFFFFC,00000007,0,0102030405060708090A0B0C0D0E0F00,0102030405060708090A0B0C0D0E0F00<br />
OK<br />
<br />
<br><br />
----<br />
<br />
=== Informative examples ===<br />
==== Device start ====<br />
<br />
AT client application can detect a device start or restart when the unsolicited response +DEBUG: START,&lt;version&gt; is received. Depending on initialization timing, AT client application is not sure to receive this unsolicited response, that’s the reason why it is recommended that AT client application use AT+MAC=? command to synchronize with the device.<br />
<br />
<br><br />
<br />
<u>'''OTAA case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
+MAC: RDEVADDR,0870C367,010203 <br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<u>'''ABP case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,0 <br />
OK<br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<br><br />
<br />
==== Send unconfirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''No downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
AT+MAC=SNDBIN,,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
==== Send confirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''Ack received, no downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,0,false,,-60.00,7.00 <br />
OK <br />
<br />
<u>'''Ack not received:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
ERROR NOACK <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
OK <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
AT+MAC=SNDBIN,,0,2,1 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
OK <br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT SIGFOX™ commands ==<br />
<br />
---- <br />
These commands are available only on Nemeus modules embedding SIGFOX™ library. If the library is not embedded then ERROR is returned.<br />
<br />
3 type of AT strings are specified:<br />
<br />
* SF commands: AT+SF=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* SF solicited responses: +SF: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to SF commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the SF command and the OK response.<br />
* SF unsolicited responses: +SF: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the SF command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+SF=? to know the current SIGFOX™ layer state.<br />
* AT+SF=OFF and AT+SF=ON to stop and start SIGFOX™ layer.<br />
* AT+SF=SNDBIN,… to send uplink frame.<br />
* AT+SF=SNDBIT,… to send uplink bit.<br />
* AT+SF=SNDOOB to send uplink out of band message (keep alive messages).<br />
* +SF: RCVBIN,… when receiving downlink frames.<br />
<br />
All other commands are not really required, they are mainly used to configure SIGFOX™ layer and to perform SIGFOX™ qualification tests.<br />
<br />
SIGFOX™ proprietary AT command set is also supported but not described in this document.<br />
<br />
<br><br />
----<br />
=== AT+SF=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+SF=HELP<br />
+SF: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+SF: &lt;cmd&gt; are ON,OFF,?,SNDBIN,SNDBIT,SNDOOB,SREP,RREP,STXF,RTXF,SRXF,RRXF,STXP,RTXP<br />
+SF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+SF=ON ===<br />
<br />
This command is used to start SIGFOX™ layer and is mandatory in order to use most of SF commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
==== Response ====<br />
<br />
If LoRa™WAN stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=ON<br />
OK<br />
<br><br />
----<br />
=== AT+SF=OFF ===<br />
<br />
Stop SIGFOX™ layer.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=OFF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=? ===<br />
<br />
Read current SIGFOX™ layer status.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ library is embedded OK is returned.<br />
<br />
Else ERROR is returned.<br />
<br />
+SF: &lt;state&gt;,&lt;NMS_lib_ver&gt;,&lt;SFX_lib_ver&gt;,&lt;dev_id&gt;,&lt;initial_pac&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;NMS_lib_ver&gt; is the version of Nemeus library used to communicate with SIGFOX™ network.<br />
<br />
&lt;SFX_lib_ver&gt; is the version of SIGFOX™ library.<br />
<br />
&lt;dev_id&gt; is the device unique identifier on SIGFOX™ network.<br />
<br />
&lt;initial_pac&gt; is the first Portability Access Code used to register the device on SIGFOX™ network. It is used one time for first registration.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=?<br />
+SF: ON,NMS-SFX-LIB-1.2,UDL1-1.6.0,000ABCDE,0123456789ABCDEF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+SF=SNDBIN,&lt;binpayload&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the frame is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the frame is sent in acknowledged mode.<br />
<br />
The frame is sent when channel becomes free regarding duty cycle limitations.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIN,CAFE,1<br />
+SF: SND,4576<br />
+SF: SND,0<br />
+SF: 6282<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDBIT, === <br />
Bit transmission.<br />
<br />
AT+SF=SNDBIT,&lt;bitvalue&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the bit is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the bit is sent in acknowledged mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIT,0,1<br />
+SF: SND,6422<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDOOB ===<br />
<br />
Out Of Band message transmission.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it can be used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent.<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent.<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
==== Example ====<br />
AT+SF=SNDOOB<br />
+SF: SND,3987<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
<br><br />
----<br />
=== AT+SF=RREP ===<br />
<br />
Read Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;repeat&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 2 repetitions.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RREP<br />
+SF: 2<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SREP, === <br />
<br />
Set Tx repetitions used in acked mode.<br />
<br />
AT+SF=SREP,&lt;repeatnb&gt;<br />
<br />
==== Response ====<br />
<br />
Default value is 2 repetitions.<br />
<br />
OK if number of repetitions &lt;= 2.<br />
<br />
ERROR if number of repetitions &gt; 2.<br />
<br />
==== Example ====<br />
AT+SF=SREP,1<br />
OK<br />
AT+SF=SREP,3<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXF ===<br />
<br />
Read output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 868130000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXF<br />
+SF: 868130000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXF, === <br />
Set output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= tx_frequency &lt;= 870000000.<br />
<br />
ERROR if tx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=STXF,868200000<br />
OK<br />
AT+SF=STXF,862200000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RRXF ===<br />
<br />
Read reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;rx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 869525000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RRXF<br />
+SF: 869525000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SRXF, === <br />
Set reception carrier macro channel.<br />
<br />
AT+SF=SRXF,&lt;rx_frequency&gt;<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= rx_frequency &lt;= 870000000.<br />
<br />
ERROR if rx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=SRXF,869525000<br />
OK<br />
AT+SF=SRXF,869525000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXP (for test purpose) ===<br />
<br />
Read Tx power applied to FSK continuous wave<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_power&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 14 dBm.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXP<br />
+SF: 14<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SF=STXP (for test purpose) === <br />
Set Tx power applied to FSK continuous wave<br />
<br />
==== Response ====<br />
<br />
OK if tx_power &lt;= 14 dBm.<br />
<br />
ERROR if tx_power &gt; 14 dBm.<br />
<br />
==== Example ====<br />
AT+SF=STXP,10<br />
OK<br />
AT+SF=STXP,20<br />
ERROR<br />
<br />
<br><br />
<br />
== AT Generic command ==<br />
<br />
---- <br />
AT Generic command can be used to activate/deactivate some generic functionalities.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8801 ===<br />
<br />
This command is use to know the status of PowerSaving.<br />
<br />
==== Response ====<br />
<br />
+GA : DIND,1,0801&lt;pwr_state&gt;<br />
<br />
Always OK.<br />
<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,8801<br />
<br />
+GA : DIND,1,080100<br />
<br />
OK.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8802&lt;pwr_state&gt; ===<br />
<br><br />
'''WARNING: CONNECT CORRECTLY THE WAKEUP PIN BEFORE ACTIVATION OF POWERSAVING'''<br />
<br><br />
This command is use to set the PowerSaving.<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
PowerSaving can be activated once after boot-up, and from this point will go in stop mode as soon as possible and is wake-up by RTC or Wakeup pin.<br />
Please note that once power-saving is activated, user should toggle wake-up pin before sending an AT command.<br />
<br />
If the module is reset, the powersaving is set back to OFF. So User should ensure setting it to ON after any reset<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,880201<br />
<br />
OK<br />
<br />
<br><br />
----<br />
<br />
== AT debug command ==<br />
<br />
---- <br />
AT debug command can be used to activate/deactivate some debug functionalities.<br />
<br />
<br><br />
----<br />
=== AT+DEBUG= HELP ===<br />
<br />
This commandis use to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= HELP<br />
+DEBUG: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+DEBUG: &lt;cmd&gt; are MVER,MVOFF,MVON,MV?,MEOFF,MEON,ME?,MPOFF,MPON,MP?,RREAD,RWRITE<br />
+DEBUG: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG=MVER ===<br />
<br />
Read Mcu software version.<br />
<br />
Furthermore, when the device boots the software version is sent as an unsolicited response:<br />
<br />
+DEBUG: START,&lt;version&gt;<br />
<br />
This unsolicited response can be used to detect a reset of the device.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: MVER,&lt;version&gt;<br />
<br />
==== Example ====<br />
<br />
AT boot:<br />
<br />
+DEBUG: START,Nemeus 1.x<br />
<br />
When requested:<br />
<br />
AT+DEBUG= MVER<br />
+DEBUG: MVER,Nemeus 1.x<br />
OK<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+DEBUG= MVOFF ===<br />
<br />
Disable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MVON ===<br />
<br />
Enable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
OK if software is compiled with debug traces.<br />
<br />
ERROR if software is compiled without debug traces.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MV? ===<br />
<br />
Read current verbose mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;verbose&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MV?<br />
+DEBUG: MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEOFF ===<br />
<br />
Disable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEON ===<br />
<br />
Enable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= ME? ===<br />
<br />
Read current echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;echo&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= ME?<br />
+DEBUG: MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPOFF ===<br />
<br />
Disable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPON ===<br />
<br />
Enable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MP? ===<br />
<br />
Read current prompt mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;prompt&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MP?<br />
+DEBUG: MPON<br />
OK</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_AT_Commands&diff=338MM002-xx-EU AT Commands2018-10-09T08:15:18Z<p>Lcs: /* AT+MAC=RMC */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
AT commands are used as an interface with Nemeus Communication modules. Modules can be driven at 3 different levels:<br />
<br />
* Radio level: embedded AT server uses RF SX127x driver API (LoRa™and FSK modulations can be used).<br />
* LoRa™WAN level: embedded AT server uses LoRa™WAN library API(available only when the library is present in embedded software).<br />
* SIGFOX™ level: embedded AT server uses SIGFOX™ library API(available only when the library is present in embedded software).<br />
<br />
<u>'''When radio level is used'''</u>, no device personalization is required, it is up to AT client application to implement network layer according to the network the device is attached (the module doesn’t know the network).<br />
<br />
<u>'''When LoRa™WAN level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* Whatever the activation type, a 64 bits device unique identifier.<br />
* When Activation By Personalization (ABP) is used:<br />
** An AES128 network security key for MIC computation and encryptionof MAC control commands on port 0.<br />
** An AES128 application security key for encryption of applicationpayloads (not required when data encryption is disabled on themodule).<br />
* When Over The Air Activation (OTAA) is used:<br />
** A 64 bits application unique identifier.<br />
** An AES128 application Key used to derive the network andapplication security keys.<br />
<br />
In first software versions (before 15W40) the module generates unique identifiers and keys, these default LoRa™WAN personalization parameters are modifiable by AT commands. It allows customers to personalize their devices according to the network operator rules.<br />
<br />
In further software versions, modules are personalized with Nemeus OUI during production phase and they can’t be modified. In this case the device unique identifier is read-only and the AES128 keys are hidden. The application unique identifier is still modifiable by AT command.<br />
<br />
<u>'''When SIGFOX™ level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* The read-only device unique identifier.<br />
* The hidden AES128 security key.<br />
* The initial read-only Portability Access Code (PAC).<br />
<br />
Before driving the module, the AT client application must activate the level it wants to use.<br />
<br />
Only one level can be activated at a time.<br />
<br />
When activating a level, a previously activated level is automatically deactivated.<br />
<br />
<br />
[[File:Mm002_serial_diagram.png|center|500px]]<br />
<br><br><br />
For evaluation/test purpose, Nemeus recommends to use NemeusATK java application to drive the module.<br />
<br><br><br />
{{TOC limit|3}}<br />
<br />
== UART configuration ==<br />
<br />
The UART configuration for Modem connection is as follows:<br />
<br />
* Baud Rate : 38400<br />
* Data : 8 bits<br />
* Parity : None<br />
* Stop : 1 bit<br />
* Flow control : None<br />
* End line character : &lt;LF&gt;<br />
<br />
<br><br />
<br><br />
<br />
E.g. Typical configuration given by ‘stty’ command on linux:<br />
<br />
''speed 38400 baud; rows 0; columns 0; line = 0;''<br />
<br />
''intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 = &lt;undef&gt;;swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;flush = ^O; min = 1; time = 0;''<br />
<br />
''-parenb -parodd cs8 hupcl -cstopb cread clocal –crtsct signbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff –iuclc -ixany -imaxbel -iutf8''<br />
<br />
''-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop –echoprt -echoctl -echoke''<br />
<br />
<br><br />
<br />
== AT commands ==<br />
<br />
---- <br />
At command are split according to communication layers. This is a list of main AT commands for SW given in ‘compatibility’ paragraph. The full list and limitation can be found in SW delivery note.<br />
<br />
Formalism is the following:<br />
<br />
<br> <br />
<br><br />
[[File:AT-command-line.png|center]]<br />
<br><br />
<br><br />
<br />
For each group among RF, RFRX, RFTX, MAC and SFX, the command AT+&lt;group&gt;= HELP describes available sub-commands. Example:<br />
<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SET,SCH,RCH,STI,RTI,SRX,RRX,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br />
When a sub-command has parameter, AT+&lt;group&gt;= &lt;cmd&gt;? Describes the parameter list. Example:<br />
<br />
AT+MAC=SNDTXT?<br />
+MAC: SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
OK<br />
<br />
When command is unknown “command not found (‘try help’)” is returned.<br />
<br />
AT commands are not cancelable, thus AT client application must wait for AT response before sending a new command.<br />
<br />
<br><br />
<br />
== Generic Parameter description ==<br />
<br />
---- <br />
Following table describes mains parameters used with AT commands.<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Type'''<br />
<br />
|-<br />
| <br />
'''&lt;mod&gt;'''<br />
<br />
| <br />
Modulation to be use<br />
<br />
| <br />
LORA/FSK<br />
<br />
|-<br />
| <br />
'''&lt;freq&gt;'''<br />
<br />
| <br />
Carrier frequency<br />
<br />
| <br />
Expressed in Hertz *<br />
<br />
|-<br />
| <br />
'''&lt;pwr&gt;'''<br />
<br />
| <br />
Tx power (range depends on Module definition; e.g. MM001 -1dBm to 14dBm)<br />
<br />
| <br />
In dBm *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;bw&gt;'''<br />
<br />
| <br />
Bandwidth from 125kHz to 500 kHz<br />
<br />
| <br />
In Hertz *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;dr&gt;'''<br />
<br />
| <br />
Spreading Factor in LoRa mode<br />
<br />
Data rate in FSK mode<br />
<br />
| <br />
6/7 to 12 *<br />
<br />
In kb/s<br />
<br />
|-<br />
| <br />
'''&lt;cr&gt;'''<br />
<br />
| <br />
Coding Rate (LoRa mode only)<br />
<br />
| <br />
1 to 4<br />
<br />
|-<br />
| <br />
'''&lt;min/maxdr&gt;'''<br />
<br />
| <br />
Data rate range<br />
<br />
| <br />
SF7BW125 to SF12BW125, SF7BW250 or FSK50KBPS<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxcrcon&gt;'''<br />
<br />
| <br />
Flag for CRC check activation in TX or RX<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;preamble&gt;'''<br />
<br />
| <br />
Length of the preamble<br />
<br />
| <br />
6 to 65535<br />
<br />
|-<br />
| <br />
'''&lt;f_dev&gt;'''<br />
<br />
| <br />
Frequency deviation (FSK mode only)<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;fixed_len&gt;'''<br />
<br />
| <br />
When true, PHY payload is constant (no header)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxiqinv'''<br />
<br />
| <br />
Flag for IQ inversion in TX or RX (LoRa mode only)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;rxw1&gt;'''<br />
<br />
| <br />
Delay before RX windows 1<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;rxw2&gt;'''<br />
<br />
| <br />
Delay before RX windows 2 ; NOTE: rx_w2 must be longer than rx_w1.<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;tstamp&gt;'''<br />
<br />
| <br />
Rx ot Tx timestamp<br />
<br />
| <br />
In ticks<br />
<br />
|-<br />
| <br />
'''&lt;symbtimeout&gt;'''<br />
<br />
| <br />
Number of symbols before RX timeout<br />
<br />
| <br />
5 to 1023<br />
<br />
|-<br />
| <br />
'''&lt;port&gt;'''<br />
<br />
| <br />
MAC port<br />
<br />
| <br />
0 to 10<br />
<br />
|-<br />
| <br />
'''&lt;textpayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in ASCII<br />
<br />
| <br />
ASCII string<br />
<br />
|-<br />
| <br />
'''&lt; binarypayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in hexadecimal coded in ASCII<br />
<br />
| <br />
ASCII string containing 0 to F characters<br />
<br />
|-<br />
| <br />
'''&lt;chan&gt;'''<br />
<br />
| <br />
Identifies one of the 8 MAC channels<br />
<br />
| <br />
0 to 7<br />
<br />
|-<br />
| <br />
'''&lt;enable&gt;'''<br />
| <br />
Indicates the status of a channel<br />
|<br />
True or false<br />
|-<br />
| <br />
'''&lt;nbrepeat&gt;'''<br />
| <br />
Number of repetitions when sending a payload.<br />
<br />
At MAC level this parameter indicates if data confirmed must be used or not (0 means unacked mode&gt;).<br />
<br />
| <br />
0 to N<br />
<br />
|-<br />
| <br />
'''&lt;interval&gt;'''<br />
| <br />
Time interval between repetitions<br />
| <br />
In ms<br />
|-<br />
| <br />
'''&lt;hexaddress&gt;'''<br />
| <br />
Address of a registry in hexadecimal<br />
| <br />
<br><br />
|-<br />
| <br />
'''&lt;nbbytes&gt;'''<br />
| <br />
<br><br />
| <br />
0 to 4<br />
|-<br />
| <br />
'''&lt;byteN&gt;'''<br />
| <br />
Byte to write<br />
| <br />
0x00 to 0xFF<br />
|-<br />
| <br />
'''&lt;margin&gt;'''<br />
| <br />
Link demodulation margin above the demodulation floor computed by the nearest gateway<br />
| <br />
0 to 254 in dB<br />
|-<br />
| <br />
'''&lt;gwcnt&gt;'''<br />
| <br />
Number of gateways which received the MAC message<br />
| <br />
1 to N<br />
|-<br />
| <br />
'''&lt;devuid&gt;'''<br />
| <br />
Device unique identifier<br />
| <br />
8 bytes<br />
|-<br />
| <br />
'''&lt;devaddr&gt;'''<br />
| <br />
Device address (4 LSB of &lt;devuid&gt;)<br />
| <br />
4 bytes<br />
|-<br />
| <br />
'''&lt;more&gt;'''<br />
| <br />
Indicates if more downlink data is pending<br />
| <br />
true or false<br />
|-<br />
| <br />
'''&lt;mode&gt;'''<br />
| <br />
LoRa MAC transmission mode<br />
| <br />
0 for confirmed data<br />
not 0 for unconfirmed data<br />
|-<br />
| <br />
'''&lt;rxw1freq&gt;'''<br />
| <br />
Channel frequency used for Rx window 1<br />
<br />
| <br />
In Hz, 0 means same as Tx frequency<br />
<br />
|-<br />
| <br />
'''&lt;eirp&gt;'''<br />
<br />
| <br />
Effective Isotropic Radiated Power received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
In dBm<br />
<br />
|-<br />
| <br />
'''&lt;updwell&gt;'''<br />
<br />
| <br />
Uplink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;dwdwell&gt;'''<br />
<br />
| <br />
Downlink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;backoff&gt;'''<br />
<br />
| <br />
Ack mode retransmission back-off procedure<br />
<br />
| <br />
false means disabled<br />
<br />
true means enabled<br />
<br />
|} <br />
<br><br />
<br />
* Depends on Module in use<br />
<br />
<br><br />
<br />
== Generic Response description ==<br />
<br />
---- <br />
<br><br />
<br />
Every AT command send a response of one of the following types:<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Visible output'''<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
'''Generic'''<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;OK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
OK response<br />
<br />
<br><br />
<br />
| <br />
OK<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response<br />
<br />
<br><br />
<br />
| <br />
ERROR<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR NOACK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response due to a missing ACK<br />
<br />
| <br />
ERROR_NOACK<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+MAC: '''<br />
<br />
| <br />
Response from MAC layer<br />
<br />
<br><br />
<br />
| <br />
+MAC:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFTX: '''<br />
<br />
| <br />
Response from RF layer (TX)<br />
<br />
<br><br />
<br />
| <br />
+RFTX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFRX: '''<br />
<br />
| <br />
Response from RF layer (RX)<br />
<br />
<br><br />
<br />
| <br />
+RFRX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+DEBUG: '''<br />
<br />
| <br />
Response from debug layer<br />
<br />
| <br />
+DEBUG:<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
|} <br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT Generic commands ==<br />
<br />
---- <br />
Intentionally left blank<br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT RF commands ==<br />
<br />
---- <br />
RF commands are dealing with the RF Layer. This layer should be started before using most of RF commands listed in this section (unless stated otherwise).<br />
<br />
3 groups of commands exist:<br />
<br />
* +RF group: commands common to TX and RX functions.<br />
* +RFTX group: commands dedicated to TX functions.<br />
* +RFRX group: commands dedicated to RX functions.<br />
<br><br />
----<br />
=== AT+RF=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RF=HELP<br />
+RF: &lt;cmd&gt;<br />
+RF: &lt;cmd&gt; are ON,OFF,?,RPER,SPER,RSW,SSW<br />
+RF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RF=ON ===<br />
<br />
This command is used to start RF layer (Radio driver) and is mandatory in order to use most of RF commands listed in this section (unless otherwise stated).<br />
<br />
==== Response ====<br />
<br />
ERROR is returned if either LoRa™WAN stack or SIGFOX™ stack is using the radio (Tx or Rx is ongoing).<br />
<br />
Else OK is returned.<br />
<br />
If LoRa™WAN stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
If SIGFOX™ stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
<br><br />
----<br />
=== AT+RF=OFF ===<br />
<br />
This command is used to stop RF layer (Radio driver). After calling this command, most of RF commands listed in this section will return ERROR (unless stated otherwise).<br />
<br />
RF layer stop (Radio driver).<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+RF=? ===<br />
<br />
This command is used to read the current RF layer state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=?<br />
+RF: OFF<br />
OK<br />
<br><br />
----<br />
=== AT+RF=RPER ===<br />
<br />
This command is used to read the Packet Error Rate state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RPER<br />
+RF: false<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SPER, === <br />
This command is used to set the Packet Error Rate state and the power offset<br />
<br />
The following formalism is used. It can be checked by the AT+RF=SPER?command:<br />
<br />
+RF=SPER,&lt;per_state&gt;,&lt;pwroffset&gt;,&lt;loracsoffset&gt;,&lt;fskcsoffset&gt;,&lt;freqcoffset&gt;<br />
<br />
&lt;per_state&gt; PER state, unchanged when absent.<br />
<br />
&lt;pwroffset&gt; is the Power offset<br />
<br />
&lt;loracoffset&gt; is the RSSI Power offset in LoRa (dB)<br />
<br />
&lt;fskcoffset&gt; is the RSSI Power offset in Fsk and Sigfox (dB)<br />
<br />
&lt;freqcoffset&gt; is the frequency offset in Sigfox (Hz) (Available in 17w01 and newer versions)<br />
<br />
<br />
When PER state is true, a counter is added at the beginning of Tx frames. This counter is used on Rx side to compute the Packet Error Rate.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;per_state&gt; is “true”, “false” or omitted.<br />
<br />
ERROR if &lt;per_state&gt; is syntactically incorrect.<br />
<br />
==== Example ====<br />
AT+RF=SPER,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RF=RSW ===<br />
<br />
This command is used to read the current LoRa and FSK synchro words. Synchro words are in hexadecimal format (see formalism on SSW command)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RSW<br />
+RF: 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SSW, === <br />
This command is used to set the synchro words.<br />
<br />
AT+RF=SSW,&lt;LoRa_SyncWord&gt;,&lt;Fsk_SyncWord&gt;<br />
<br />
&lt;LoRa_SyncWord&gt; LoRa Synchro Word (one byte)<br />
<br />
&lt;Fsk_SyncWord&gt; FSK Synchro Word (up to six bytes)<br />
<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+RF=SSW, 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFTX=HELP<br />
+RFTX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFTX: &lt;cmd&gt; are ?,SET,SEND,SNDTXT,SNDBIN,START,STOP<br />
+RFTX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=? ===<br />
<br />
Read TX parameters. This command does not need the RF layer to be ON.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFTX: &lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;<br />
<br />
==== Example ====<br />
AT+RFTX=?<br />
+RFTX : LORA,868100000,14,125000,7,1,true,8,0,false,false,0,0,0,5,false,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SET, === <br />
Write Tx parameters. This command does not need the RF layer to be ON. Only modified parameters can be specified.<br />
<br />
The following formalism is used. It can be checked by the '''''AT+RFTX=SET?''''' command:<br />
<br />
+RFTX= SET,&lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;,&lt;rxaftertx&gt;<br />
<br />
The parameters &lt;symbtimeout&gt;, &lt;rxiqinv&gt; and &lt;rxcrcon&gt; are used only when an Rx window is specified.<br />
<br />
&lt;tstamp&gt; is the absolute clock time of the module. If the time is over, the frame is immediately transmitted. Usually this timestamp is a delay added to an Rx timestamp (feature not fully implemented)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To set the &lt;pwr&gt; to 12 and the &lt;txcrcon&gt; to false:<br />
<br />
AT+RFTX=SET,,,12,,,,false<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RFTX=SEND, (for test purpose) === <br />
Transmit &lt;nb_frames&gt; numbered frames every &lt;interval&gt; ms.<br />
<br />
AT+RFTX= SEND,&lt;nb_frames&gt;,&lt;interval&gt;<br />
<br />
Default values : &lt;nb_frames&gt; = 1, &lt;interval&gt; = 500 (ms).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), transmitted frames contain a counter on 4 bytes followed by a 32 bytes fixed pattern.<br />
<br />
This command is used as a generator for Packet Error Rate (PER) computing.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nb_frames&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SEND,3,500<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=START (for test purpose) ===<br />
<br />
FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=START<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=STOP (for test purpose) ===<br />
<br />
Stop FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDTXT, === <br />
Repeat &lt;nbrepeat&gt; text frames every 500 ms.<br />
<br />
AT+RFTX= SNDTXT,&lt;txt&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat&gt; = 1.<br />
<br />
&lt;txt&gt; parameter is transmitted as received on serial link, the module doesn’t manage any character set.<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SNDTXT,HELLO WORLD,3<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDBIN, === <br />
Repeat &lt;nbrepeat&gt; binary frames every 500 ms.<br />
<br />
AT+RFTX= SNDBIN,&lt;bin&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat &gt; = 1<br />
<br />
&lt;bin&gt; parameter is hexadecimal coded in ASCII (2 ASCII characters for 1 binary byte).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
<br />
To send 2 times the 3 bytes 1A 2B 3C:<br />
<br />
AT+RFTX=SNDBIN,1A2B3C,2<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFRX=HELP<br />
+RFRX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFRX: &lt;cmd&gt; are ?,SET,RECV,START,STOP,CONTRX,LVL<br />
+RFRX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=? ===<br />
<br />
Read RX parameters.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFRX: &lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Example ====<br />
AT+RFRX=?<br />
,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=SET, === <br />
Set Rx parameters. Only modified parameter can be specified.<br />
<br />
The following formalism is used. It can be check by the '''''AT+RFRX=SET?'''''command:&lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
==== Example ====<br />
<br />
To set &lt;dr&gt; parameter to 7:<br />
<br />
AT+RFRX=SET,,,,7<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=RECV (for test purpose) ===<br />
<br />
Single frame reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer comes back to IDLE state after reception or after AT+RFRX=STOP command.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
+RFRX: &lt;per&gt;,&lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
Then, when a frame is received the unsolicited response below is sent:<br />
<br />
If &lt;per_state&gt; is true (see +RF=SPER command):<br />
<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA…<br />
<br />
Where 100% is the PER, -35.00 is the RSSI level, 7.00 is the SNR, 0 is “no CRC error”, 1521551302 is the Rx clock time in ms and 12000000CAFEDECA is the received payload, starting with the 4 bytes counter.<br />
<br />
If &lt;per_state&gt; is false:<br />
<br />
+RFRX: ,-35.00,7.00,0,1521551302,CAFEDECA…<br />
<br />
PER is not displayed and the 4 bytes counter is not present in the payload (it means that Tx device also has &lt;per_state&gt; set to false.<br />
<br />
After frame reception the Rx is automatically stopped.<br />
<br />
==== Example ====<br />
AT+RFRX=RECV<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
<br><br />
----<br />
=== AT+RFRX=START (for test purpose) ===<br />
<br />
Continuous reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer stays in RX until Rx stop command is sent (see AT+RFRX=STOP)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
When a TX has been performed during Reception, An AT+RFRX=STOP command may be needed to avoid ERROR from this command<br />
<br />
After frame reception RF layer stays in RX (RX stop command must be used to leave RX mode).<br />
<br />
==== Example ====<br />
AT+RFRX=START<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
+RFRX: 100%,-32.00,7.00,0,1521554506,13000000CAFEDECA<br />
…<br />
<br><br />
----<br />
=== AT+RFRX=STOP ===<br />
<br />
Stop single or continuous reception.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is in RX.<br />
<br />
ERROR if RF layer is not in RX.<br />
<br />
==== Example ====<br />
AT+RFRX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=CONTRX ===<br />
<br />
Continuous reception without PER computation.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
Then, for each received frame, the unsolicited response below is sent:<br />
<br />
+RFRX: &lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
<br><br />
----<br />
=== AT+RFRX=LVL (for test purpose) ===<br />
<br />
Last reception parameters read (RSSI, SNR)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
Response information is as below:<br />
<br />
+RFRX: LVL,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+RFRX=LVL<br />
+RFRX: LVL,-77.00,8.00<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
<br />
==== LoRa Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency.<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,LORA,,125000,7 <br />
OK<br />
| <br />
:Set some RX parameters. Let the channel to default frequency<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,LORA,868100000,14,125000,7<br />
OK<br />
| <br />
:set Tx modulation LoRa, freq 868100000, Tx power 14dbm, bandwidth 125KHz, SF7<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
==== FSK Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency. For FSK some rules apply on selected "bandwith/datarate" in RX and "frequency deviation/datarate" in TX. This is described in ([[MM002-xx-EU datasheet#Reference|sx1272 datasheet]])<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,FSK,868100000,125000,1200 <br />
OK<br />
| <br />
:Set some RX parameters.freq 868100000,Bandwith 125 000, Datarate 1200<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,FSK,868100000,14,,1200,,,,50000<br />
OK<br />
| <br />
:set Tx modulation FSK, freq 868100000, Tx power 14dbm, Datarate 1200, Deviation Frequency 50 000<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
== AT LoRa™WAN (MAC) commands ==<br />
<br />
---- <br />
3 types of AT strings are specified:<br />
<br />
* MAC commands: AT+MAC=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* MAC solicited responses: +MAC: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to MAC commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the MAC command and the OK response.<br />
* MAC unsolicited responses: +MAC: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the MAC command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+MAC=? to know the current MAC mode (ABP or OTAA, Class A or C).<br />
* AT+MAC=OFF and AT+MAC=ON,… to change the MAC mode.<br />
* AT+MAC=DEVADRR and unsolicited +MAC: DEVADDR,… to know the current state of an OTAA device.<br />
* AT+MAC=SNDBIN,… to send uplink frame.<br />
* +MAC: RCVBIN,… when receiving downlink frames and to know Rx windows termination.<br />
<br />
All other commands are not really required, they are mainly used by NemeusATK Java application to manage the LoRa™WAN layer (for IOT purpose, device provisioning …).<br />
<br />
<br><br />
----<br />
=== AT+MAC=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SCH,RCH,SDR,RDR,STI,RTI,SRX2,RRX2,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=ON, === <br />
This command is used to start LoRa™WAN layer and is mandatory in order to use most of MAC commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
''AT+MAC=ON,&lt;minor_ver&gt;,&lt;class&gt;,&lt;otaa&gt;''<br />
<br />
*&lt;minor_ver&gt; can be 1 or 3 (default is 3 for LoRa™WAN V1.0). V1 is no more maintained.<br />
*&lt;class&gt; is A or C.<br />
*&lt;otaa&gt; is 0 for ABP and 1 for OTAA.<br />
<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
Start LoRa™WAN layer in class A with OTAA:<br />
<br />
AT+MAC=ON,3,A,1<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=OFF ===<br />
<br />
Stop LoRa™WAN layer.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+MAC=? ===<br />
<br />
Read current LoRa™WAN layer status.<br />
<br />
To change LoRa™WAN layer status, AT+MAC=OFF and AT+MAC=ON,… must be performed.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;state&gt;,&lt;minor_ver&gt;,&lt;class&gt;,&lt;ch_pages&gt;,&lt;ism_band&gt;,&lt;otaa&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;minor_ver&gt; can be '''V'''1 or '''V'''3 (default is 3 for LoRa™WAN V1.0).<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;page&gt; is the number of pages of 16 channels available at LoRa™WAN layer (in terms of memory space).<br />
<br />
&lt;ism_band&gt; is 4 for EU433MHz, 7 for China779-787MHz, 8 is EU863-870MHz and 9 for US902-928MHz. ISM band can’t be modified dynamically, it is set at compilation time.<br />
<br />
&lt;otaa&gt; is 0 or 2 for ABP and 1 for OTAA (2 means ABP, and OTAA is not supported by the module).<br />
<br />
<br><br />
<br />
==== Example ====<br />
<br />
A class A US902-928MHz device with 80 channels (5*16) which doesn’t support OTAA:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,5,9,2<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+MAC= SNDBIN,&lt;binpyload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application).<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC=SNDBIN,1A2B3C,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVBIN, === <br />
Register for receiving downlink frames on specified port, payload is output as binary hexa string.<br />
<br />
AT+MAC= RCVBIN,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVBIN,&lt;port&gt;,&lt;more&gt;,&lt;binarypayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
The RCVBIN unsolicited response is always sent after a Tx, even if no frame has been received. It indicates the end of Rx windows.<br />
<br />
For a class A device, it is sent when a downlink frame has been received or at the end of the Rx window 2 (if no downlink frame has been received).<br />
<br />
For a class C device, it is sent when a downlink frame has been received or at the end of the Rx window 1 (if no downlink frame has been received).<br />
<br />
If the Tx was in ack mode, the RCVBIN is sent before the OK (or ERROR NOACK) response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
If the Tx was in unack mode, the RCVBIN is sent after the OK response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
==== Example ====<br />
AT+MAC= RCVBIN,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVBIN,2,true,1A2B3C4D,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC=SNDTXT, === <br />
It is the same command as AT+MAC=SNDBIN except that the payload is interpreted as text and is transmitted as received on serial link (no translation from hexa ASCII to hexa binary is performed).<br />
<br />
AT+MAC= SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
Text frame transmission.<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application)<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC= SNDTXT,HELLO WORLD,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVTXT, === <br />
Register for receiving downlink frames on specified port, payload is output as text string (translation to binary hexa string is not performed).<br />
<br />
AT+MAC=RCVTXT,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
'''By default, downlink payload are processed as binary payload, thus if the AT client application needs to receive the payload as text (without any binary hexa string translation), it must uses this command.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVTXT,&lt;port&gt;,&lt;more&gt;,&lt;textpayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
==== Example ====<br />
AT+MAC=RCVTXT,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVTXT,2,true,HELLO WORLD,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC= STOPRCV, === <br />
Unregister for receiving downlink frames on specified port.<br />
<br />
AT+MAC=STOPRCV,&lt;port&gt;<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid.<br />
<br />
ERROR if MAC is OFF or port is invalid.<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+MAC=SNDLCR, === <br />
Send a Link Check Request.<br />
<br />
AT+MAC=SNDLCR,&lt;nbrepeat&gt;<br />
<br />
&lt;nbrepeat&gt; = 0 means the LCR message is sent in unack mode on port 0.<br />
<br />
&lt;nbrepeat&gt; != 0 means the LCR message is sent in ack mode on port 0 with &lt;nbrepeat&gt; transmissions.<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and Link Check Answer has been received.<br />
<br />
ERROR if MAC is OFF or Link Check Answer has not been received and Tx was in unack mode.<br />
<br />
ERROR NOACK if Link Check Answer has not been received and Tx was in ack mode.<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
Received data is sent back as<br />
<br />
+MAC: &lt;margin&gt;,&lt;gwcnt&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+MAC=SNDLCR<br />
+MAC: 20,3,-45.00,8.00<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RCH, === <br />
Read MAC channels command.<br />
<br />
AT+MAC=RCH,&lt;chan&gt;,&lt;page&gt;,&lt;unsol_evt&gt;<br />
<br />
&lt;chan&gt; specifies the channel to read (all channels of the page if omitted or if 16)<br />
<br />
&lt;page&gt; specifies the channel page (all pages if omitted or if number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;unsol_evt&gt; specifies if unsolicited events are required (0 when not required). The unsolicited events inform the AT client application when a MAC parameter has been changed by the LoRa™WAN layer.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
For each channel, the following information is output:<br />
<br />
+MAC: &lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;busytime&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
&lt;chan&gt;: the channel index in the page (0 to 15).<br />
<br />
&lt;frequency&gt;: the frequency in Hz (0 means channel is disabled).<br />
<br />
&lt;mindr&gt;: minimum datarate allowed on the channel.<br />
<br />
&lt;maxdr&gt;: maximum datarate allowed on the channel.<br />
<br />
&lt;dutycycle&gt;: restricted duty cycle assigned to the channel (applies only when more restricted than ISM regulation specification).<br />
<br />
&lt;busytime&gt;: time in ms before the channel can be used again for Tx (due to duty cycle restrictions).<br />
<br />
&lt;page&gt;: channel page (0 to number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;rxw1freq&gt;: frequency used to open Rx window 1. 0 means same frequency as &lt;frequency&gt; parameter (available only from LoRaWAN V1.0.2, if the parameter is absent in the response, it means the firmware version is older).<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when &lt;busytime&gt; changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RCH<br />
+MAC: 0,868100000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 1,868300000,SF12BW125,SF7BW125,100,0,0,869525000<br />
+MAC: 2,868500000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 3,868850000,SF12BW125,SF7BW125,1000,0,0,0<br />
…<br />
+MAC: 15,000000000,SF12BW125,FSK50KBPS,1,0,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SCH, === <br />
Set MAC channel command.<br />
<br />
AT+MAC=SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;min_dr&gt;,&lt;max_dr&gt;,&lt;dutycycle&gt;,&lt;page&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=SCH?'''''Command.<br />
<br />
&lt;dutycycle&gt; is applied only if it is more restricted than the ISM regulation specification. 1 means 100%, 10 means 10%, 100 means 1%, ...<br />
<br />
&lt;rxw1freq&gt; is available only from LoRaWAN V1.0.2<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when LoRa™WAN layer modifies a channel and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
==== Example ====<br />
<br />
To modify channel 0:<br />
<br />
AT+MAC=SCH,0,868100000,SF12BW125,SF7BW125,100,0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC= RDR ===<br />
<br />
Read current MAC datarate command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band firmware<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current datarate changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RDR<br />
+MAC: SF12BW125,11,001F,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDR, === <br />
Set MAC data rate command.<br />
<br />
AT+MAC=SDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
Set the data rate, Tx power and number of repetitions for uplink transmission (applied to all channels compatible with the datarate). &lt;nbrep&gt; applies only to unconfirmed transmissions.<br />
<br />
&lt;chanmask&gt; and &lt;chanmaskctrl&gt; specify the channels usable for uplink access.<br />
<br />
The parameter list can be found by '''''AT+MAC=SDR?'''''Command.<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify current datarate:<br />
<br />
AT+MAC=SDR,SF12BW125,10,001F,0,0<br />
<br />
<br><br />
<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RTI ===<br />
<br />
Read MAC Time Information command.<br />
<br />
Read common channel time information.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current time info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RTI,&lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Example ====<br />
AT+MAC= RTI<br />
+MAC: 1000,2000,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC= STI, === <br />
Set MAC time information command.<br />
<br />
AT+MAC=STI,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;symbtimeout&gt;<br />
<br />
Only modified parameter can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=STI?'''''Command.<br />
<br />
The parameters &lt;rxw1&gt; and &lt;symbtimeout&gt; are common to all channels.<br />
<br />
The &lt;''rxw2''&gt; parameter is no more used because &lt;''rxw2''&gt; value is set to &lt;rxw1&gt; value + 1000 ms. It is still present for compatibility with old devices.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To modify time info:<br />
<br />
AT+MAC=STI,1000,,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RRX ===<br />
<br />
Read MAC Rx information command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current Rx info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RRX,&lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RRX<br />
+MAC: 869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SRX, === <br />
Set MAC Rx information command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SRX?'''''Command.<br />
<br />
The parameters are common to all channels.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify Rx parameters:<br />
<br />
AT+MAC=SRX,869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RSW ===<br />
<br />
This command is used to read the current LoRa™ and FSK synchro words used by LoRa™WAN layer. Synchro words are in hexadecimal format.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;LoRa™ sync_word&gt;,&lt;FSK sync_word&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RSW<br />
+MAC: 34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SSW, === <br />
This command is used to set the synchro words used by LoRa™WAN layer.<br />
<br />
AT+MAC=SSW,&lt;LoRaSyncWord&gt;,&lt;FskSyncWord&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
Synchro words are in hexadecimal.<br />
<br />
The parameter list can be found by '''''AT+MAC=SSW?'''''Command.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+MAC=SSW,34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RVAR ===<br />
<br />
This command is used to read the miscellaneous LoRa™WAN variables.<br />
<br />
This variables are Tx/Rx counters, aggregated DC and data encryption.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;txcounter&gt;,&lt;rxcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
&lt;aggregateddc&gt; values: 1 means 100%, 10 means 10%, 100 means 1%, …<br />
<br />
&lt;encryption&gt; values: 0 means no encryption, != 0 means encryption enabled.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent only when current aggregated DC changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RVAR,,,&lt;aggregateddc&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RVAR<br />
+MAC: 0,0,1,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SVAR, === <br />
This command is used to set some LoRa™WAN variables.<br />
<br />
AT+MAC=SVAR,&lt;txcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SVAR?'''''Command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To disable encryption:<br />
<br />
AT+MAC=SVAR,,,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RADR ===<br />
<br />
This command is used to read the current LoRa™WAN ADR, piggyback and back-off states.<br />
<br />
'''The ack mode retransmission back-off procedure was initially linked to ADR bit. When ADR bit was on/off, the back-off procedure was on/off. From now, the back-off procedure is linked to the back-off state, it allows to enable ADR bit without enabling the back-off procedure. If &lt;backoff&gt; parameter is absent in RADR response, it means that back-off procedure is still linked to ADR bit (older firmware version).'''<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
&lt;adr&gt;, &lt;piggyback&gt; and &lt;backoff&gt; values: true or false.<br />
<br />
==== Example ====<br />
AT+MAC=RADR<br />
+MAC: true,false,false<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SADR, === <br />
This command is used to set some LoRa™WAN ADR and piggyback states.<br />
<br />
AT+MAC=SADR,&lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SADR?'''''Command.<br />
<br />
When ADR state value is changed, ADR ack counter is reset.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct.<br />
<br />
==== Example ====<br />
<br />
To enable piggyback:<br />
<br />
AT+MAC=SADR,,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=RDEVUID ===<br />
<br />
Read device unique identifier.<br />
<br />
Device UID is coded on 8 bytes.<br />
<br />
''This command obsoletes AT+MAC=DEVUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
UID is returned as<br />
<br />
+MAC: &lt;devuid&gt;,&lt;rand_seed&gt;,&lt;read_only&gt;<br />
<br />
When read_only value is 1, it means that the device unique identifier is built from Nemeus 36 bits OUI (70B3D5326xxxxxxx). In this case the device UID can’t be modified and the security keys are not readable.<br />
<br />
==== Example ====<br />
AT+MAC=RDEVUID<br />
0010203,306A0327,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVADDR ===<br />
<br />
Read device address.<br />
<br />
''This command obsoletes AT+MAC=DEVADDR command.''<br />
<br />
''Old command still works and returns the same solicited response.''<br />
<br />
''Warning: unsolicited response changed, old one is no more sent!!!''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Address is returned as<br />
<br />
+MAC: &lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
In ABP mode, the device address is the 4 LSB of the device unique identifier.<br />
<br />
In OTAA mode, the device address is assigned by the network.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when device is in OTAA mode and at least one AT+MAC=? command has been sent.<br />
<br />
+MAC: RDEVADDR,&lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
==== Example ====<br />
<br />
Read device address of an OTAA device when not yet joint to network:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
<br />
After receipt of valid join accept, unsolicited response is sent:<br />
<br />
DEVADDR,0870C367,010203 <br />
<br><br />
----<br />
=== AT+MAC=SDEVADDR, === <br />
This command is used to modify device address when ABP mode is used.<br />
<br />
AT+MAC=SDEVADDR,&lt;devaddr&gt;<br />
<br />
If MAC layer is on in ABP mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devaddr&gt; length is 8 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVADDR,01020304<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPUID ===<br />
<br />
Read application Unique ID.<br />
<br />
Application UID is coded on 8 bytes.<br />
<br />
By default it is set to 0000000000000000.<br />
<br />
It can be modified by sending the following AT command:<br />
<br />
AT+GA=DIND,1,8301000008xxxxxxxxxxxxxxxx0000<br />
<br />
Where xxxxxxxxxxxxxxxx is the new application UID LSB first.<br />
<br />
MAC layer must be restarted to take into account new application UID (AT+MAC=OFF and AT+MAC=ON).<br />
<br />
Application UID can also be modified using AT+MAC=SAPPUID,&lt;app_uid&gt;.<br />
<br />
''This command obsoletes AT+MAC=APPUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Application UID is returned as<br />
<br />
+MAC: &lt;appuid&gt;<br />
<br />
==== Example ====<br />
<br />
Read default application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: 0000000000000000<br />
OK<br />
<br />
Set application UID to FEDCBA9876543210:<br />
<br />
0000<br />
OK<br />
<br />
Restart MAC layer:<br />
<br />
AT+MAC=OFF<br />
OK<br />
AT+MAC=ON<br />
OK<br />
<br />
Read new application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: FEDCBA9876543210<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SAPPUID, === <br />
This command is used to modify application UID.<br />
<br />
AT+MAC=SAPPUID,&lt;appuid&gt;<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;appuid&gt; length is 16 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SAPPUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPKEY ===<br />
<br />
Read application key.<br />
<br />
Application Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPKEY command.''<br />
<br />
''Old command still works and returns the &lt;appkey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application key is returned as<br />
<br />
+MAC: &lt;appkey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPKEY<br />
+MAC: A8FA642E2E3245BB9B8CAC7E2456EF3C<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPKEY<br />
+MAC: 3CEF56247EAC8C9BBB45322E2E64FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RNSKEY ===<br />
<br />
Read Network Session Key.<br />
<br />
Network Session Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=NSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=NSKEY command.''<br />
<br />
''Old command still works and returns the &lt;nskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Network session key is returned as<br />
<br />
+MAC: &lt;nskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RNSKEY<br />
+MAC: A8F1642E2E32453B9B8CAC7C2456EF72<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=NSKEY<br />
+MAC: 72EF56247CAC8C9B3B45322E2E64F1A8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPSKEY ===<br />
<br />
Read application session key.<br />
<br />
Application session key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPSKEY command.''<br />
<br />
''Old command still works and returns the &lt;appskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application session key is returned as<br />
<br />
+MAC: &lt;appskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPSKEY<br />
+MAC: A8FA672E2E4245BB9ECCCA7E64F54C38<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPSKEY<br />
+MAC: 384CF5647ECACC9EBB45422E2E67FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RMC ===<br />
<br />
Read MultiCast parameters. <span style="color:red">Multicast is only available from master18Wxx</span>.<br />
<br />
==== Response ====<br />
<br />
OK when the command is supported by the firmware.<br />
<br />
ERROR when it is not supported.<br />
<br />
Multicast parameters are returned as<br />
<br />
+MAC: &lt;addr&gt;,&lt;addr_mask&gt;,&lt;group_mask&gt;,&lt;fcnt_dw&gt;,&lt;net_skey&gt;,&lt;app_skey&gt;<br />
<br />
- &lt;addr&gt;: the multicast address (32 bits)<br />
- &lt;addr_mask&gt;: the significant part of the multicast address (More Significant bits) coded on 32 bits.<br />
- &lt;group_mask&gt;: the groups the device can receive (32 bits => groups 0 to 31).<br />
- &lt;fcnt_dw&gt;: the current value of the downlink frame counter (32 bits).<br />
- &lt;net_skey&gt;: the network security key for integrity checking (128 bits).<br />
- &lt;app_skey&gt;: the application security key for payload ciphering (128 bits).<br />
<br />
The address mask specifies which part of the received address is processed as an address and which part is processed as a group.<br />
The address mask can take the following values:<br />
- 0x00000000: the multicast function is disabled<br />
- 0xFFFFFFFF: only 1 group is possible<br />
- 0xFFFFFFFE: 2 groups are possible<br />
- 0xFFFFFFFC: 4 groups are possible<br />
- 0xFFFFFFF8: 8 groups are possible<br />
- 0xFFFFFFFE: 16 groups are possible<br />
- 0xFFFFFFFE: 32 groups are possible<br />
<br />
==== Example ====<br />
AT+MAC=RMC<br />
+MAC: 789ABCDE,FFFFFFFC,00000007,0,0102030405060708090A0B0C0D0E0F00,0102030405060708090A0B0C0D0E0F00<br />
OK<br />
With such parameters, the following received addresses are processed:<br />
- 0x789ABCDC: valid multicast address, group 0 is accepted because bit0 of group mask is set<br />
- 0x789ABCDD: valid multicast address, group 1 is accepted because bit1 of group mask is set<br />
- 0x789ABCDE: valid multicast address, group 2 is accepted because bit2 of group mask is set<br />
- 0x789ABCDF: valid multicast address, group 3 is rejected because bit3 of group mask is not set<br />
When the address is accepted (valid multicast address and accepted group) then the MIC is computed thanks to network security key.<br />
If the computed MIC matches with the received MIC then the payload is deciphered thanks to application security key and the resulting payload is pushed to the application addressed by the LoRaWAN port.<br />
<br />
<br><br />
----<br />
<br />
=== AT+MAC=SMC ===<br />
<br />
Set MultiCast parameters.<br />
AT+MAC=SMC,&lt;addr&gt;,&lt;addr_mask&gt;,&lt;group_mask&gt;,&lt;fcnt_dw&gt;,&lt;net_skey&gt;,&lt;app_skey&gt;<br />
See AT+MAC=RMC for parameter description<br />
<br />
==== Response ====<br />
<br />
OK when the command is supported by the firmware and the parameters are valid.<br />
<br />
ERROR when it is not supported or parameters are invalid (especially &lt;group_mask&gt; parameter which can take 7 different values).<br />
<br />
<br />
==== Example ====<br />
AT+MAC=SMC,789ABCDE,FFFFFFFC,00000007,0,0102030405060708090A0B0C0D0E0F00,0102030405060708090A0B0C0D0E0F00<br />
OK<br />
<br />
<br><br />
----<br />
<br />
=== Informative examples ===<br />
==== Device start ====<br />
<br />
AT client application can detect a device start or restart when the unsolicited response +DEBUG: START,&lt;version&gt; is received. Depending on initialization timing, AT client application is not sure to receive this unsolicited response, that’s the reason why it is recommended that AT client application use AT+MAC=? command to synchronize with the device.<br />
<br />
<br><br />
<br />
<u>'''OTAA case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
+MAC: RDEVADDR,0870C367,010203 <br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<u>'''ABP case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,0 <br />
OK<br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<br><br />
<br />
==== Send unconfirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''No downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
AT+MAC=SNDBIN,,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
==== Send confirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''Ack received, no downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,0,false,,-60.00,7.00 <br />
OK <br />
<br />
<u>'''Ack not received:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
ERROR NOACK <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
OK <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
AT+MAC=SNDBIN,,0,2,1 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
OK <br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT SIGFOX™ commands ==<br />
<br />
---- <br />
These commands are available only on Nemeus modules embedding SIGFOX™ library. If the library is not embedded then ERROR is returned.<br />
<br />
3 type of AT strings are specified:<br />
<br />
* SF commands: AT+SF=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* SF solicited responses: +SF: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to SF commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the SF command and the OK response.<br />
* SF unsolicited responses: +SF: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the SF command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+SF=? to know the current SIGFOX™ layer state.<br />
* AT+SF=OFF and AT+SF=ON to stop and start SIGFOX™ layer.<br />
* AT+SF=SNDBIN,… to send uplink frame.<br />
* AT+SF=SNDBIT,… to send uplink bit.<br />
* AT+SF=SNDOOB to send uplink out of band message (keep alive messages).<br />
* +SF: RCVBIN,… when receiving downlink frames.<br />
<br />
All other commands are not really required, they are mainly used to configure SIGFOX™ layer and to perform SIGFOX™ qualification tests.<br />
<br />
SIGFOX™ proprietary AT command set is also supported but not described in this document.<br />
<br />
<br><br />
----<br />
=== AT+SF=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+SF=HELP<br />
+SF: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+SF: &lt;cmd&gt; are ON,OFF,?,SNDBIN,SNDBIT,SNDOOB,SREP,RREP,STXF,RTXF,SRXF,RRXF,STXP,RTXP<br />
+SF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+SF=ON ===<br />
<br />
This command is used to start SIGFOX™ layer and is mandatory in order to use most of SF commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
==== Response ====<br />
<br />
If LoRa™WAN stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=ON<br />
OK<br />
<br><br />
----<br />
=== AT+SF=OFF ===<br />
<br />
Stop SIGFOX™ layer.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=OFF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=? ===<br />
<br />
Read current SIGFOX™ layer status.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ library is embedded OK is returned.<br />
<br />
Else ERROR is returned.<br />
<br />
+SF: &lt;state&gt;,&lt;NMS_lib_ver&gt;,&lt;SFX_lib_ver&gt;,&lt;dev_id&gt;,&lt;initial_pac&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;NMS_lib_ver&gt; is the version of Nemeus library used to communicate with SIGFOX™ network.<br />
<br />
&lt;SFX_lib_ver&gt; is the version of SIGFOX™ library.<br />
<br />
&lt;dev_id&gt; is the device unique identifier on SIGFOX™ network.<br />
<br />
&lt;initial_pac&gt; is the first Portability Access Code used to register the device on SIGFOX™ network. It is used one time for first registration.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=?<br />
+SF: ON,NMS-SFX-LIB-1.2,UDL1-1.6.0,000ABCDE,0123456789ABCDEF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+SF=SNDBIN,&lt;binpayload&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the frame is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the frame is sent in acknowledged mode.<br />
<br />
The frame is sent when channel becomes free regarding duty cycle limitations.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIN,CAFE,1<br />
+SF: SND,4576<br />
+SF: SND,0<br />
+SF: 6282<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDBIT, === <br />
Bit transmission.<br />
<br />
AT+SF=SNDBIT,&lt;bitvalue&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the bit is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the bit is sent in acknowledged mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIT,0,1<br />
+SF: SND,6422<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDOOB ===<br />
<br />
Out Of Band message transmission.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it can be used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent.<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent.<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
==== Example ====<br />
AT+SF=SNDOOB<br />
+SF: SND,3987<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
<br><br />
----<br />
=== AT+SF=RREP ===<br />
<br />
Read Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;repeat&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 2 repetitions.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RREP<br />
+SF: 2<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SREP, === <br />
<br />
Set Tx repetitions used in acked mode.<br />
<br />
AT+SF=SREP,&lt;repeatnb&gt;<br />
<br />
==== Response ====<br />
<br />
Default value is 2 repetitions.<br />
<br />
OK if number of repetitions &lt;= 2.<br />
<br />
ERROR if number of repetitions &gt; 2.<br />
<br />
==== Example ====<br />
AT+SF=SREP,1<br />
OK<br />
AT+SF=SREP,3<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXF ===<br />
<br />
Read output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 868130000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXF<br />
+SF: 868130000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXF, === <br />
Set output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= tx_frequency &lt;= 870000000.<br />
<br />
ERROR if tx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=STXF,868200000<br />
OK<br />
AT+SF=STXF,862200000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RRXF ===<br />
<br />
Read reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;rx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 869525000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RRXF<br />
+SF: 869525000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SRXF, === <br />
Set reception carrier macro channel.<br />
<br />
AT+SF=SRXF,&lt;rx_frequency&gt;<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= rx_frequency &lt;= 870000000.<br />
<br />
ERROR if rx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=SRXF,869525000<br />
OK<br />
AT+SF=SRXF,869525000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXP (for test purpose) ===<br />
<br />
Read Tx power applied to FSK continuous wave<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_power&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 14 dBm.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXP<br />
+SF: 14<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+SF=STXP (for test purpose) === <br />
Set Tx power applied to FSK continuous wave<br />
<br />
==== Response ====<br />
<br />
OK if tx_power &lt;= 14 dBm.<br />
<br />
ERROR if tx_power &gt; 14 dBm.<br />
<br />
==== Example ====<br />
AT+SF=STXP,10<br />
OK<br />
AT+SF=STXP,20<br />
ERROR<br />
<br />
<br><br />
<br />
== AT Generic command ==<br />
<br />
---- <br />
AT Generic command can be used to activate/deactivate some generic functionalities.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8801 ===<br />
<br />
This command is use to know the status of PowerSaving.<br />
<br />
==== Response ====<br />
<br />
+GA : DIND,1,0801&lt;pwr_state&gt;<br />
<br />
Always OK.<br />
<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,8801<br />
<br />
+GA : DIND,1,080100<br />
<br />
OK.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8802&lt;pwr_state&gt; ===<br />
<br><br />
'''WARNING: CONNECT CORRECTLY THE WAKEUP PIN BEFORE ACTIVATION OF POWERSAVING'''<br />
<br><br />
This command is use to set the PowerSaving.<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
PowerSaving can be activated once after boot-up, and from this point will go in stop mode as soon as possible and is wake-up by RTC or Wakeup pin.<br />
Please note that once power-saving is activated, user should toggle wake-up pin before sending an AT command.<br />
<br />
If the module is reset, the powersaving is set back to OFF. So User should ensure setting it to ON after any reset<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,880201<br />
<br />
OK<br />
<br />
<br><br />
----<br />
<br />
== AT debug command ==<br />
<br />
---- <br />
AT debug command can be used to activate/deactivate some debug functionalities.<br />
<br />
<br><br />
----<br />
=== AT+DEBUG= HELP ===<br />
<br />
This commandis use to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= HELP<br />
+DEBUG: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+DEBUG: &lt;cmd&gt; are MVER,MVOFF,MVON,MV?,MEOFF,MEON,ME?,MPOFF,MPON,MP?,RREAD,RWRITE<br />
+DEBUG: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG=MVER ===<br />
<br />
Read Mcu software version.<br />
<br />
Furthermore, when the device boots the software version is sent as an unsolicited response:<br />
<br />
+DEBUG: START,&lt;version&gt;<br />
<br />
This unsolicited response can be used to detect a reset of the device.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: MVER,&lt;version&gt;<br />
<br />
==== Example ====<br />
<br />
AT boot:<br />
<br />
+DEBUG: START,Nemeus 1.x<br />
<br />
When requested:<br />
<br />
AT+DEBUG= MVER<br />
+DEBUG: MVER,Nemeus 1.x<br />
OK<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+DEBUG= MVOFF ===<br />
<br />
Disable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MVON ===<br />
<br />
Enable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
OK if software is compiled with debug traces.<br />
<br />
ERROR if software is compiled without debug traces.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MV? ===<br />
<br />
Read current verbose mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;verbose&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MV?<br />
+DEBUG: MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEOFF ===<br />
<br />
Disable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEON ===<br />
<br />
Enable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= ME? ===<br />
<br />
Read current echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;echo&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= ME?<br />
+DEBUG: MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPOFF ===<br />
<br />
Disable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPON ===<br />
<br />
Enable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MP? ===<br />
<br />
Read current prompt mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;prompt&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MP?<br />
+DEBUG: MPON<br />
OK</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-PC_Pulse_Sensor&diff=305NIS-PC Pulse Sensor2018-06-12T14:23:30Z<p>Lcs: /* Downlink Frame format */</p>
<hr />
<div><!-- [[Category:Sensors]] --><br />
<br />
[[File:Exp PE pulse sensor.png|thumb|400px|Load Cell Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= Pulse sensor properties =<br />
<br />
* Handles open collector and dry contact inputs<br />
<br />
* Max 50k pulses per second<br />
<br />
* broken cable detection<br />
<br />
The pullup resistor (1Mohm / 3.3V) is integrated.<br />
Perfect for use with reed switches.<br />
The current flowing through the dry contact is 3.3uA.<br />
<br />
Absolute Maximum voltage injection : 6V.<br />
<br />
= Wiring =<br />
<br />
[[File:Full config ids.png|picture of sensor pcb and box]]<br />
<br />
{| class="wikitable"<br />
|+Probe settings<br />
|-<br />
|Input mode<br />
|jumpers configuration<br />
|Probe connection<br />
|-<br />
|rowspan="8"|open collector<br />
|rowspan="8"|JP1 on 1-2 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|-<br />
|rowspan="8"|dry contact<br />
|rowspan="8"|JP1 on 2-3 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|}<br />
<br />
If you want to use the Alert signal, connect it to GND on the sensor side. If the cable breaks, the device detects it.<br />
<br />
<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <pc_pulse> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : indicates the presence of <fraud_counter> field.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<pc_pulse>: 4*<nb_meas> bytes containing the Pulse counter values measure in 1 pulse. Each counter value is an unsigned integer on 32 bits in big endian [0..+4294967295].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit4 == 1)<br />
<fraud_counter>: 1*<nb_meas> bytes containing the fraud counter values (using MCU internal sensor). Each fraud_counter value is an unsigned integer on 8 bits in big endian.<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (value > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (value < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (value < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (value > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><pc_pulse1>...<pc_pulseN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><pc_pulse1>...<pc_pulseN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“8200009C40”: the frame indicates one Pulse measurement of 40 000 pulses.<br />
“8302001e8480002dc6c0”: the frame indicates two pulse measurements of 2.10^6 pulses and 3.10^6 pulses.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
<meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
<period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<mode>: bit field enabling/disabling the measures (threshold detections and periodic measures)<br />
<subperiod>: subdivision of period for threshold detection, actual measurement period is (<meas_period>*<period_unit>)/<subperiod> seconds<br />
<high_threshold>: value of high threshold<br />
<high_hysteresis>: value of high hysteresis<br />
<low_threshold>: value of low threshold<br />
<low_hysteresis>: value of low hysteresis<br />
<pwr_on_duration>: value in ms to wait between sensor power-on and measure reading<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol. The downlink frame must be sent on the MS008 LoRaWAN port (11).<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.<br />
<br />
Bit0 indicates the presence of <up_frame_mask> field<br />
<br />
Bit1 indicates the presence of <nb_meas_for_tx> field<br />
<br />
Bit2 indicates the presence of <meas_period> and <period_unit> fields<br />
<br />
Bit3 indicates the presence of <mode> and <subperiod> fields<br />
<br />
Bit4 indicates the presence of <high_threshold> and <high_hysteresis> fields<br />
<br />
Bit5 indicates the presence of <low_threshold> and <low_hysteresis> fields<br />
<br />
Bit6 indicates the presence of <pwr_on_duration> field<br />
<br />
If (mask.bit0 == 1):<br />
<br />
<up_frame_mask>: 1 byte containing the uplink frame mask<br />
<br />
If (mask.bit1 == 1):<br />
<br />
<nb_meas_for_tx>: 1 byte containing the number of measurements required to trigger a transmission<br />
<br />
If (mask.bit2 == 1):<br />
<br />
<meas_period>: 2 bytes in little endian (LSB first) containing the period of measurements in <period_unit> seconds<br />
<period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
If (mask.bit3 == 1):<br />
<mode>: 1 byte encoded as follows:<br />
bit0: enable(1)/disable(0) high threshold detection<br />
bit1: enable(1)/disable(0) high hysteresis detection (when leaving high threshold state)<br />
bit2: enable(1)/disable(0) low threshold detection<br />
bit3: enable(1)/disable(0) low hysteresis detection (when leaving low threshold state)<br />
bit4: enable(1)/disable(0) periodic measurements<br />
bit5: reserved<br />
bit6: 0-10V(1)/4-20mA(0)<br />
bit7: reserved<br />
<subperiod>: 2 bytes in little endian containing the period subdivision<br />
<br />
If (mask.bit4 == 1):<br />
<br />
<high_threshold>: signed integer on 2 bytes in little endian containing the high threshold in mV [0..+9999] or µA [+4000..+19999]<br />
<high_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving high threshold state in 100 mV or 100 µA [0..255]<br />
<br />
If (mask.bit5 == 1):<br />
<br />
<low_threshold>: signed integer on 2 bytes in little endian containing the low threshold in mV [+1..+10000] or µA [+4001..+20000]<br />
<low_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving low threshold state in 100 mV or 100 µA [0..255]<br />
<br />
If (mask.bit6 == 1):<br />
<br />
<pwr_on_duration>: unsigned integer on 2 bytes containing the delay in ms [0..65535]<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit><mode><subperiod><high_threshold><high_hysteresis><low_threshold> <low_hysteresis><pwr_on_duration>.<br />
<br />
Some examples in hexadecimal:<br />
<br />
“028182”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <pc_pulse> field only<br />
“028192”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <pc_pulse> and <fraud_counter> fields<br />
“028E04605401100100”: set <nb_meas_for_tx> to 4, <meas_period> to 21600*<period_unit> seconds, <period_unit> to 1 second and enable periodic measurements only with subperiod to 1 => one measurement every 6 hours and one transmission every 4 measures (every day). Each uplink frame will include 4 measurements<br />
<br />
<span style="color:#FF0000">'''Note :''' Alarm on Pulse counter should be managed carefully as the counter only goes up. So an high_threshold should be updated when alarm is reached, in order to allow another alarm. </span><br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/FD74VIAwIY209Ubm|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=Sensors_FAQ&diff=304Sensors FAQ2018-06-07T12:34:53Z<p>Lcs: </p>
<hr />
<div>[[Category:Sensors]]<br />
<br />
<br />
<br />
== LoRaWan Mode == <br />
<br />
<br />
<br />
=== Sensors stuck on SF12 datarate since the join procedure ===<br />
<br />
The first data transmitted is always with SF12. This is to be compatible with most network architectures.<br />
For example, you can perform a join in SF10 but there is no guarantee that you will be able to communicate with the same SF.<br />
<br />
The Network Server should use Adaptive Data Rate (ADR) mechanism to lower the SF.<br />
<br />
If the device is stuck in SF12 despite good radio conditions (for example, in line of sight) it means that the Network Server does not manage ADR.<br />
<br />
<br />
<br />
<br />
<br />
== Sigfox Mode ==<br />
<br />
=== Link quality ===<br />
<br />
Sigofx deliver Link Quality information as explained in [https://resources.sigfox.com/document/link-quality:-general-knowledge link-quality:-general-knowledge] page.<br />
<br />
A device can toggle between two level quality depending on RSSI and number of stations reached which are two parameters that can fluctuate in time.<br />
For example:<br />
* a device around -122dBm will likely fluctuate between GOOD and EXCELLENT. <br />
* a device around -135dBm will likely fluctuate between AVERAGE and LIMIT. PLease Note also that with this quality Link LIMIT frames might be lost. <br />
<br />
[[File:Sfx quality link.png|thumb]]<br />
<br />
Sensitivity on SIgFox base stations gets as low as -140dBm. Something else to consider is the numbers of base stations that usually receiving the messages.<br />
If only one is receiving might be unconfortable depending on RSSI.<br />
<br />
<br />
<br />
Feel free to reach out to your local operator or devrelations@sigfox.com if you need detailed information.<br />
<br />
<br />
<br />
== RSSI ==<br />
<br />
RSSI reading can vary over time. A particular reading represents only one moment, and the values may change dramatically depending on surrounding condition. It is advised to do several measures to check the connection stability.</div>Lcshttps://wiki.nemeus.fr/index.php?title=Sensors_FAQ&diff=303Sensors FAQ2018-06-07T10:22:24Z<p>Lcs: /* Link quality */</p>
<hr />
<div>[[Category:Sensors]]<br />
<br />
<br />
== LoRaWan Mode == <br />
<br />
<br />
<br />
=== Sensors stuck on SF12 datarate since the join procedure ===<br />
<br />
The first data transmitted is always with SF12. This is to be compatible with most network architectures.<br />
For example, you can perform a join in SF10 but there is no guarantee that you will be able to communicate with the same SF.<br />
<br />
The Network Server should use Adaptive Data Rate (ADR) mechanism to lower the SF.<br />
<br />
If the device is stuck in SF12 despite good radio conditions (for example, in line of sight) it means that the Network Server does not manage ADR.<br />
<br />
<br />
<br />
<br />
<br />
== Sigfox Mode ==<br />
<br />
=== Link quality ===<br />
<br />
Sigofx deliver Link Quality information as explained in [https://resources.sigfox.com/document/link-quality:-general-knowledge link-quality:-general-knowledge] page.<br />
<br />
A device can toggle between two level quality depending on RSSI and number of stations reached which are two parameters that can fluctuate in time.<br />
For example:<br />
* a device around -122dBm will likely fluctuate between GOOD and EXCELLENT. <br />
* a device around -135dBm will likely fluctuate between AVERAGE and LIMIT. PLease Note also that with this quality Link LIMIT frames might be lost. <br />
<br />
[[File:Sfx quality link.png|thumb]]<br />
<br />
Sensitivity on SIgFox base stations gets as low as -140dBm. Something else to consider is the numbers of base stations that usually receiving the messages.<br />
If only one is receiving might be unconfortable depending on RSSI.<br />
<br />
<br />
<br />
Feel free to reach out to your local operator or devrelations@sigfox.com if you need detailed information.</div>Lcshttps://wiki.nemeus.fr/index.php?title=File:Sfx_quality_link.png&diff=302File:Sfx quality link.png2018-06-07T10:21:22Z<p>Lcs: </p>
<hr />
<div>Sigfox quality link depending on RSSI and Base station</div>Lcshttps://wiki.nemeus.fr/index.php?title=Sensors_FAQ&diff=301Sensors FAQ2018-06-07T09:19:51Z<p>Lcs: </p>
<hr />
<div>[[Category:Sensors]]<br />
<br />
<br />
== LoRaWan Mode == <br />
<br />
<br />
<br />
=== Sensors stuck on SF12 datarate since the join procedure ===<br />
<br />
The first data transmitted is always with SF12. This is to be compatible with most network architectures.<br />
For example, you can perform a join in SF10 but there is no guarantee that you will be able to communicate with the same SF.<br />
<br />
The Network Server should use Adaptive Data Rate (ADR) mechanism to lower the SF.<br />
<br />
If the device is stuck in SF12 despite good radio conditions (for example, in line of sight) it means that the Network Server does not manage ADR.<br />
<br />
<br />
<br />
<br />
<br />
== Sigfox Mode ==<br />
<br />
=== Link quality ===<br />
<br />
Sigofx deliver Link Quality information as explained in [https://resources.sigfox.com/document/link-quality:-general-knowledge link-quality:-general-knowledge] page.<br />
<br />
A device can toggle between two level quality depending on RSSI and number of stations reached which are two parameters that can fluctuate in time.<br />
For example:<br />
- a device around -122dBm will likely fluctuate between GOOD and EXCELLENT. <br />
- a device around -135dBm will likely fluctuate between AVERAGE and LIMIT. PLease Note also that with this quality Link LIMIT trames might be lost. The floor level detection of Sigfox is around -138 dBm</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-PC_Pulse_Sensor&diff=299NIS-PC Pulse Sensor2018-05-23T11:15:21Z<p>Lcs: /* Uplink data Frame format */</p>
<hr />
<div><!-- [[Category:Sensors]] --><br />
<br />
[[File:Exp PE pulse sensor.png|thumb|400px|Load Cell Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= Pulse sensor properties =<br />
<br />
* Handles open collector and dry contact inputs<br />
<br />
* Max 50k pulses per second<br />
<br />
* broken cable detection<br />
<br />
The pullup resistor (1Mohm / 3.3V) is integrated.<br />
Perfect for use with reed switches.<br />
The current flowing through the dry contact is 3.3uA.<br />
<br />
Absolute Maximum voltage injection : 6V.<br />
<br />
= Wiring =<br />
<br />
[[File:Full config ids.png|picture of sensor pcb and box]]<br />
<br />
{| class="wikitable"<br />
|+Probe settings<br />
|-<br />
|Input mode<br />
|jumpers configuration<br />
|Probe connection<br />
|-<br />
|rowspan="8"|open collector<br />
|rowspan="8"|JP1 on 1-2 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|-<br />
|rowspan="8"|dry contact<br />
|rowspan="8"|JP1 on 2-3 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|}<br />
<br />
If you want to use the Alert signal, connect it to GND on the sensor side. If the cable breaks, the device detects it.<br />
<br />
<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <pc_pulse> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : indicates the presence of <fraud_counter> field.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<pc_pulse>: 4*<nb_meas> bytes containing the Pulse counter values measure in 1 pulse. Each counter value is an unsigned integer on 32 bits in big endian [0..+4294967295].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit4 == 1)<br />
<fraud_counter>: 1*<nb_meas> bytes containing the fraud counter values (using MCU internal sensor). Each fraud_counter value is an unsigned integer on 8 bits in big endian.<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (value > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (value < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (value < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (value > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><pc_pulse1>...<pc_pulseN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><pc_pulse1>...<pc_pulseN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“8200009C40”: the frame indicates one Pulse measurement of 40 000 pulses.<br />
“8302001e8480002dc6c0”: the frame indicates two pulse measurements of 2.10^6 pulses and 3.10^6 pulses.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/FD74VIAwIY209Ubm|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_NIS_Devices_configuration&diff=293Application Note: NIS Devices configuration2018-05-07T15:07:08Z<p>Lcs: </p>
<hr />
<div>[[Category:Sensors]]<br />
[[Category:Application Notes]]<br />
<br />
= Configuration with Nemeus USB stick = <br />
<br />
Most of Nemeus devices can be reconfigured thanks to Nemeus USB stick and [[MM002_Configuration_Tool_Java|MM002 Java application]].<br />
<br />
In addition of the Java application and the USB stick, it needs Yaml File for the device configuration.<br />
<br />
<br />
<br />
<br />
<br />
= Usage = <br />
<br />
Open "LoRa device config" in config Menu. The following display will show up :<br />
<br />
[[File:NIS_device_configuration_1.png|Device configuration windows]]<br />
<br />
The "devUid" field must be filled up with the device Uid of the device to be configured.<br />
<br />
The "Authentication Key" field must be filled up with the App<span style="color:#00FF00">S</span>Key of the device to be configured.<br />
<br />
<br />
<br />
== Reading device == <br />
<br />
When ready, user should set the device in "Test mode" as explained in the wiki (e.g. [[NIS-TR_Temperature_Sensor_(RTD)#Test_mode|Test mode for NIS-TR]] ). Then if you press "Read Device" button the following window should pop up.<br />
<br />
[[File:NIS_device_configuration_pt100_1.png|Device configuration windows for pt100]]<br />
<br />
This is an example for NIS TR product. If the window did not show up, please verify the following point:<br />
- device to be read is set in "Test mode" (Led of the device should blink regularly)<br />
- correct devUid and App<span style="color:#00FF00">S</span>Key has been entered. Please note that the key is the App<span style="color:#00FF00">S</span>Key and not the AppKey<br />
<br />
<br />
== Device parameters == <br />
<br />
<br />
=== Device sensor/application parameters === <br />
<br />
<br />
=== Device network parameters ===</div>Lcshttps://wiki.nemeus.fr/index.php?title=File:NIS_device_configuration_pt100_1.png&diff=292File:NIS device configuration pt100 1.png2018-05-07T15:05:12Z<p>Lcs: Nemeus NIS device configuration of PT100 (LoRa and/or Sigfox)</p>
<hr />
<div>Nemeus NIS device configuration of PT100 (LoRa and/or Sigfox)</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_NIS_Devices_configuration&diff=291Application Note: NIS Devices configuration2018-05-07T14:13:06Z<p>Lcs: Created page with "Category:Sensors Category:Application Notes = Configuration with Nemeus USB stick = Most of Nemeus devices can be reconfigured thanks to Nemeus USB stick and MM00..."</p>
<hr />
<div>[[Category:Sensors]]<br />
[[Category:Application Notes]]<br />
<br />
= Configuration with Nemeus USB stick = <br />
<br />
Most of Nemeus devices can be reconfigured thanks to Nemeus USB stick and [[MM002_Configuration_Tool_Java|MM002 Java application]].<br />
<br />
In addition of the Java application and the USB stick, it needs Yaml <br />
<br />
<br />
<br />
<br />
<br />
= Usage = <br />
<br />
Open "LoRa device config" in config Menu. The following display will show up :<br />
<br />
[[File:NIS_device_configuration_0.png|Device configuration windows]]<br />
<br />
The "devUid" field must be filled up with the device Uid of the device to be configured <br />
The "Authentication Key" field must be filled up with the App_skey of the device to be configured</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002_Configuration_Tool_Java&diff=290MM002 Configuration Tool Java2018-05-07T12:40:21Z<p>Lcs: Created page with "Category:MM002 Category:Modules === Prerequisite === Nemeus Java application to control the MM002 requests that the JAVA Runtime Evaluation 8 kit is installed onto t..."</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
<br />
=== Prerequisite ===<br />
<br />
Nemeus Java application to control the MM002 requests that the JAVA Runtime Evaluation 8 kit is installed onto the computer. This one can be found on [http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html ])<br />
<br />
=== Installation / Execution ===<br />
<br />
Nemeus JAVA Application is made of only one file : o_NemeusATKvx.yy.jar. This one can be put in any folder.To execute the JAVA application, the following command must be executed in a Command DOS windows in the folder in which the file is available.<br />
<br />
[http://store.nemeus.fr/apps/javaClient/ Nemeus Java Application] Used to manage the module via Serial interface<br />
<br />
java -jar o_NemeusATKvx.yy.jar<br />
<br />
=== Logs ===<br />
<br />
During execution, the JAVA application records information in a log file which is created in same folder of the .jar file at the time this one is started. The generated log file stays the same during all the JAVa application execution. The file format is log-mm00X-<xxxxx> where xxxx corresponds to the date and time of the JAVA application start</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-IO_Digital_Sensor&diff=287NIS-IO Digital Sensor2018-04-24T08:46:23Z<p>Lcs: /* Downlink Frame format */</p>
<hr />
<div>[[File:1 Exp PE Digital Sensor.png|thumb|400px|IO Digital Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= IO Digital sensor properties =<br />
<br />
This sensor can monitor up to 4 digital inputs and control 4 digital outputs.<br />
<br />
= Wiring =<br />
<br />
[[File:Full config ids.png|picture of sensor pcb and box]]<br />
<br />
<br />
{| class="wikitable"<br />
|+4 Inputs Device wiring <br />
|-<br />
|rowspan="2"|IN0<br />
|1 : IN0+<br />
|rowspan="8"|JP1 1-2 : No pull for voltage input <br> JP1 2-3 : Pull-up for dry contact<br />
|-<br />
|2 : GND<br />
|-<br />
|rowspan="2"|IN1<br />
|3 : IN1+<br />
|-<br />
|4 : GND<br />
|-<br />
|rowspan="2"|IN2<br />
|5 : IN2+<br />
|-<br />
|6 : GND<br />
|-<br />
|rowspan="2"|IN3<br />
|7 : GND<br />
|-<br />
|8 : IN3+<br />
|}<br />
<br />
<br />
== Hardware description ==<br />
<section begin=Input Electrical Characteristics /><br />
=== Input Electrical Characteristics ===<br />
<br />
Two modes selectable with jumper: <br />
* Voltage level detection, polarity agnostic<br />
* Integrated pull-UP for dry contact input<br />
<br />
;Maximum Input Voltage +/-35V<br />
;Detection level VIL 2.1V / VIH 2.3V<br />
;Opto-isolated 3,750 Vrms<br />
<section end=Input Electrical Characteristics /><br />
<br />
<section begin=Output Electrical Characteristics /><br />
=== Output Electrical Characteristics ===<br />
* ESD Protected<br />
* Thermal shutdown with auto restart<br />
* Short circuit and overload protection<br />
* Overvoltage protection<br />
* Current limitation<br />
* Can drive resistive, inductive and capacitive loads<br />
<br />
;Maximum Voltage 42V<br />
;ON resistance 50mΩ<br />
;Nominal load current 3A<br />
<section end=Output Electrical Characteristics /><br />
<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields:<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <io_state> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : indicates the presence of <in_evt> field.<br />
<br />
bit 5 : is reserved<br />
<br />
bit 6 : is reserved<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<io_state>: 4*<nb_meas> bytes containing the input and output states. For each measure, first 16 bits contain the input states, last 16 bits contain the output states.<br />
Each 16 bits word is cut in 8 pairs of 2 bits assigned to each input or output.<br />
For each 2 bit pair, 00 means disabled, 10 means enabled level low, 11 means enabled level high<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit4 == 1) :<br />
<in_evt>: 2 bytes containing the input source and the edge. First byte is a bit field identifying the input source(s) (bit 0 is input 0 ...). Second byte is a bit field identifying the edge, 0 means falling edge and 1 means rising edge. Edge bit is significant only when source bit is set to 1.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
<meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
<period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<mode>: bit field enabling/disabling the measures (threshold detections and periodic measures)<br />
<subperiod>: subdivision of period for threshold detection, actual measurement period is (<meas_period>*<period_unit>)/<subperiod> seconds<br />
<high_threshold>: value of high threshold<br />
<high_hysteresis>: value of high hysteresis<br />
<low_threshold>: value of low threshold<br />
<low_hysteresis>: value of low hysteresis<br />
<pwr_on_duration>: value in ms to wait between sensor power-on and measure reading<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol. The downlink frame must be sent on the NIS IO LoRaWAN port (14).<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.<br />
<br />
Bit0 indicates the presence of <up_frame_mask> field<br />
<br />
Bit1 indicates the presence of <nb_meas_for_tx> field<br />
<br />
Bit2 indicates the presence of <meas_period> and <period_unit> fields<br />
<br />
Bit3 indicates the presence of <mode> and <subperiod> fields<br />
<br />
Bit4 indicates the presence of <high_threshold> and <high_hysteresis> fields<br />
<br />
Bit5 indicates the presence of <low_threshold> and <low_hysteresis> fields<br />
<br />
Bit6 indicates the presence of <pwr_on_duration> field<br />
<br />
If (mask.bit0 == 1):<br />
<br />
<up_frame_mask>: 1 byte containing the uplink frame mask<br />
<br />
If (mask.bit1 == 1):<br />
<br />
<nb_meas_for_tx>: 1 byte containing the number of measurements required to trigger a transmission<br />
<br />
If (mask.bit2 == 1):<br />
<br />
<meas_period>: 2 bytes in little endian (LSB first) containing the period of measurements in <period_unit> seconds<br />
<period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
If (mask.bit3 == 1):<br />
<mode>: 1 byte encoded as follows:<br />
bit0: enable(1)/disable(0) high threshold detection<br />
bit1: enable(1)/disable(0) high hysteresis detection (when leaving high threshold state)<br />
bit2: enable(1)/disable(0) low threshold detection<br />
bit3: enable(1)/disable(0) low hysteresis detection (when leaving low threshold state)<br />
bit4: enable(1)/disable(0) periodic measurements<br />
bit5: reserved<br />
bit6: 0-10V(1)/4-20mA(0)<br />
bit7: reserved<br />
<subperiod>: 2 bytes in little endian containing the period subdivision<br />
<br />
If (mask.bit4 == 1):<br />
<br />
<high_threshold>: signed integer on 2 bytes in little endian containing the high threshold in mV [0..+9999] or µA [+4000..+19999]<br />
<high_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving high threshold state in 100 mV or 100 µA [0..255]<br />
<br />
If (mask.bit5 == 1):<br />
<br />
<low_threshold>: signed integer on 2 bytes in little endian containing the low threshold in mV [+1..+10000] or µA [+4001..+20000]<br />
<low_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving low threshold state in 100 mV or 100 µA [0..255]<br />
<br />
If (mask.bit6 == 1):<br />
<br />
<pwr_on_duration>: unsigned integer on 2 bytes containing the delay in ms [0..65535]<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit><mode><subperiod><high_threshold><high_hysteresis><low_threshold> <low_hysteresis><pwr_on_duration>.<br />
<br />
Some examples in hexadecimal:<br />
<br />
“028182”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <digital_meas> field only</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-IO_Digital_Sensor&diff=286NIS-IO Digital Sensor2018-04-24T08:37:46Z<p>Lcs: /* Downlink Frame format */</p>
<hr />
<div>[[File:1 Exp PE Digital Sensor.png|thumb|400px|IO Digital Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= IO Digital sensor properties =<br />
<br />
This sensor can monitor up to 4 digital inputs and control 4 digital outputs.<br />
<br />
= Wiring =<br />
<br />
[[File:Full config ids.png|picture of sensor pcb and box]]<br />
<br />
<br />
{| class="wikitable"<br />
|+4 Inputs Device wiring <br />
|-<br />
|rowspan="2"|IN0<br />
|1 : IN0+<br />
|rowspan="8"|JP1 1-2 : No pull for voltage input <br> JP1 2-3 : Pull-up for dry contact<br />
|-<br />
|2 : GND<br />
|-<br />
|rowspan="2"|IN1<br />
|3 : IN1+<br />
|-<br />
|4 : GND<br />
|-<br />
|rowspan="2"|IN2<br />
|5 : IN2+<br />
|-<br />
|6 : GND<br />
|-<br />
|rowspan="2"|IN3<br />
|7 : GND<br />
|-<br />
|8 : IN3+<br />
|}<br />
<br />
<br />
== Hardware description ==<br />
<section begin=Input Electrical Characteristics /><br />
=== Input Electrical Characteristics ===<br />
<br />
Two modes selectable with jumper: <br />
* Voltage level detection, polarity agnostic<br />
* Integrated pull-UP for dry contact input<br />
<br />
;Maximum Input Voltage +/-35V<br />
;Detection level VIL 2.1V / VIH 2.3V<br />
;Opto-isolated 3,750 Vrms<br />
<section end=Input Electrical Characteristics /><br />
<br />
<section begin=Output Electrical Characteristics /><br />
=== Output Electrical Characteristics ===<br />
* ESD Protected<br />
* Thermal shutdown with auto restart<br />
* Short circuit and overload protection<br />
* Overvoltage protection<br />
* Current limitation<br />
* Can drive resistive, inductive and capacitive loads<br />
<br />
;Maximum Voltage 42V<br />
;ON resistance 50mΩ<br />
;Nominal load current 3A<br />
<section end=Output Electrical Characteristics /><br />
<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields:<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <io_state> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : indicates the presence of <in_evt> field.<br />
<br />
bit 5 : is reserved<br />
<br />
bit 6 : is reserved<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<io_state>: 4*<nb_meas> bytes containing the input and output states. For each measure, first 16 bits contain the input states, last 16 bits contain the output states.<br />
Each 16 bits word is cut in 8 pairs of 2 bits assigned to each input or output.<br />
For each 2 bit pair, 00 means disabled, 10 means enabled level low, 11 means enabled level high<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit4 == 1) :<br />
<in_evt>: 2 bytes containing the input source and the edge. First byte is a bit field identifying the input source(s) (bit 0 is input 0 ...). Second byte is a bit field identifying the edge, 0 means falling edge and 1 means rising edge. Edge bit is significant only when source bit is set to 1.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
<meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
<period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<mode>: bit field enabling/disabling the measures (threshold detections and periodic measures)<br />
<subperiod>: subdivision of period for threshold detection, actual measurement period is (<meas_period>*<period_unit>)/<subperiod> seconds<br />
<high_threshold>: value of high threshold<br />
<high_hysteresis>: value of high hysteresis<br />
<low_threshold>: value of low threshold<br />
<low_hysteresis>: value of low hysteresis<br />
<pwr_on_duration>: value in ms to wait between sensor power-on and measure reading<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol. The downlink frame must be sent on the MS008 LoRaWAN port (11).<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte.<br />
<br />
Bit0 indicates the presence of <up_frame_mask> field<br />
<br />
Bit1 indicates the presence of <nb_meas_for_tx> field<br />
<br />
Bit2 indicates the presence of <meas_period> and <period_unit> fields<br />
<br />
Bit3 indicates the presence of <mode> and <subperiod> fields<br />
<br />
Bit4 indicates the presence of <high_threshold> and <high_hysteresis> fields<br />
<br />
Bit5 indicates the presence of <low_threshold> and <low_hysteresis> fields<br />
<br />
Bit6 indicates the presence of <pwr_on_duration> field<br />
<br />
If (mask.bit0 == 1):<br />
<br />
<up_frame_mask>: 1 byte containing the uplink frame mask<br />
<br />
If (mask.bit1 == 1):<br />
<br />
<nb_meas_for_tx>: 1 byte containing the number of measurements required to trigger a transmission<br />
<br />
If (mask.bit2 == 1):<br />
<br />
<meas_period>: 2 bytes in little endian (LSB first) containing the period of measurements in <period_unit> seconds<br />
<period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
If (mask.bit3 == 1):<br />
<mode>: 1 byte encoded as follows:<br />
bit0: enable(1)/disable(0) high threshold detection<br />
bit1: enable(1)/disable(0) high hysteresis detection (when leaving high threshold state)<br />
bit2: enable(1)/disable(0) low threshold detection<br />
bit3: enable(1)/disable(0) low hysteresis detection (when leaving low threshold state)<br />
bit4: enable(1)/disable(0) periodic measurements<br />
bit5: reserved<br />
bit6: 0-10V(1)/4-20mA(0)<br />
bit7: reserved<br />
<subperiod>: 2 bytes in little endian containing the period subdivision<br />
<br />
If (mask.bit4 == 1):<br />
<br />
<high_threshold>: signed integer on 2 bytes in little endian containing the high threshold in mV [0..+9999] or µA [+4000..+19999]<br />
<high_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving high threshold state in 100 mV or 100 µA [0..255]<br />
<br />
If (mask.bit5 == 1):<br />
<br />
<low_threshold>: signed integer on 2 bytes in little endian containing the low threshold in mV [+1..+10000] or µA [+4001..+20000]<br />
<low_hysteresis>: unsigned integer on 1 byte containing the hysteresis when leaving low threshold state in 100 mV or 100 µA [0..255]<br />
<br />
If (mask.bit6 == 1):<br />
<br />
<pwr_on_duration>: unsigned integer on 2 bytes containing the delay in ms [0..65535]<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit><mode><subperiod><high_threshold><high_hysteresis><low_threshold> <low_hysteresis><pwr_on_duration>.<br />
<br />
Some examples in hexadecimal:<br />
<br />
“028182”: set the <up_frame_mask> to 0x82 => the next uplink frames will include the <digital_meas> field only</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-PC_Pulse_Sensor&diff=284NIS-PC Pulse Sensor2018-04-03T16:14:44Z<p>Lcs: /* Uplink data Frame format */</p>
<hr />
<div><!-- [[Category:Sensors]] --><br />
<br />
[[File:Exp PE pulse sensor.png|thumb|400px|Load Cell Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= Pulse sensor properties =<br />
<br />
* Handles open collector and dry contact inputs<br />
<br />
* Max 50k pulses per second<br />
<br />
* broken cable detection<br />
<br />
<br />
= Wiring =<br />
<br />
[[File:Full config ids.png|picture of sensor pcb and box]]<br />
<br />
{| class="wikitable"<br />
|+Probe settings<br />
|-<br />
|Input mode<br />
|jumpers configuration<br />
|Probe connection<br />
|-<br />
|rowspan="8"|open collector<br />
|rowspan="8"|JP1 on 1-2 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|-<br />
|rowspan="8"|dry contact<br />
|rowspan="8"|JP1 on 2-3 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|}<br />
<br />
If you want to use the Alert signal, connect it to GND on the sensor side. If the cable breaks, the device detects it.<br />
<br />
<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <pc_pulse> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : is reserved.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<pc_pulse>: 4*<nb_meas> bytes containing the Pulse counter values measure in 1 pulse. Each counter value is an unsigned integer on 32 bits in big endian [0..+4294967295].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (value > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (value < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (value < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (value > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><pc_pulse1>...<pc_pulseN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><pc_pulse1>...<pc_pulseN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“8200009C40”: the frame indicates one Pulse measurement of 40 000 pulses.<br />
“8302001e8480002dc6c0”: the frame indicates two pulse measurements of 2.10^6 pulses and 3.10^6 pulses.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/FD74VIAwIY209Ubm|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-PC_Pulse_Sensor&diff=283NIS-PC Pulse Sensor2018-04-03T15:16:52Z<p>Lcs: </p>
<hr />
<div><!-- [[Category:Sensors]] --><br />
<br />
[[File:Exp PE pulse sensor.png|thumb|400px|Load Cell Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= Pulse sensor properties =<br />
<br />
* Handles open collector and dry contact inputs<br />
<br />
* Max 50k pulses per second<br />
<br />
* broken cable detection<br />
<br />
<br />
= Wiring =<br />
<br />
[[File:Full config ids.png|picture of sensor pcb and box]]<br />
<br />
{| class="wikitable"<br />
|+Probe settings<br />
|-<br />
|Input mode<br />
|jumpers configuration<br />
|Probe connection<br />
|-<br />
|rowspan="8"|open collector<br />
|rowspan="8"|JP1 on 1-2 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|-<br />
|rowspan="8"|dry contact<br />
|rowspan="8"|JP1 on 2-3 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|}<br />
<br />
If you want to use the Alert signal, connect it to GND on the sensor side. If the cable breaks, the device detects it.<br />
<br />
<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <pc_pulse> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : is reserved.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<pc_pulse>: 4*<nb_meas> bytes containing the Pulse counter values measure in 1 pulse. Each counter value is an unsigned integer on 32 bits in big endian [0..+4294967295].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (value > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (value < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (value < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (value > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><pc_pulse1>...<pc_pulseN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><pc_pulse1>...<pc_pulseN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“8200009C40”: the frame indicates one Pulse measurement of 40 000 pulses.<br />
“8302001e8480002dc6c0”: the frame indicates two luminosity measurements of 2.10^6 pulses and 3.10^6 pulses.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/FD74VIAwIY209Ubm|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-PC_Pulse_Sensor&diff=282NIS-PC Pulse Sensor2018-04-03T15:13:46Z<p>Lcs: /* Uplink data Frame format */</p>
<hr />
<div><!-- [[Category:Sensors]] --><br />
<br />
[[File:Exp PE pulse sensor.png|thumb|400px|Load Cell Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= Pulse sensor properties =<br />
<br />
* Handles open collector and dry contact inputs<br />
<br />
* Max 50k pulses per second<br />
<br />
* broken cable detection<br />
<br />
<br />
= Wiring =<br />
<br />
[[File:Full config ids.png|picture of sensor pcb and box]]<br />
<br />
{| class="wikitable"<br />
|+Probe settings<br />
|-<br />
|Input mode<br />
|jumpers configuration<br />
|Probe connection<br />
|-<br />
|rowspan="8"|open collector<br />
|rowspan="8"|JP1 on 1-2 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|-<br />
|rowspan="8"|dry contact<br />
|rowspan="8"|JP1 on 2-3 and JP2 : NC<br />
|1 : NC<br />
|-<br />
|2 : NC<br />
|-<br />
|3 : NC<br />
|-<br />
|4 : NC<br />
|-<br />
|5 : NC<br />
|-<br />
|6 : GND<br />
|-<br />
|7 : Alert<br />
|-<br />
|8 : Pulse<br />
|}<br />
<br />
If you want to use the Alert signal, connect it to GND on the sensor side. If the cable breaks, the device detects it.<br />
<br />
<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
Some examples (in hexadecimal):<br />
<br />
“820119”: the frame indicates<br />
<br />
<br />
<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <pc_pulse> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : is reserved.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<pc_pulse>: 4*<nb_meas> bytes containing the Pulse counter values measure in 1 pulse. Each counter value is an unsigned integer on 32 bits in big endian [0..+4294967295].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (value > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (value < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (value < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (value > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><pc_pulse1>...<pc_pulseN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><pc_pulse1>...<pc_pulseN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“8200009C40”: the frame indicates one Pulse measurement of 40 000 pulses.<br />
“8302001e8480002dc6c0”: the frame indicates two luminosity measurements of 2.10^6 pulses and 3.10^6 pulses.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/FD74VIAwIY209Ubm|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-LX_Luminosity_Sensor&diff=281NIS-LX Luminosity Sensor2018-04-03T15:06:08Z<p>Lcs: /* Uplink data Frame format */</p>
<hr />
<div><!-- [[Category:Sensors]] --><br />
<br />
[[File:Exp PE light sensor.png|thumb|400px|Luminosity Sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= Luminosity sensor properties =<br />
* ADC resolution 16 bits<br />
* From 5.7m lux to 10000 lux<br />
* low power <br />
* high sensitivity<br />
* Optional RGB spectral response<br />
* reject IR in light sources<br />
* rejects 50Hz and 60Hz flicker caused by artificial light sources<br />
<br />
= Wiring =<br />
<br />
There is nothing to be wired, because the sensor is integrated. It is mounted on the surface of the housing cover. <br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
The uplink payload contains multiple fields: <mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte.<br />
<br />
bit 0 : indicates the presence of <nb_meas> field.<br />
<br />
bit 1 : indicates the presence of <lx_lux> field.<br />
<br />
bit 2 : indicates the presence of <voltage> field.<br />
<br />
bit 3 : indicates the presence of <internal_temp> field.<br />
<br />
bit 4 : is reserved.<br />
<br />
bit 5 : indicates the presence of <cause> field.<br />
<br />
When bit 0 is not set, it means that other fields are present only once (nb_meas = 1).<br />
<br />
if (mask.bit0 == 1) :<br />
<nb_meas>: 1 byte containing the number of measurements which follows.<br />
<br />
if (mask.bit1 == 1) :<br />
<lx_lux>: 2*<nb_meas> bytes containing the Luminosity values measure in 1 Lx. Each luminosity value is an unsigned integer on 16 bits in big endian [0..+65535].<br />
<br />
if (mask.bit2 == 1) :<br />
<voltage>: 2*<nb_meas> bytes containing the voltage values measured by the sensor in millivolts. Each voltage value is an unsigned integer on 16 bits in big endian.<br />
<br />
if (mask.bit3 == 1)<br />
<internal_temp>: 1*<nb_meas> bytes containing the internal temperature values (using MCU internal sensor). Each temperature value is a signed integer on 8 bits in big endian in °C [-128..+127].<br />
<br />
if (mask.bit5 == 1) :<br />
<cause>: 1 byte containing the cause of the uplink frame. It is a bit field:<br />
Bit 0 indicates a periodic measure<br />
Bit 1 indicates the high threshold exceeding (value > high threshold)<br />
Bit 2 indicates the high hysteresis exceeding (value < high threshold - high hysteresis)<br />
Bit 3 indicates the low threshold exceeding (value < low threshold)<br />
Bit 4 indicates the low hysteresis exceeding (value > low threshold + low hysteresis)<br />
Bit 5 indicates the measure has been forced manually (with magnetic switch)<br />
Usually <cause> field is absent when threshold detections are disabled (periodic measures only)<br />
<br />
Thus the uplink frame format is <mask><nb_meas><lx_lux1>...<lx_luxN><voltage1>...<voltageN><internal_temp1>...<internal_tempN><cause><br />
<br />
Default <mask> value is 0x83 which means that the default frame is <mask><nb_meas><lx_lux1>...<lx_luxN><br />
<br />
Some examples (in hexadecimal):<br />
<br />
“8201F4”: the frame indicates one Luminosity measurement of 500 Lx.<br />
“830201900258”: the frame indicates two luminosity measurements of 400 Lx and 600Lx.<br />
<br />
== Downlink Frame format ==<br />
<br />
The sensor configuration contains the following fields:<br />
<br />
<up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<br />
== Power consumption ==<br />
<br />
<br />
Power consumption calculator based on the number of measurements and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/TLibvECCZnrPduxT|width=100%|height=800}}</div>Lcshttps://wiki.nemeus.fr/index.php?title=Application_Note:_MM002_Hardware_Overview&diff=262Application Note: MM002 Hardware Overview2018-02-22T14:02:17Z<p>Lcs: /* Power supply */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
[[Category:Application Notes]]<br />
<br />
Purpose of this Application Note is to help engineer to integrate MM002 Hardware. This Application Note is valid for all MM002-xx-EU [[:Category:Modules |Modules]].<br />
<br />
<br />
= Pins assignment =<br />
<br />
{| class="wikitable"<br />
!|PAD number<br />
!|Function<br />
!|Comment<br />
|-<br />
|1<br />
|GND<br />
|<br />
|-<br />
|2<br />
|/NRST<br />
|Reset of module. Active at low level<br />
|-<br />
|3<br />
|I2C_SDA / GPIO<br />
|I2C bus<br />
|-<br />
|4<br />
|I2C_SCL / GPIO<br />
|I2C bus<br />
|-<br />
|5<br />
|NC<br />
|<br />
|-<br />
|6<br />
|USART1_RX / GPIO<br />
|USART1<br />
|-<br />
|7<br />
|USART1_TX / GPIO<br />
|USART1<br />
|-<br />
|8<br />
|NJTRST / GPIO<br />
|JTAG Reset<br />
|-<br />
|9<br />
|JTDO / GPIO<br />
|JTAG Data Output<br />
|-<br />
|10<br />
|JTDI / GPIO<br />
|JTAG Data Input<br />
|-<br />
|11<br />
|JTCK-SWCLK / GPIO<br />
|JTAG Clock<br />
|-<br />
|12<br />
|JTMS-SWDAT / GPIO<br />
|JTAG Mode Select<br />
|-<br />
|13<br />
|GPIO<br />
|<br />
|-<br />
|14<br />
|GPIO<br />
|<br />
|-<br />
|15<br />
|GND<br />
|<br />
|-<br />
|16<br />
|GND<br />
|<br />
|-<br />
|17<br />
|ANT<br />
|RF antenna port matched to 50Ω. No DC capacitor required<br />
|-<br />
|18<br />
|GND<br />
|<br />
|-<br />
|19<br />
|SPI_MOSI<br />
|SPI bus<br />
|-<br />
|20<br />
|SPI_SCK<br />
|SPI bus<br />
|-<br />
|21<br />
|SPI_MISO<br />
|SPI bus<br />
|-<br />
|22<br />
|SPI_NSS<br />
|SPI bus<br />
|-<br />
|23<br />
|USART2_RX / ADC / GPIO<br />
|<br />
|-<br />
|24<br />
|USART2_TX / ADC / GPIO<br />
|<br />
|-<br />
|25<br />
|USART2_CTS / WAKEUP1 / ADC / GPIO<br />
|<br />
|-<br />
|26<br />
|USART2_RTS / ADC / GPIO<br />
|<br />
|-<br />
|27<br />
|VCC<br />
|3V supply of the board <br />
|-<br />
|28<br />
|GND<br />
|<br />
|}<br />
<br />
= Application circuit =<br />
<br />
== Using with companion MCU chipset ==<br />
<br />
When the module is planned to be controlled with external microcontroller chipset, then the UART connection will be used.<br />
<br />
The mandatory module pins to connect to external companion MCU are:<br />
*UART_TX : module pin 24<br />
*UART_RX: module pin 23<br />
*Wake up: module pin 25<br />
<br />
Optional pin to connect to companion MCU is RESET (module pin 2). Reset is active at low level.<br />
<br />
The others I/O pins can be left not connected.<br />
<br />
<br />
== Power supply ==<br />
<br />
To supply the module, connect to VCC pin 27.<br />
;Recommended : 3V level with a minimum of 2.7V and maximum of 3.3V. <br />
<br />
Internal decoupling capacitors on power supply line inside the module are already placed with capacitors values of 4.7µF and 100nF. <br />
<br />
No need to add external decoupling capacitor on VCC pin 27. <br />
<br />
We recommend to place a ferrite bead on VCC line: recommended reference is MPZ1608D101B from TDK.<br />
<br />
;Impact of power supply level on TX power<br />
<br />
The TX power is sensitive to external power level on Vcc.<br />
<br />
Measure of TX power level depending of voltage level, and current consumption associated:<br />
<br />
VCC=3.3V: Measure of Tx power on antenna pin=14.2dBm, I=43.5mA<br />
VCC=3V: Measure of Tx power on antenna pin=13.65dBm, I=40.1mA<br />
VCC=2.7V: Measure of Tx power on antenna pin=12.85dBm, I=36.6mA<br />
VCC=2.4V: Measure of Tx power on antenna pin=11.83dBm, I=32.3mA (absolute low voltage level)<br />
VCC=1.8V: Measure of Tx power on antenna pin=7.73dBm, I=24.5mA (not recommended)<br />
<br />
== Antenna connection ==<br />
<br />
On antenna RF pin 17, we recommend to place a pi matching network in order to match the impedance presented by the antenna connected to the board and the impedance presented by module antenna output. <br />
<br />
The module antenna output is already matched to 50ohms in the frequency region band chosen.<br />
<br />
ESD protection can be added to antenna port if the antenna is external to the product case. We recommend to use ESD8472MUT5G from On Semiconductor.<br />
<br />
= Module PCB =<br />
<br />
== MM002 module dimensions ==<br />
[[File:MM002 dimensions.png|600px]]<br />
<br />
== Layout footprint for MM002 module integration ==<br />
[[File:MM002 footprint.png|600px]]<br />
<br />
= Reference schematic =<br />
<br />
== BOM of the reference ==<br />
*TPS78101DDCR from Texas Instrument<br />
*ESD8472MUT5G from On Semiconductors<br />
*ESHF-105-01-L-D-SM from SAMTEC<br />
*UFL connector: U.FL-R-SMT-1(10) from Hirose<br />
*Battery connector: 62000211722 from Wurth Elektronik<br />
<br />
== Schematic ==<br />
<br />
[[File:Module MM002.JPG]]<br />
[[File:Power supply.JPG]]<br />
[[File:Debug connection.JPG]]<br />
<br />
== Layout ==<br />
[[File:Top_view_MM002.JPG]]<br />
<br />
[[File:Bottom_view_MM002.JPG]]</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_Personalization&diff=259MM002-xx-EU Personalization2018-01-30T11:30:23Z<p>Lcs: </p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
<br />
The module MM002 is pesonalized as follows:<br />
<br />
== LoRaWAN&trade; ABP personalization ==<br />
<br />
* Device address can be read with AT+MAC=RDEVADDR can be modified with AT+MAC=SDEVADDR,<devaddr> (new value is persistent, it is saved in file system)<br />
* Network security key can be read with AT+MAC=RNSKEY it is read only<br />
* Application security key can be read with AT+MAC=RAPPSKEY it is read only<br />
<br />
Before reading the ABP security keys you must send AT+MAC=ON,,A,0 to switch the module in ABP mode<br />
<br />
If you modify the device address you must perform MAC OFF and MAC ON to take into account the new device address (you can also reset the module):<br />
<br />
AT+MAC=OFF<br />
<br />
OK<br />
<br />
AT+MAC=ON,,A,0<br />
<br />
OK<br />
<br />
== LoRaWAN&trade; OTAA personalization ==<br />
<br />
* Device EUI can be read with AT+MAC=RDEVUID it is read only<br />
* Application key can be read with AT+MAC=RAPPKEY can be modified with AT+MAC=SAPPKEY,<AppKey><br />
* Application EUI can be read with AT+MAC=RAPPUID can be modified with AT+MAC=SAPPUID,<AppEUI><br />
<br />
If you modify the AppKey and/or the AppEUI you must perform MAC OFF and MAC ON to take into account the new values.<br />
<br />
To trigger the join procedure in OTAA mode, you must send AT+MAC=ON,,A,1<br />
<br />
Then you can send AT+MAC=? to check that MAC is ON<br />
<br />
When the join procedure is finished you will receive the following unsolicited AT response:<br />
<br />
+MAC: RDEVADDR,<devAddr>,<NwkId><br />
<br />
You can also poll the module with AT+MAC=RDEVADDR until the device address is not null.<br />
<br />
<br />
== SigFox&trade; Personalization ==<br />
<br />
<br />
To get SigFox Activation information you can send the following command<br />
<br />
AT+SF= ?<br />
<br />
+SF: OFF,NMS-SFX-LIB-1.2,UDL1-1.6.0,xxxxxxxx,yyyyyyyyyyyyyyyyyyy,1<br />
<br />
The response indicate:<br />
* xxxxxxxx => ID sigfox<br />
* yyyyyyyyyyyyyyyyyyy => PAC ID<br />
<br />
Warning: PAC ID given by the command <span style="color: red;">is only valid for First Activation</span>. If the device has already been activated in the past you should get the new PAC which is available from SigFox Backend linked to the previous activation. <br />
<br />
== SigFox&trade; Activation (Platinium Evaluation Kit) ==<br />
<br />
The activation of Platinium Evaluation Kit (MK002-LS-EU, SIS_LS_EU, ...) can be done directly through SigFox Backend<br />
https://backend.sigfox.com/activate/Nemeus<br />
<br />
<br />
== Get personalization Information ==<br />
<br />
As much as possible identifier should be read from module; Nemeus Product may have also simple and full Qrcode<br />
<br />
Simple Qr code Contains only Nemeus Identification<br />
<br />
[[File:Qr-ls-example-simple.jpg|300px|Simple Qr code]]<br />
<br />
Full Qr code contains information for OTAA activation (defaul APPUID=70B3D53260000100) and Sigfox Activation<br />
<br />
[[File:Qr-ls-example-full.jpg|300px|Full Qr code]]<br />
<br />
Information are decoded like this:<br />
<br />
dev_uid=70B3D53260000000&app_key=0123456789ABCDEF0123456789ABCDEF&sfx_id=000FFFFF&sfx_pac=524579AAAA0B47DA<br />
<br />
<br />
== Personalization Files ==<br />
<br />
Following files could also be requested on volumes (check with your ressellers)<br />
<br />
Nemeus Yaml File<br />
<br />
---<br />
xx752:<br />
:dev_uid: 70B3D532xxxxxxxx<br />
:app_uid: 70B3D532yyyyyyyy<br />
:app_key: 8AEAAAAAAAAAAAAAAAAA9574509FB12A<br />
:dev_addr: 'AAAAAAAA'<br />
:nwk_skey: 6F49D79EAAAAAAAAAAAAAAAA52E59DD5<br />
:app_skey: 611B8E7AAAAAAAAAAAAAAAAA4120E4A1<br />
:sfx_id: 00xxxxxx<br />
:sfx_pac: AAAAAAAAAAAAAAAA<br />
<br />
...<br />
<br />
xx753:<br />
:dev_uid: 70B3D532xxxxxxxx<br />
:app_uid: 70B3D532yyyyyyyy<br />
:app_key: 1C01E9DAAAAAAAAAAAAAAAA55E74CBDD<br />
:dev_addr: 'AAAAAAAA'<br />
:nwk_skey: 156AAAAAAAAAAAAAAAAAC25EE31C8F54<br />
:app_skey: 544AAAAAAAAAAAAAAAA7069E3FB7B708<br />
:sfx_id: 00xxxxxx<br />
:sfx_pac: AAAAAAAAAAAAAAAA<br />
<br />
<br />
<br />
Nemeus CSV file<br />
<br />
id,dev_uid,app_uid,app_key,dev_addr,nwk_skey,app_skey,sfx_id,sfx_pac<br />
xxx752,70B3D5326yyyyyyy,70B3D53260yyyyyyy,8AEAFCE6AAAAAAAAAAAAAAAA56899888,6yyyyyyy,6F49D79AAAAAAAAAAAAAAAAF52E59DD5,611B8AAAAAAAAAAAAAAAA29B4120E4A1,00zzzz92,AAAAAAAAAAAAAAAA<br />
<br />
... <br />
xxx758,70B3D5326yyyyyyy,70B3D53260yyyyyyy,092EB6A4AAAAAAAAAAAAAAAA8292E791,6yyyyyyy,70D5847AAAAAAAAAAAAAAAAA9DF6E55E,BB82A9AAAAAAAAAAAAAAAA488C0E0D71,00zzzz98,AAAAAAAAAAAAAAAA</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_Certification_for_products&diff=233MM002-xx-EU Certification for products2017-12-14T10:51:40Z<p>Lcs: </p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
<br />
<br />
<br />
== Sigfox Pre-certification == <br />
<br />
Stack must be activated via:<br />
<br />
AT+SF=ON<br />
<br />
=== Test mode for qualification ===<br />
<br />
<br />
<br />
==== Uplink test mode ====<br />
<br />
TST modem must have uplink and download test mode activated by the the following commands.<br />
<br />
Cmd : AT$ST=[<count>,<period>,<channel>]<CR> : to activate the test mode :<br />
<br />
Resp: <br />
OK<CR>(<LF: optional>)<br />
*count = 0..32767 or -1 : infinite loop sending user frames (count * burst of 3 frames) : default value : 10<br />
*period = 1..255 seconds for sending test frame every period seconds : default value : 1<br />
*channel = 0..480 or -1 : hopping activ<br />
<br />
<br />
<br />
==== Downlink test mode ====<br />
<br />
<br />
Cmd : AT$SR=<seq_number>,<channel>,<count><CR> : to activate the rx test mode :<br />
<br />
*<seq_number> = seq number to receive permanently<br />
*<count> = number of frame to receive 0 or 1: permanently reception.<br />
*<channel> = 0..480 : channel arround reception center frequency where to receive<br />
<br />
Resp :<br />
<br />
RX=<message1><CR>(<LF: optional>)<br />
RSSI=<rssi_value for message 1><CR>(<LF: optional>)<br />
RX=<message2><CR>(<LF: optional>)<br />
RSSI=<rssi_value for message 2><CR>(<LF: optional>)<br />
….<br />
RX=<message n><CR>(<LF: optional>)<br />
RSSI=<rssi_value for message n><CR>(<LF: optional>)<br />
<br />
==== Continuous wave ====<br />
To run radiated tests for SIGFOX classification, continuous wave is needed (without any modulation).<br />
<br />
Cmd : AT$CW=<frequency>,<mode>,{<optional power>} <CR><br />
<br />
*<frequency> = center frequency for carrier<br />
*<mode>= 0: off 1 : on<br />
*<power>= value in dBm optional . If power is max power = 14dBm (used for SIGFOX tests) : no need to specify it in AT command parameter.<br />
<br />
<br />
Resp :<br />
<br />
OK<CR>(<LF: optional>)<br />
<br />
== LoRa Pre-certification ==<br />
<br />
Stack must be activated via:<br />
<br />
AT+RF=ON<br />
<br />
<br />
<br />
==== Continuous wave ====<br />
<br />
To run radiated tests for LoRa classification, continuous wave is needed (without any modulation).<br />
<br />
Start the continuous Wave<br />
<br />
Cmd : AT+RFTX=ON<br />
<br />
Resp :<br />
<br />
OK<br />
<br />
Stop the continuous Wave<br />
<br />
Cmd : AT+RFTX=OFF<br />
<br />
Resp :<br />
<br />
OK<br />
<br />
<br />
RF settings for continuous wave can be done via [[MM002-xx-EU AT Commands#AT+RFTX=SET,|AT+RFTX set command]]<br />
E.g.<br />
AT+RFTX= SET,FSK,865000000,14 ,0,1200,,,,50000</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_Certification_for_products&diff=232MM002-xx-EU Certification for products2017-12-14T10:24:51Z<p>Lcs: /* CEM Pre-certification */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
<br />
<br />
<br />
== Sigfox Pre-certification == <br />
=== Test mode for qualification ===<br />
<br />
Stack must be activated via:<br />
<br />
AT+SF=ON<br />
<br />
==== Uplink test mode ====<br />
<br />
TST modem must have uplink and download test mode activated by the the following commands.<br />
<br />
Cmd : AT$ST=[<count>,<period>,<channel>]<CR> : to activate the test mode :<br />
<br />
Resp: <br />
OK<CR>(<LF: optional>)<br />
*count = 0..32767 or -1 : infinite loop sending user frames (count * burst of 3 frames) : default value : 10<br />
*period = 1..255 seconds for sending test frame every period seconds : default value : 1<br />
*channel = 0..480 or -1 : hopping activ<br />
<br />
<br />
<br />
==== Downlink test mode ====<br />
<br />
<br />
Cmd : AT$SR=<seq_number>,<channel>,<count><CR> : to activate the rx test mode :<br />
<br />
*<seq_number> = seq number to receive permanently<br />
*<count> = number of frame to receive 0 or 1: permanently reception.<br />
*<channel> = 0..480 : channel arround reception center frequency where to receive<br />
<br />
Resp :<br />
<br />
RX=<message1><CR>(<LF: optional>)<br />
RSSI=<rssi_value for message 1><CR>(<LF: optional>)<br />
RX=<message2><CR>(<LF: optional>)<br />
RSSI=<rssi_value for message 2><CR>(<LF: optional>)<br />
….<br />
RX=<message n><CR>(<LF: optional>)<br />
RSSI=<rssi_value for message n><CR>(<LF: optional>)<br />
<br />
==== Continuous wave ====<br />
To run radiated tests for SIGFOX classification, continuous wave is needed (without any modulation).<br />
<br />
Cmd : AT$CW=<frequency>,<mode>,{<optional power>} <CR><br />
<br />
*<frequency> = center frequency for carrier<br />
*<mode>= 0: off 1 : on<br />
*<power>= value in dBm optional . If power is max power = 14dBm (used for SIGFOX tests) : no need to specify it in AT command parameter.<br />
<br />
Note: This command is mandatory for certification of your device for CE.<br />
<br />
Resp :<br />
<br />
OK<CR>(<LF: optional>)<br />
<br />
== LoRa Pre-certification ==<br />
<br />
<br />
<br />
> - Comment activer et désactiver la réception permanente en<br />
> Sigfox ?<br />
> Lora :<br />
> - Comment activer et désactiver l’émission permanente non<br />
> modulée en Lora ?<br />
><br />
> - Comment activer et désactiver l’émission permanente modulée en<br />
> Lora ?<br />
><br />
> - Comment activer et désactiver l’émission modulée ON/OFF pendant<br />
> 1 seconde en Lora ?<br />
><br />
> - Comment activer et désactiver la réception permanente en Lora ?</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_Certification_for_products&diff=231MM002-xx-EU Certification for products2017-12-14T10:21:11Z<p>Lcs: Created page with "Category:MM002 Category:Modules == Sigfox Pre-certification == === Test mode for qualification === Stack must be activated via: AT+SF=ON ==== Uplink test mode..."</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
<br />
<br />
<br />
== Sigfox Pre-certification == <br />
=== Test mode for qualification ===<br />
<br />
Stack must be activated via:<br />
<br />
AT+SF=ON<br />
<br />
==== Uplink test mode ====<br />
<br />
TST modem must have uplink and download test mode activated by the the following commands.<br />
<br />
Cmd : AT$ST=[<count>,<period>,<channel>]<CR> : to activate the test mode :<br />
<br />
Resp: <br />
OK<CR>(<LF: optional>)<br />
*count = 0..32767 or -1 : infinite loop sending user frames (count * burst of 3 frames) : default value : 10<br />
*period = 1..255 seconds for sending test frame every period seconds : default value : 1<br />
*channel = 0..480 or -1 : hopping activ<br />
<br />
<br />
<br />
==== Downlink test mode ====<br />
<br />
<br />
Cmd : AT$SR=<seq_number>,<channel>,<count><CR> : to activate the rx test mode :<br />
<br />
*<seq_number> = seq number to receive permanently<br />
*<count> = number of frame to receive 0 or 1: permanently reception.<br />
*<channel> = 0..480 : channel arround reception center frequency where to receive<br />
<br />
Resp :<br />
<br />
RX=<message1><CR>(<LF: optional>)<br />
RSSI=<rssi_value for message 1><CR>(<LF: optional>)<br />
RX=<message2><CR>(<LF: optional>)<br />
RSSI=<rssi_value for message 2><CR>(<LF: optional>)<br />
….<br />
RX=<message n><CR>(<LF: optional>)<br />
RSSI=<rssi_value for message n><CR>(<LF: optional>)<br />
<br />
==== Continuous wave ====<br />
To run radiated tests for SIGFOX classification, continuous wave is needed (without any modulation).<br />
<br />
Cmd : AT$CW=<frequency>,<mode>,{<optional power>} <CR><br />
<br />
*<frequency> = center frequency for carrier<br />
*<mode>= 0: off 1 : on<br />
*<power>= value in dBm optional . If power is max power = 14dBm (used for SIGFOX tests) : no need to specify it in AT command parameter.<br />
<br />
Note: This command is mandatory for certification of your device for CE.<br />
<br />
Resp :<br />
<br />
OK<CR>(<LF: optional>)<br />
<br />
== CEM Pre-certification ==</div>Lcshttps://wiki.nemeus.fr/index.php?title=MG003-L-EU_External_Server_connection&diff=230MG003-L-EU External Server connection2017-12-04T09:01:39Z<p>Lcs: </p>
<hr />
<div>[[Category:Gateways]]<br />
<br />
<br />
<br />
== DIY Server ==<br />
<br />
By default the data are sent in UDP soa connection should be open <br />
<br />
Exemple in ruby <br />
<br />
#!/usr/bin/env ruby <br />
require 'socket' # Get sockets from stdlib<br />
<br />
Socket::udp_server_loop("0.0.0.0",2224) do |raw,msgSrc| <br />
$stdout << format("\nReceived %s\n",raw)<br />
$stdout << format("\nReceived %s\n",msgSrc)<br />
...<br />
end<br />
<br />
<br />
<br />
== TheThingsNetwork ==<br />
<br />
=== prerequisite ===<br />
<br />
First you need an account, you can create on [https://www.thethingsnetwork.org/ thethingsnetwork] website<br />
<br />
The gateway need to be in packet fowarder mode. You can set it via the Gateway Configuration tool, by changing the mode to 'PKT_FOWARDER' in the 'radio Folder'.<br />
<br />
Then you need to get the Gateway Unique ID :<br />
* available on GW sticker: get the id and add '0000' at the end (only valid if not modified by user)<br />
* on bottom of 'FWD folder'<br />
<br />
Then update server address:<br />
* change data server address to fit TTN router (e.g. router.eu.thethings.network:1700)<br />
<br />
[[File:MG003-L-EU External Server connection TTN 1.png|MG003-L-EU External Server connection TTN 1 (LoRaWan)]]<br />
<br />
==== Gateway Channel Configuration ====<br />
<br />
Ttn use more channels than the default configuration (see [https://www.thethingsnetwork.org/wiki/LoRaWAN/Frequencies/Frequency-Plans TTN Frequency plan ]), to avoid loss of packet you will need to setup the following channels at SF12<br />
* Mandatory channels: 868100000, 868300000, 868500000<br />
* Additionnal channels : 867100000, 867300000, 867500000, 867700000, 867900000<br />
<br />
=== registering ===<br />
<br />
<br />
You can login to thethingnetworks and register your Gateway.<br />
* Give the '''gateway Unique ID''' (gateway eui) found on Java application or on sticker if not modified by the user (add 0000 at the end).<br />
* Check the box ''''I'm using the legacy packet forwarder''''<br />
* Select '''Europe Frequency plan'''<br />
* Select Gateway location<br />
* Select Antenna Placement<br />
<br />
Click the Button 'Register Gateway' <br />
<br />
<br />
In settings<br />
* Uncheck 'Automatically update gateway'<br />
<br />
<br />
<br />
=== Add an application ===<br />
<br />
Create a New application <br />
<br />
You can use the TTN APP id or get the one from your module/device.</div>Lcshttps://wiki.nemeus.fr/index.php?title=File:MG003-L-EU_External_Server_connection_TTN_1.png&diff=229File:MG003-L-EU External Server connection TTN 1.png2017-12-01T13:59:27Z<p>Lcs: The thing network LoRawan Configuration for Nemeus MG003 Gateway</p>
<hr />
<div>The thing network LoRawan Configuration for Nemeus MG003 Gateway</div>Lcshttps://wiki.nemeus.fr/index.php?title=MG003-L-EU_External_Server_connection&diff=219MG003-L-EU External Server connection2017-11-28T12:53:39Z<p>Lcs: /* TheThingsNetwork */</p>
<hr />
<div>[[Category:Gateways]]<br />
<br />
<br />
<br />
=== DIY Server ===<br />
<br />
By default the data are sent in UDP soa connection should be open <br />
<br />
Exemple in ruby <br />
<br />
#!/usr/bin/env ruby <br />
require 'socket' # Get sockets from stdlib<br />
<br />
Socket::udp_server_loop("0.0.0.0",2224) do |raw,msgSrc| <br />
$stdout << format("\nReceived %s\n",raw)<br />
$stdout << format("\nReceived %s\n",msgSrc)<br />
...<br />
end<br />
<br />
<br />
<br />
=== TheThingsNetwork ===<br />
<br />
==== prerequisite ====<br />
<br />
First you need an account, you can create on [https://www.thethingsnetwork.org/ thethingsnetwork] website<br />
<br />
The gateway need to be in packet fowarder mode. You can set it via the Gateway Configuration tool, by changing the mode to 'PKT_FOWARDER' in the 'radio Folder'.<br />
<br />
Then you need to get the Gateway Unique ID :<br />
* available on GW sticker: get the id and add '0000' at the end (only valid if not modified by user)<br />
* on bottom of 'FWD folder'<br />
<br />
<br />
==== registering ====<br />
<br />
<br />
You can login to thethingnetworks and register your Gateway.<br />
* Give the '''gateway Unique ID''' (gateway eui) found on Java application or on sticker if not modified by the user (add 0000 at the end).<br />
* Check the box ''''I'm using the legacy packet forwarder''''<br />
* Select '''Europe Frequency plan'''<br />
* Select Gateway location<br />
* Select Antenna Placement<br />
<br />
Click the Button 'Register Gateway' <br />
<br />
<br />
In settings<br />
* Uncheck 'Automatically update gateway'<br />
<br />
<br />
On gateway :<br />
* change data server address to fit TTN router (e.g. router.eu.thethings.network:1700)<br />
<br />
<br />
<br />
==== Add an application ====<br />
<br />
Create a New application <br />
<br />
You can use the TTN APP id or get the one from your module/device.<br />
<br />
<br />
==== Configuration ====<br />
<br />
Ttn use more channels than the default configuration (see [https://www.thethingsnetwork.org/wiki/LoRaWAN/Frequencies/Frequency-Plans TTN Frequency plan ]), to avoid loss of packet you will need to setup the following channels at SF12<br />
* Mandatory channels: 868100000, 868300000, 868500000<br />
* Additionnal channels : 867100000, 867300000, 867500000, 867700000, 867900000</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_AT_Commands&diff=212MM002-xx-EU AT Commands2017-11-28T10:54:50Z<p>Lcs: /* AT+MAC=ON, */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
AT commands are used as an interface with Nemeus Communication modules. Modules can be driven at 3 different levels:<br />
<br />
* Radio level: embedded AT server uses RF SX127x driver API (LoRa™and FSK modulations can be used).<br />
* LoRa™WAN level: embedded AT server uses LoRa™WAN library API(available only when the library is present in embedded software).<br />
* SIGFOX™ level: embedded AT server uses SIGFOX™ library API(available only when the library is present in embedded software).<br />
<br />
<u>'''When radio level is used'''</u>, no device personalization is required, it is up to AT client application to implement network layer according to the network the device is attached (the module doesn’t know the network).<br />
<br />
<u>'''When LoRa™WAN level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* Whatever the activation type, a 64 bits device unique identifier.<br />
* When Activation By Personalization (ABP) is used:<br />
** An AES128 network security key for MIC computation and encryptionof MAC control commands on port 0.<br />
** An AES128 application security key for encryption of applicationpayloads (not required when data encryption is disabled on themodule).<br />
* When Over The Air Activation (OTAA) is used:<br />
** A 64 bits application unique identifier.<br />
** An AES128 application Key used to derive the network andapplication security keys.<br />
<br />
In first software versions (before 15W40) the module generates unique identifiers and keys, these default LoRa™WAN personalization parameters are modifiable by AT commands. It allows customers to personalize their devices according to the network operator rules.<br />
<br />
In further software versions, modules are personalized with Nemeus OUI during production phase and they can’t be modified. In this case the device unique identifier is read-only and the AES128 keys are hidden. The application unique identifier is still modifiable by AT command.<br />
<br />
<u>'''When SIGFOX™ level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* The read-only device unique identifier.<br />
* The hidden AES128 security key.<br />
* The initial read-only Portability Access Code (PAC).<br />
<br />
Before driving the module, the AT client application must activate the level it wants to use.<br />
<br />
Only one level can be activated at a time.<br />
<br />
When activating a level, a previously activated level is automatically deactivated.<br />
<br />
<br />
[[File:Mm002_serial_diagram.png|center|500px]]<br />
<br><br><br />
For evaluation/test purpose, Nemeus recommends to use NemeusATK java application to drive the module.<br />
<br><br><br />
{{TOC limit|3}}<br />
<br />
== UART configuration ==<br />
<br />
The UART configuration for Modem connection is as follows:<br />
<br />
* Baud Rate : 38400<br />
* Data : 8 bits<br />
* Parity : None<br />
* Stop : 1 bit<br />
* Flow control : None<br />
* End line character : &lt;LF&gt;<br />
<br />
<br><br />
<br><br />
<br />
E.g. Typical configuration given by ‘stty’ command on linux:<br />
<br />
''speed 38400 baud; rows 0; columns 0; line = 0;''<br />
<br />
''intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 = &lt;undef&gt;;swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;flush = ^O; min = 1; time = 0;''<br />
<br />
''-parenb -parodd cs8 hupcl -cstopb cread clocal –crtsct signbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff –iuclc -ixany -imaxbel -iutf8''<br />
<br />
''-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop –echoprt -echoctl -echoke''<br />
<br />
<br><br />
<br />
== AT commands ==<br />
<br />
---- <br />
At command are split according to communication layers. This is a list of main AT commands for SW given in ‘compatibility’ paragraph. The full list and limitation can be found in SW delivery note.<br />
<br />
Formalism is the following:<br />
<br />
<br> <br />
<br><br />
[[File:AT-command-line.png|center]]<br />
<br><br />
<br><br />
<br />
For each group among RF, RFRX, RFTX, MAC and SFX, the command AT+&lt;group&gt;= HELP describes available sub-commands. Example:<br />
<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SET,SCH,RCH,STI,RTI,SRX,RRX,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br />
When a sub-command has parameter, AT+&lt;group&gt;= &lt;cmd&gt;? Describes the parameter list. Example:<br />
<br />
AT+MAC=SNDTXT?<br />
+MAC: SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
OK<br />
<br />
When command is unknown “command not found (‘try help’)” is returned.<br />
<br />
AT commands are not cancelable, thus AT client application must wait for AT response before sending a new command.<br />
<br />
<br><br />
<br />
== Generic Parameter description ==<br />
<br />
---- <br />
Following table describes mains parameters used with AT commands.<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Type'''<br />
<br />
|-<br />
| <br />
'''&lt;mod&gt;'''<br />
<br />
| <br />
Modulation to be use<br />
<br />
| <br />
LORA/FSK<br />
<br />
|-<br />
| <br />
'''&lt;freq&gt;'''<br />
<br />
| <br />
Carrier frequency<br />
<br />
| <br />
Expressed in Hertz *<br />
<br />
|-<br />
| <br />
'''&lt;pwr&gt;'''<br />
<br />
| <br />
Tx power (range depends on Module definition; e.g. MM001 -1dBm to 14dBm)<br />
<br />
| <br />
In dBm *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;bw&gt;'''<br />
<br />
| <br />
Bandwidth from 125kHz to 500 kHz<br />
<br />
| <br />
In Hertz *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;dr&gt;'''<br />
<br />
| <br />
Spreading Factor in LoRa mode<br />
<br />
Data rate in FSK mode<br />
<br />
| <br />
6/7 to 12 *<br />
<br />
In kb/s<br />
<br />
|-<br />
| <br />
'''&lt;cr&gt;'''<br />
<br />
| <br />
Coding Rate (LoRa mode only)<br />
<br />
| <br />
1 to 4<br />
<br />
|-<br />
| <br />
'''&lt;min/maxdr&gt;'''<br />
<br />
| <br />
Data rate range<br />
<br />
| <br />
SF7BW125 to SF12BW125, SF7BW250 or FSK50KBPS<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxcrcon&gt;'''<br />
<br />
| <br />
Flag for CRC check activation in TX or RX<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;preamble&gt;'''<br />
<br />
| <br />
Length of the preamble<br />
<br />
| <br />
6 to 65535<br />
<br />
|-<br />
| <br />
'''&lt;f_dev&gt;'''<br />
<br />
| <br />
Frequency deviation (FSK mode only)<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;fixed_len&gt;'''<br />
<br />
| <br />
When true, PHY payload is constant (no header)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxiqinv'''<br />
<br />
| <br />
Flag for IQ inversion in TX or RX (LoRa mode only)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;rxw1&gt;'''<br />
<br />
| <br />
Delay before RX windows 1<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;rxw2&gt;'''<br />
<br />
| <br />
Delay before RX windows 2 ; NOTE: rx_w2 must be longer than rx_w1.<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;tstamp&gt;'''<br />
<br />
| <br />
Rx ot Tx timestamp<br />
<br />
| <br />
In ticks<br />
<br />
|-<br />
| <br />
'''&lt;symbtimeout&gt;'''<br />
<br />
| <br />
Number of symbols before RX timeout<br />
<br />
| <br />
5 to 1023<br />
<br />
|-<br />
| <br />
'''&lt;port&gt;'''<br />
<br />
| <br />
MAC port<br />
<br />
| <br />
0 to 10<br />
<br />
|-<br />
| <br />
'''&lt;textpayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in ASCII<br />
<br />
| <br />
ASCII string<br />
<br />
|-<br />
| <br />
'''&lt; binarypayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in hexadecimal coded in ASCII<br />
<br />
| <br />
ASCII string containing 0 to F characters<br />
<br />
|-<br />
| <br />
'''&lt;chan&gt;'''<br />
<br />
| <br />
Identifies one of the 8 MAC channels<br />
<br />
| <br />
0 to 7<br />
<br />
|-<br />
| <br />
'''&lt;enable&gt;'''<br />
| <br />
Indicates the status of a channel<br />
|<br />
True or false<br />
|-<br />
| <br />
'''&lt;nbrepeat&gt;'''<br />
| <br />
Number of repetitions when sending a payload.<br />
<br />
At MAC level this parameter indicates if data confirmed must be used or not (0 means unacked mode&gt;).<br />
<br />
| <br />
0 to N<br />
<br />
|-<br />
| <br />
'''&lt;interval&gt;'''<br />
| <br />
Time interval between repetitions<br />
| <br />
In ms<br />
|-<br />
| <br />
'''&lt;hexaddress&gt;'''<br />
| <br />
Address of a registry in hexadecimal<br />
| <br />
<br><br />
|-<br />
| <br />
'''&lt;nbbytes&gt;'''<br />
| <br />
<br><br />
| <br />
0 to 4<br />
|-<br />
| <br />
'''&lt;byteN&gt;'''<br />
| <br />
Byte to write<br />
| <br />
0x00 to 0xFF<br />
|-<br />
| <br />
'''&lt;margin&gt;'''<br />
| <br />
Link demodulation margin above the demodulation floor computed by the nearest gateway<br />
| <br />
0 to 254 in dB<br />
|-<br />
| <br />
'''&lt;gwcnt&gt;'''<br />
| <br />
Number of gateways which received the MAC message<br />
| <br />
1 to N<br />
|-<br />
| <br />
'''&lt;devuid&gt;'''<br />
| <br />
Device unique identifier<br />
| <br />
8 bytes<br />
|-<br />
| <br />
'''&lt;devaddr&gt;'''<br />
| <br />
Device address (4 LSB of &lt;devuid&gt;)<br />
| <br />
4 bytes<br />
|-<br />
| <br />
'''&lt;more&gt;'''<br />
| <br />
Indicates if more downlink data is pending<br />
| <br />
true or false<br />
|-<br />
| <br />
'''&lt;mode&gt;'''<br />
| <br />
LoRa MAC transmission mode<br />
| <br />
0 for confirmed data<br />
not 0 for unconfirmed data<br />
|-<br />
| <br />
'''&lt;rxw1freq&gt;'''<br />
| <br />
Channel frequency used for Rx window 1<br />
<br />
| <br />
In Hz, 0 means same as Tx frequency<br />
<br />
|-<br />
| <br />
'''&lt;eirp&gt;'''<br />
<br />
| <br />
Effective Isotropic Radiated Power received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
In dBm<br />
<br />
|-<br />
| <br />
'''&lt;updwell&gt;'''<br />
<br />
| <br />
Uplink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;dwdwell&gt;'''<br />
<br />
| <br />
Downlink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;backoff&gt;'''<br />
<br />
| <br />
Ack mode retransmission back-off procedure<br />
<br />
| <br />
false means disabled<br />
<br />
true means enabled<br />
<br />
|} <br />
<br><br />
<br />
* Depends on Module in use<br />
<br />
<br><br />
<br />
== Generic Response description ==<br />
<br />
---- <br />
<br><br />
<br />
Every AT command send a response of one of the following types:<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Visible output'''<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
'''Generic'''<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;OK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
OK response<br />
<br />
<br><br />
<br />
| <br />
OK<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response<br />
<br />
<br><br />
<br />
| <br />
ERROR<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR NOACK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response due to a missing ACK<br />
<br />
| <br />
ERROR_NOACK<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+MAC: '''<br />
<br />
| <br />
Response from MAC layer<br />
<br />
<br><br />
<br />
| <br />
+MAC:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFTX: '''<br />
<br />
| <br />
Response from RF layer (TX)<br />
<br />
<br><br />
<br />
| <br />
+RFTX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFRX: '''<br />
<br />
| <br />
Response from RF layer (RX)<br />
<br />
<br><br />
<br />
| <br />
+RFRX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+DEBUG: '''<br />
<br />
| <br />
Response from debug layer<br />
<br />
| <br />
+DEBUG:<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
|} <br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT Generic commands ==<br />
<br />
---- <br />
Intentionally left blank<br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT RF commands ==<br />
<br />
---- <br />
RF commands are dealing with the RF Layer. This layer should be started before using most of RF commands listed in this section (unless stated otherwise).<br />
<br />
3 groups of commands exist:<br />
<br />
* +RF group: commands common to TX and RX functions.<br />
* +RFTX group: commands dedicated to TX functions.<br />
* +RFRX group: commands dedicated to RX functions.<br />
<br><br />
----<br />
=== AT+RF=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RF=HELP<br />
+RF: &lt;cmd&gt;<br />
+RF: &lt;cmd&gt; are ON,OFF,?,RPER,SPER,RSW,SSW<br />
+RF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RF=ON ===<br />
<br />
This command is used to start RF layer (Radio driver) and is mandatory in order to use most of RF commands listed in this section (unless otherwise stated).<br />
<br />
==== Response ====<br />
<br />
ERROR is returned if either LoRa™WAN stack or SIGFOX™ stack is using the radio (Tx or Rx is ongoing).<br />
<br />
Else OK is returned.<br />
<br />
If LoRa™WAN stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
If SIGFOX™ stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
<br><br />
----<br />
=== AT+RF=OFF ===<br />
<br />
This command is used to stop RF layer (Radio driver). After calling this command, most of RF commands listed in this section will return ERROR (unless stated otherwise).<br />
<br />
RF layer stop (Radio driver).<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+RF=? ===<br />
<br />
This command is used to read the current RF layer state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=?<br />
+RF: OFF<br />
OK<br />
<br><br />
----<br />
=== AT+RF=RPER ===<br />
<br />
This command is used to read the Packet Error Rate state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RPER<br />
+RF: false<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SPER, === <br />
This command is used to set the Packet Error Rate state and the power offset<br />
<br />
The following formalism is used. It can be checked by the AT+RF=SPER?command:<br />
<br />
+RF=SPER,&lt;per_state&gt;,&lt;pwroffset&gt;,&lt;loracsoffset&gt;,&lt;fskcsoffset&gt;<br />
<br />
&lt;per_state&gt; PER state, unchanged when absent.<br />
<br />
&lt;pwroffset&gt; is the Power offset<br />
<br />
&lt;loracoffset&gt; is the Power offset in LoRa<br />
<br />
&lt;fskcoffset&gt; is the Power offset in Fsk<br />
<br />
<br />
When PER state is true, a counter is added at the beginning of Tx frames. This counter is used on Rx side to compute the Packet Error Rate.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;per_state&gt; is “true”, “false” or omitted.<br />
<br />
ERROR if &lt;per_state&gt; is syntactically incorrect.<br />
<br />
==== Example ====<br />
AT+RF=SPER,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RF=RSW ===<br />
<br />
This command is used to read the current LoRa and FSK synchro words. Synchro words are in hexadecimal format (see formalism on SSW command)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RSW<br />
+RF: 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SSW, === <br />
This command is used to set the synchro words.<br />
<br />
AT+RF=SSW,&lt;LoRa_SyncWord&gt;,&lt;Fsk_SyncWord&gt;<br />
<br />
&lt;LoRa_SyncWord&gt; LoRa Synchro Word (one byte)<br />
<br />
&lt;Fsk_SyncWord&gt; FSK Synchro Word (up to six bytes)<br />
<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+RF=SSW, 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFTX=HELP<br />
+RFTX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFTX: &lt;cmd&gt; are ?,SET,SEND,SNDTXT,SNDBIN,START,STOP<br />
+RFTX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=? ===<br />
<br />
Read TX parameters. This command does not need the RF layer to be ON.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFTX: &lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;<br />
<br />
==== Example ====<br />
AT+RFTX=?<br />
+RFTX : LORA,868100000,14,125000,7,1,true,8,0,false,false,0,0,0,5,false,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SET, === <br />
Write Tx parameters. This command does not need the RF layer to be ON. Only modified parameters can be specified.<br />
<br />
The following formalism is used. It can be checked by the '''''AT+RFTX=SET?''''' command:<br />
<br />
+RFTX= SET,&lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;,&lt;rxaftertx&gt;<br />
<br />
The parameters &lt;symbtimeout&gt;, &lt;rxiqinv&gt; and &lt;rxcrcon&gt; are used only when an Rx window is specified.<br />
<br />
&lt;tstamp&gt; is the absolute clock time of the module. If the time is over, the frame is immediately transmitted. Usually this timestamp is a delay added to an Rx timestamp (feature not fully implemented)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To set the &lt;pwr&gt; to 12 and the &lt;txcrcon&gt; to false:<br />
<br />
AT+RFTX=SET,,,12,,,,false<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RFTX=SEND, (for test purpose) === <br />
Transmit &lt;nb_frames&gt; numbered frames every &lt;interval&gt; ms.<br />
<br />
AT+RFTX= SEND,&lt;nb_frames&gt;,&lt;interval&gt;<br />
<br />
Default values : &lt;nb_frames&gt; = 1, &lt;interval&gt; = 500 (ms).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), transmitted frames contain a counter on 4 bytes followed by a 32 bytes fixed pattern.<br />
<br />
This command is used as a generator for Packet Error Rate (PER) computing.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nb_frames&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SEND,3,500<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=START (for test purpose) ===<br />
<br />
FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=START<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=STOP (for test purpose) ===<br />
<br />
Stop FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDTXT, === <br />
Repeat &lt;nbrepeat&gt; text frames every 500 ms.<br />
<br />
AT+RFTX= SNDTXT,&lt;txt&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat&gt; = 1.<br />
<br />
&lt;txt&gt; parameter is transmitted as received on serial link, the module doesn’t manage any character set.<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SNDTXT,HELLO WORLD,3<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDBIN, === <br />
Repeat &lt;nbrepeat&gt; binary frames every 500 ms.<br />
<br />
AT+RFTX= SNDBIN,&lt;bin&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat &gt; = 1<br />
<br />
&lt;bin&gt; parameter is hexadecimal coded in ASCII (2 ASCII characters for 1 binary byte).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
<br />
To send 2 times the 3 bytes 1A 2B 3C:<br />
<br />
AT+RFTX=SNDBIN,1A2B3C,2<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFRX=HELP<br />
+RFRX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFRX: &lt;cmd&gt; are ?,SET,RECV,START,STOP,CONTRX,LVL<br />
+RFRX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=? ===<br />
<br />
Read RX parameters.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFRX: &lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Example ====<br />
AT+RFRX=?<br />
,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=SET, === <br />
Set Rx parameters. Only modified parameter can be specified.<br />
<br />
The following formalism is used. It can be check by the '''''AT+RFRX=SET?'''''command:&lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
==== Example ====<br />
<br />
To set &lt;dr&gt; parameter to 7:<br />
<br />
AT+RFRX=SET,,,,7<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=RECV (for test purpose) ===<br />
<br />
Single frame reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer comes back to IDLE state after reception or after AT+RFRX=STOP command.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
+RFRX: &lt;per&gt;,&lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
Then, when a frame is received the unsolicited response below is sent:<br />
<br />
If &lt;per_state&gt; is true (see +RF=SPER command):<br />
<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA…<br />
<br />
Where 100% is the PER, -35.00 is the RSSI level, 7.00 is the SNR, 0 is “no CRC error”, 1521551302 is the Rx clock time in ms and 12000000CAFEDECA is the received payload, starting with the 4 bytes counter.<br />
<br />
If &lt;per_state&gt; is false:<br />
<br />
+RFRX: ,-35.00,7.00,0,1521551302,CAFEDECA…<br />
<br />
PER is not displayed and the 4 bytes counter is not present in the payload (it means that Tx device also has &lt;per_state&gt; set to false.<br />
<br />
After frame reception the Rx is automatically stopped.<br />
<br />
==== Example ====<br />
AT+RFRX=RECV<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
<br><br />
----<br />
=== AT+RFRX=START (for test purpose) ===<br />
<br />
Continuous reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer stays in RX until Rx stop command is sent (see AT+RFRX=STOP)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
When a TX has been performed during Reception, An AT+RFRX=STOP command may be needed to avoid ERROR from this command<br />
<br />
After frame reception RF layer stays in RX (RX stop command must be used to leave RX mode).<br />
<br />
==== Example ====<br />
AT+RFRX=START<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
+RFRX: 100%,-32.00,7.00,0,1521554506,13000000CAFEDECA<br />
…<br />
<br><br />
----<br />
=== AT+RFRX=STOP ===<br />
<br />
Stop single or continuous reception.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is in RX.<br />
<br />
ERROR if RF layer is not in RX.<br />
<br />
==== Example ====<br />
AT+RFRX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=CONTRX ===<br />
<br />
Continuous reception without PER computation.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
Then, for each received frame, the unsolicited response below is sent:<br />
<br />
+RFRX: &lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
<br><br />
----<br />
=== AT+RFRX=LVL (for test purpose) ===<br />
<br />
Last reception parameters read (RSSI, SNR)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
Response information is as below:<br />
<br />
+RFRX: LVL,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+RFRX=LVL<br />
+RFRX: LVL,-77.00,8.00<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
<br />
==== LoRa Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency.<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,LORA,,125000,7 <br />
OK<br />
| <br />
:Set some RX parameters. Let the channel to default frequency<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,LORA,868100000,14,125000,7<br />
OK<br />
| <br />
:set Tx modulation LoRa, freq 868100000, Tx power 14dbm, bandwidth 125KHz, SF7<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
==== FSK Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency. For FSK some rules apply on selected "bandwith/datarate" in RX and "frequency deviation/datarate" in TX. This is described in ([[MM002-xx-EU datasheet#Reference|sx1272 datasheet]])<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,FSK,868100000,125000,1200 <br />
OK<br />
| <br />
:Set some RX parameters.freq 868100000,Bandwith 125 000, Datarate 1200<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,FSK,868100000,14,,1200,,,,50000<br />
OK<br />
| <br />
:set Tx modulation FSK, freq 868100000, Tx power 14dbm, Datarate 1200, Deviation Frequency 50 000<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
== AT LoRa™WAN (MAC) commands ==<br />
<br />
---- <br />
3 types of AT strings are specified:<br />
<br />
* MAC commands: AT+MAC=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* MAC solicited responses: +MAC: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to MAC commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the MAC command and the OK response.<br />
* MAC unsolicited responses: +MAC: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the MAC command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+MAC=? to know the current MAC mode (ABP or OTAA, Class A or C).<br />
* AT+MAC=OFF and AT+MAC=ON,… to change the MAC mode.<br />
* AT+MAC=DEVADRR and unsolicited +MAC: DEVADDR,… to know the current state of an OTAA device.<br />
* AT+MAC=SNDBIN,… to send uplink frame.<br />
* +MAC: RCVBIN,… when receiving downlink frames and to know Rx windows termination.<br />
<br />
All other commands are not really required, they are mainly used by NemeusATK Java application to manage the LoRa™WAN layer (for IOT purpose, device provisioning …).<br />
<br />
<br><br />
----<br />
=== AT+MAC=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SCH,RCH,SDR,RDR,STI,RTI,SRX2,RRX2,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=ON, === <br />
This command is used to start LoRa™WAN layer and is mandatory in order to use most of MAC commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
''AT+MAC=ON,&lt;minor_ver&gt;,&lt;class&gt;,&lt;otaa&gt;''<br />
<br />
*&lt;minor_ver&gt; can be 1 or 3 (default is 3 for LoRa™WAN V1.0). V1 is no more maintained.<br />
*&lt;class&gt; is A or C.<br />
*&lt;otaa&gt; is 0 for ABP and 1 for OTAA.<br />
<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
Start LoRa™WAN layer in class A with OTAA:<br />
<br />
AT+MAC=ON,3,A,1<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC=OFF ===<br />
<br />
Stop LoRa™WAN layer.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+MAC=? ===<br />
<br />
Read current LoRa™WAN layer status.<br />
<br />
To change LoRa™WAN layer status, AT+MAC=OFF and AT+MAC=ON,… must be performed.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;state&gt;,&lt;minor_ver&gt;,&lt;class&gt;,&lt;ch_pages&gt;,&lt;ism_band&gt;,&lt;otaa&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;minor_ver&gt; can be '''V'''1 or '''V'''3 (default is 3 for LoRa™WAN V1.0).<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;page&gt; is the number of pages of 16 channels available at LoRa™WAN layer (in terms of memory space).<br />
<br />
&lt;ism_band&gt; is 4 for EU433MHz, 7 for China779-787MHz, 8 is EU863-870MHz and 9 for US902-928MHz. ISM band can’t be modified dynamically, it is set at compilation time.<br />
<br />
&lt;otaa&gt; is 0 or 2 for ABP and 1 for OTAA (2 means ABP, and OTAA is not supported by the module).<br />
<br />
<br><br />
<br />
==== Example ====<br />
<br />
A class A US902-928MHz device with 80 channels (5*16) which doesn’t support OTAA:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,5,9,2<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+MAC= SNDBIN,&lt;binpyload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application).<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC=SNDBIN,1A2B3C,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVBIN, === <br />
Register for receiving downlink frames on specified port, payload is output as binary hexa string.<br />
<br />
AT+MAC= RCVBIN,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVBIN,&lt;port&gt;,&lt;more&gt;,&lt;binarypayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
The RCVBIN unsolicited response is always sent after a Tx, even if no frame has been received. It indicates the end of Rx windows.<br />
<br />
For a class A device, it is sent when a downlink frame has been received or at the end of the Rx window 2 (if no downlink frame has been received).<br />
<br />
For a class C device, it is sent when a downlink frame has been received or at the end of the Rx window 1 (if no downlink frame has been received).<br />
<br />
If the Tx was in ack mode, the RCVBIN is sent before the OK (or ERROR NOACK) response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
If the Tx was in unack mode, the RCVBIN is sent after the OK response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
==== Example ====<br />
AT+MAC= RCVBIN,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVBIN,2,true,1A2B3C4D,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC=SNDTXT, === <br />
It is the same command as AT+MAC=SNDBIN except that the payload is interpreted as text and is transmitted as received on serial link (no translation from hexa ASCII to hexa binary is performed).<br />
<br />
AT+MAC= SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
Text frame transmission.<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application)<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC= SNDTXT,HELLO WORLD,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVTXT, === <br />
Register for receiving downlink frames on specified port, payload is output as text string (translation to binary hexa string is not performed).<br />
<br />
AT+MAC=RCVTXT,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
'''By default, downlink payload are processed as binary payload, thus if the AT client application needs to receive the payload as text (without any binary hexa string translation), it must uses this command.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVTXT,&lt;port&gt;,&lt;more&gt;,&lt;textpayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
==== Example ====<br />
AT+MAC=RCVTXT,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVTXT,2,true,HELLO WORLD,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC= STOPRCV, === <br />
Unregister for receiving downlink frames on specified port.<br />
<br />
AT+MAC=STOPRCV,&lt;port&gt;<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid.<br />
<br />
ERROR if MAC is OFF or port is invalid.<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+MAC=SNDLCR, === <br />
Send a Link Check Request.<br />
<br />
AT+MAC=SNDLCR,&lt;nbrepeat&gt;<br />
<br />
&lt;nbrepeat&gt; = 0 means the LCR message is sent in unack mode on port 0.<br />
<br />
&lt;nbrepeat&gt; != 0 means the LCR message is sent in ack mode on port 0 with &lt;nbrepeat&gt; transmissions.<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and Link Check Answer has been received.<br />
<br />
ERROR if MAC is OFF or Link Check Answer has not been received and Tx was in unack mode.<br />
<br />
ERROR NOACK if Link Check Answer has not been received and Tx was in ack mode.<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
Received data is sent back as<br />
<br />
+MAC: &lt;margin&gt;,&lt;gwcnt&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+MAC=SNDLCR<br />
+MAC: 20,3,-45.00,8.00<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RCH, === <br />
Read MAC channels command.<br />
<br />
AT+MAC=RCH,&lt;chan&gt;,&lt;page&gt;,&lt;unsol_evt&gt;<br />
<br />
&lt;chan&gt; specifies the channel to read (all channels of the page if omitted or if 16)<br />
<br />
&lt;page&gt; specifies the channel page (all pages if omitted or if number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;unsol_evt&gt; specifies if unsolicited events are required (0 when not required). The unsolicited events inform the AT client application when a MAC parameter has been changed by the LoRa™WAN layer.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
For each channel, the following information is output:<br />
<br />
+MAC: &lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;busytime&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
&lt;chan&gt;: the channel index in the page (0 to 15).<br />
<br />
&lt;frequency&gt;: the frequency in Hz (0 means channel is disabled).<br />
<br />
&lt;mindr&gt;: minimum datarate allowed on the channel.<br />
<br />
&lt;maxdr&gt;: maximum datarate allowed on the channel.<br />
<br />
&lt;dutycycle&gt;: restricted duty cycle assigned to the channel (applies only when more restricted than ISM regulation specification).<br />
<br />
&lt;busytime&gt;: time in ms before the channel can be used again for Tx (due to duty cycle restrictions).<br />
<br />
&lt;page&gt;: channel page (0 to number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;rxw1freq&gt;: frequency used to open Rx window 1. 0 means same frequency as &lt;frequency&gt; parameter (available only from LoRaWAN V1.0.2, if the parameter is absent in the response, it means the firmware version is older).<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when &lt;busytime&gt; changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RCH<br />
+MAC: 0,868100000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 1,868300000,SF12BW125,SF7BW125,100,0,0,869525000<br />
+MAC: 2,868500000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 3,868850000,SF12BW125,SF7BW125,1000,0,0,0<br />
…<br />
+MAC: 15,000000000,SF12BW125,FSK50KBPS,1,0,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SCH, === <br />
Set MAC channel command.<br />
<br />
AT+MAC=SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;min_dr&gt;,&lt;max_dr&gt;,&lt;dutycycle&gt;,&lt;page&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=SCH?'''''Command.<br />
<br />
&lt;dutycycle&gt; is applied only if it is more restricted than the ISM regulation specification. 1 means 100%, 10 means 10%, 100 means 1%, ...<br />
<br />
&lt;rxw1freq&gt; is available only from LoRaWAN V1.0.2<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when LoRa™WAN layer modifies a channel and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
==== Example ====<br />
<br />
To modify channel 0:<br />
<br />
AT+MAC=SCH,0,868100000,SF12BW125,SF7BW125,100,0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC= RDR ===<br />
<br />
Read current MAC datarate command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band firmware<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current datarate changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RDR<br />
+MAC: SF12BW125,11,001F,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDR, === <br />
Set MAC data rate command.<br />
<br />
AT+MAC=SDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
Set the data rate, Tx power and number of repetitions for uplink transmission (applied to all channels compatible with the datarate). &lt;nbrep&gt; applies only to unconfirmed transmissions.<br />
<br />
&lt;chanmask&gt; and &lt;chanmaskctrl&gt; specify the channels usable for uplink access.<br />
<br />
The parameter list can be found by '''''AT+MAC=SDR?'''''Command.<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify current datarate:<br />
<br />
AT+MAC=SDR,SF12BW125,10,001F,0,0<br />
<br />
<br><br />
<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RTI ===<br />
<br />
Read MAC Time Information command.<br />
<br />
Read common channel time information.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current time info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RTI,&lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Example ====<br />
AT+MAC= RTI<br />
+MAC: 1000,2000,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC= STI, === <br />
Set MAC time information command.<br />
<br />
AT+MAC=STI,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;symbtimeout&gt;<br />
<br />
Only modified parameter can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=STI?'''''Command.<br />
<br />
The parameters &lt;rxw1&gt; and &lt;symbtimeout&gt; are common to all channels.<br />
<br />
The &lt;''rxw2''&gt; parameter is no more used because &lt;''rxw2''&gt; value is set to &lt;rxw1&gt; value + 1000 ms. It is still present for compatibility with old devices.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To modify time info:<br />
<br />
AT+MAC=STI,1000,,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RRX ===<br />
<br />
Read MAC Rx information command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current Rx info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RRX,&lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RRX<br />
+MAC: 869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SRX, === <br />
Set MAC Rx information command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SRX?'''''Command.<br />
<br />
The parameters are common to all channels.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify Rx parameters:<br />
<br />
AT+MAC=SRX,869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RSW ===<br />
<br />
This command is used to read the current LoRa™ and FSK synchro words used by LoRa™WAN layer. Synchro words are in hexadecimal format.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;LoRa™ sync_word&gt;,&lt;FSK sync_word&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RSW<br />
+MAC: 34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SSW, === <br />
This command is used to set the synchro words used by LoRa™WAN layer.<br />
<br />
AT+MAC=SSW,&lt;LoRaSyncWord&gt;,&lt;FskSyncWord&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
Synchro words are in hexadecimal.<br />
<br />
The parameter list can be found by '''''AT+MAC=SSW?'''''Command.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+MAC=SSW,34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RVAR ===<br />
<br />
This command is used to read the miscellaneous LoRa™WAN variables.<br />
<br />
This variables are Tx/Rx counters, aggregated DC and data encryption.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;txcounter&gt;,&lt;rxcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
&lt;aggregateddc&gt; values: 1 means 100%, 10 means 10%, 100 means 1%, …<br />
<br />
&lt;encryption&gt; values: 0 means no encryption, != 0 means encryption enabled.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent only when current aggregated DC changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RVAR,,,&lt;aggregateddc&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RVAR<br />
+MAC: 0,0,1,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SVAR, === <br />
This command is used to set some LoRa™WAN variables.<br />
<br />
AT+MAC=SVAR,&lt;txcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SVAR?'''''Command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To disable encryption:<br />
<br />
AT+MAC=SVAR,,,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RADR ===<br />
<br />
This command is used to read the current LoRa™WAN ADR, piggyback and back-off states.<br />
<br />
'''The ack mode retransmission back-off procedure was initially linked to ADR bit. When ADR bit was on/off, the back-off procedure was on/off. From now, the back-off procedure is linked to the back-off state, it allows to enable ADR bit without enabling the back-off procedure. If &lt;backoff&gt; parameter is absent in RADR response, it means that back-off procedure is still linked to ADR bit (older firmware version).'''<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
&lt;adr&gt;, &lt;piggyback&gt; and &lt;backoff&gt; values: true or false.<br />
<br />
==== Example ====<br />
AT+MAC=RADR<br />
+MAC: true,false,false<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SADR, === <br />
This command is used to set some LoRa™WAN ADR and piggyback states.<br />
<br />
AT+MAC=SADR,&lt;adr&gt;,&lt;piggyback&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SADR?'''''Command.<br />
<br />
When ADR state value is changed, ADR ack counter is reset.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct.<br />
<br />
==== Example ====<br />
<br />
To enable piggyback:<br />
<br />
AT+MAC=SADR,,true<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVUID ===<br />
<br />
Read device unique identifier.<br />
<br />
Device UID is coded on 8 bytes.<br />
<br />
''This command obsoletes AT+MAC=DEVUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
UID is returned as<br />
<br />
+MAC: &lt;devuid&gt;,&lt;rand_seed&gt;,&lt;read_only&gt;<br />
<br />
When read_only value is 1, it means that the device unique identifier is built from Nemeus 36 bits OUI (70B3D5326xxxxxxx). In this case the device UID can’t be modified and the security keys are not readable.<br />
<br />
==== Example ====<br />
AT+MAC=RDEVUID<br />
0010203,306A0327,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDEVUID, === <br />
This command is used to modify device UID.<br />
<br />
AT+MAC=SDEVUID,&lt;devuid&gt;<br />
<br />
Device UID must be writable.<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devuid&gt; length is 16 characters and device UID is writable.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVADDR ===<br />
<br />
Read device address.<br />
<br />
''This command obsoletes AT+MAC=DEVADDR command.''<br />
<br />
''Old command still works and returns the same solicited response.''<br />
<br />
''Warning: unsolicited response changed, old one is no more sent!!!''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Address is returned as<br />
<br />
+MAC: &lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
In ABP mode, the device address is the 4 LSB of the device unique identifier.<br />
<br />
In OTAA mode, the device address is assigned by the network.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when device is in OTAA mode and at least one AT+MAC=? command has been sent.<br />
<br />
+MAC: RDEVADDR,&lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
==== Example ====<br />
<br />
Read device address of an OTAA device when not yet joint to network:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
<br />
After receipt of valid join accept, unsolicited response is sent:<br />
<br />
DEVADDR,0870C367,010203 <br />
<br><br />
----<br />
=== AT+MAC=SDEVADDR, === <br />
This command is used to modify device address when ABP mode is used.<br />
<br />
AT+MAC=SDEVADDR,&lt;devaddr&gt;<br />
<br />
If MAC layer is on in ABP mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devaddr&gt; length is 8 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVADDR,01020304<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPUID ===<br />
<br />
Read application Unique ID.<br />
<br />
Application UID is coded on 8 bytes.<br />
<br />
By default it is set to 0000000000000000.<br />
<br />
It can be modified by sending the following AT command:<br />
<br />
AT+GA=DIND,1,8301000008xxxxxxxxxxxxxxxx0000<br />
<br />
Where xxxxxxxxxxxxxxxx is the new application UID LSB first.<br />
<br />
MAC layer must be restarted to take into account new application UID (AT+MAC=OFF and AT+MAC=ON).<br />
<br />
Application UID can also be modified using AT+MAC=SAPPUID,&lt;app_uid&gt;.<br />
<br />
''This command obsoletes AT+MAC=APPUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Application UID is returned as<br />
<br />
+MAC: &lt;appuid&gt;<br />
<br />
==== Example ====<br />
<br />
Read default application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: 0000000000000000<br />
OK<br />
<br />
Set application UID to FEDCBA9876543210:<br />
<br />
0000<br />
OK<br />
<br />
Restart MAC layer:<br />
<br />
AT+MAC=OFF<br />
OK<br />
AT+MAC=ON<br />
OK<br />
<br />
Read new application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: FEDCBA9876543210<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SAPPUID, === <br />
This command is used to modify application UID.<br />
<br />
AT+MAC=SAPPUID,&lt;appuid&gt;<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;appuid&gt; length is 16 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SAPPUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPKEY ===<br />
<br />
Read application key.<br />
<br />
Application Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPKEY command.''<br />
<br />
''Old command still works and returns the &lt;appkey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application key is returned as<br />
<br />
+MAC: &lt;appkey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPKEY<br />
+MAC: A8FA642E2E3245BB9B8CAC7E2456EF3C<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPKEY<br />
+MAC: 3CEF56247EAC8C9BBB45322E2E64FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RNSKEY ===<br />
<br />
Read Network Session Key.<br />
<br />
Network Session Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=NSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=NSKEY command.''<br />
<br />
''Old command still works and returns the &lt;nskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Network session key is returned as<br />
<br />
+MAC: &lt;nskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RNSKEY<br />
+MAC: A8F1642E2E32453B9B8CAC7C2456EF72<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=NSKEY<br />
+MAC: 72EF56247CAC8C9B3B45322E2E64F1A8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPSKEY ===<br />
<br />
Read application session key.<br />
<br />
Application session key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPSKEY command.''<br />
<br />
''Old command still works and returns the &lt;appskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application session key is returned as<br />
<br />
+MAC: &lt;appskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPSKEY<br />
+MAC: A8FA672E2E4245BB9ECCCA7E64F54C38<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPSKEY<br />
+MAC: 384CF5647ECACC9EBB45422E2E67FAA8<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
==== Device start ====<br />
<br />
AT client application can detect a device start or restart when the unsolicited response +DEBUG: START,&lt;version&gt; is received. Depending on initialization timing, AT client application is not sure to receive this unsolicited response, that’s the reason why it is recommended that AT client application use AT+MAC=? command to synchronize with the device.<br />
<br />
<br><br />
<br />
<u>'''OTAA case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
+MAC: RDEVADDR,0870C367,010203 <br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<u>'''ABP case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,0 <br />
OK<br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<br><br />
<br />
==== Send unconfirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''No downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
AT+MAC=SNDBIN,,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
==== Send confirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''Ack received, no downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,0,false,,-60.00,7.00 <br />
OK <br />
<br />
<u>'''Ack not received:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
ERROR NOACK <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
OK <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
AT+MAC=SNDBIN,,0,2,1 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
OK <br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT SIGFOX™ commands ==<br />
<br />
---- <br />
These commands are available only on Nemeus modules embedding SIGFOX™ library. If the library is not embedded then ERROR is returned.<br />
<br />
3 type of AT strings are specified:<br />
<br />
* SF commands: AT+SF=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* SF solicited responses: +SF: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to SF commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the SF command and the OK response.<br />
* SF unsolicited responses: +SF: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the SF command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+SF=? to know the current SIGFOX™ layer state.<br />
* AT+SF=OFF and AT+SF=ON to stop and start SIGFOX™ layer.<br />
* AT+SF=SNDBIN,… to send uplink frame.<br />
* AT+SF=SNDBIT,… to send uplink bit.<br />
* AT+SF=SNDOOB to send uplink out of band message (keep alive messages).<br />
* +SF: RCVBIN,… when receiving downlink frames.<br />
<br />
All other commands are not really required, they are mainly used to configure SIGFOX™ layer and to perform SIGFOX™ qualification tests.<br />
<br />
SIGFOX™ proprietary AT command set is also supported but not described in this document.<br />
<br />
<br><br />
----<br />
=== AT+SF=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+SF=HELP<br />
+SF: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+SF: &lt;cmd&gt; are ON,OFF,?,SNDBIN,SNDBIT,SNDOOB,SREP,RREP,STXF,RTXF,SRXF,RRXF,STXP,RTXP<br />
+SF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+SF=ON ===<br />
<br />
This command is used to start SIGFOX™ layer and is mandatory in order to use most of SF commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
==== Response ====<br />
<br />
If LoRa™WAN stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=ON<br />
OK<br />
<br><br />
----<br />
=== AT+SF=OFF ===<br />
<br />
Stop SIGFOX™ layer.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=OFF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=? ===<br />
<br />
Read current SIGFOX™ layer status.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ library is embedded OK is returned.<br />
<br />
Else ERROR is returned.<br />
<br />
+SF: &lt;state&gt;,&lt;NMS_lib_ver&gt;,&lt;SFX_lib_ver&gt;,&lt;dev_id&gt;,&lt;initial_pac&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;NMS_lib_ver&gt; is the version of Nemeus library used to communicate with SIGFOX™ network.<br />
<br />
&lt;SFX_lib_ver&gt; is the version of SIGFOX™ library.<br />
<br />
&lt;dev_id&gt; is the device unique identifier on SIGFOX™ network.<br />
<br />
&lt;initial_pac&gt; is the first Portability Access Code used to register the device on SIGFOX™ network. It is used one time for first registration.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=?<br />
+SF: ON,NMS-SFX-LIB-1.2,UDL1-1.6.0,000ABCDE,0123456789ABCDEF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+SF=SNDBIN,&lt;binpayload&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the frame is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the frame is sent in acknowledged mode.<br />
<br />
The frame is sent when channel becomes free regarding duty cycle limitations.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIN,CAFE,1<br />
+SF: SND,4576<br />
+SF: SND,0<br />
+SF: 6282<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDBIT, === <br />
Bit transmission.<br />
<br />
AT+SF=SNDBIT,&lt;bitvalue&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the bit is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the bit is sent in acknowledged mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIT,0,1<br />
+SF: SND,6422<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDOOB ===<br />
<br />
Out Of Band message transmission.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it can be used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent.<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent.<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
==== Example ====<br />
AT+SF=SNDOOB<br />
+SF: SND,3987<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
<br><br />
----<br />
=== AT+SF=RREP ===<br />
<br />
Read Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;repeat&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 2 repetitions.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RREP<br />
+SF: 2<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SREP, === <br />
<br />
Set Tx repetitions used in acked mode.<br />
<br />
AT+SF=SREP,&lt;repeatnb&gt;<br />
<br />
==== Response ====<br />
<br />
Default value is 2 repetitions.<br />
<br />
OK if number of repetitions &lt;= 2.<br />
<br />
ERROR if number of repetitions &gt; 2.<br />
<br />
==== Example ====<br />
AT+SF=SREP,1<br />
OK<br />
AT+SF=SREP,3<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXF ===<br />
<br />
Read output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 868130000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXF<br />
+SF: 868130000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXF, === <br />
Set output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= tx_frequency &lt;= 870000000.<br />
<br />
ERROR if tx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=STXF,868200000<br />
OK<br />
AT+SF=STXF,862200000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RRXF ===<br />
<br />
Read reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;rx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 869525000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RRXF<br />
+SF: 869525000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SRXF, === <br />
Set reception carrier macro channel.<br />
<br />
AT+SF=SRXF,&lt;rx_frequency&gt;<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= rx_frequency &lt;= 870000000.<br />
<br />
ERROR if rx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=SRXF,869525000<br />
OK<br />
AT+SF=SRXF,869525000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXP ===<br />
<br />
Read Tx power.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_power&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 14 dBm.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXP<br />
+SF: 14<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXP, === <br />
Set Tx power.<br />
<br />
==== Response ====<br />
<br />
OK if tx_power &lt;= 14 dBm.<br />
<br />
ERROR if tx_power &gt; 14 dBm.<br />
<br />
==== Example ====<br />
AT+SF=STXP,10<br />
OK<br />
AT+SF=STXP,20<br />
ERROR<br />
<br />
<br><br />
<br />
== AT Generic command ==<br />
<br />
---- <br />
AT Generic command can be used to activate/deactivate some generic functionalities.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8801 ===<br />
<br />
This command is use to know the status of PowerSaving.<br />
<br />
==== Response ====<br />
<br />
+GA : DIND,1,0801&lt;pwr_state&gt;<br />
<br />
Always OK.<br />
<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,8801<br />
<br />
+GA : DIND,1,080100<br />
<br />
OK.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8802&lt;pwr_state&gt; ===<br />
<br><br />
'''WARNING: CONNECT CORRECTLY THE WAKEUP PIN BEFORE ACTIVATION OF POWERSAVING'''<br />
<br><br />
This command is use to set the PowerSaving.<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
PowerSaving can be activated once after boot-up, and from this point will go in stop mode as soon as possible and is wake-up by RTC or Wakeup pin.<br />
Please note that once power-saving is activated, user should toggle wake-up pin before sending an AT command.<br />
<br />
If the module is reset, the powersaving is set back to OFF. So User should ensure setting it to ON after any reset<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,880201<br />
<br />
OK<br />
<br />
<br><br />
----<br />
<br />
== AT debug command ==<br />
<br />
---- <br />
AT debug command can be used to activate/deactivate some debug functionalities.<br />
<br />
<br><br />
----<br />
=== AT+DEBUG= HELP ===<br />
<br />
This commandis use to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= HELP<br />
+DEBUG: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+DEBUG: &lt;cmd&gt; are MVER,MVOFF,MVON,MV?,MEOFF,MEON,ME?,MPOFF,MPON,MP?,RREAD,RWRITE<br />
+DEBUG: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG=MVER ===<br />
<br />
Read Mcu software version.<br />
<br />
Furthermore, when the device boots the software version is sent as an unsolicited response:<br />
<br />
+DEBUG: START,&lt;version&gt;<br />
<br />
This unsolicited response can be used to detect a reset of the device.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: MVER,&lt;version&gt;<br />
<br />
==== Example ====<br />
<br />
AT boot:<br />
<br />
+DEBUG: START,Nemeus 1.x<br />
<br />
When requested:<br />
<br />
AT+DEBUG= MVER<br />
+DEBUG: MVER,Nemeus 1.x<br />
OK<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+DEBUG= MVOFF ===<br />
<br />
Disable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MVON ===<br />
<br />
Enable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
OK if software is compiled with debug traces.<br />
<br />
ERROR if software is compiled without debug traces.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MV? ===<br />
<br />
Read current verbose mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;verbose&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MV?<br />
+DEBUG: MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEOFF ===<br />
<br />
Disable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEON ===<br />
<br />
Enable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= ME? ===<br />
<br />
Read current echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;echo&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= ME?<br />
+DEBUG: MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPOFF ===<br />
<br />
Disable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPON ===<br />
<br />
Enable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MP? ===<br />
<br />
Read current prompt mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;prompt&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MP?<br />
+DEBUG: MPON<br />
OK</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_AT_Commands&diff=210MM002-xx-EU AT Commands2017-11-28T10:48:17Z<p>Lcs: /* AT SIGFOX™ commands */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
AT commands are used as an interface with Nemeus Communication modules. Modules can be driven at 3 different levels:<br />
<br />
* Radio level: embedded AT server uses RF SX127x driver API (LoRa™and FSK modulations can be used).<br />
* LoRa™WAN level: embedded AT server uses LoRa™WAN library API(available only when the library is present in embedded software).<br />
* SIGFOX™ level: embedded AT server uses SIGFOX™ library API(available only when the library is present in embedded software).<br />
<br />
<u>'''When radio level is used'''</u>, no device personalization is required, it is up to AT client application to implement network layer according to the network the device is attached (the module doesn’t know the network).<br />
<br />
<u>'''When LoRa™WAN level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* Whatever the activation type, a 64 bits device unique identifier.<br />
* When Activation By Personalization (ABP) is used:<br />
** An AES128 network security key for MIC computation and encryptionof MAC control commands on port 0.<br />
** An AES128 application security key for encryption of applicationpayloads (not required when data encryption is disabled on themodule).<br />
* When Over The Air Activation (OTAA) is used:<br />
** A 64 bits application unique identifier.<br />
** An AES128 application Key used to derive the network andapplication security keys.<br />
<br />
In first software versions (before 15W40) the module generates unique identifiers and keys, these default LoRa™WAN personalization parameters are modifiable by AT commands. It allows customers to personalize their devices according to the network operator rules.<br />
<br />
In further software versions, modules are personalized with Nemeus OUI during production phase and they can’t be modified. In this case the device unique identifier is read-only and the AES128 keys are hidden. The application unique identifier is still modifiable by AT command.<br />
<br />
<u>'''When SIGFOX™ level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* The read-only device unique identifier.<br />
* The hidden AES128 security key.<br />
* The initial read-only Portability Access Code (PAC).<br />
<br />
Before driving the module, the AT client application must activate the level it wants to use.<br />
<br />
Only one level can be activated at a time.<br />
<br />
When activating a level, a previously activated level is automatically deactivated.<br />
<br />
<br />
[[File:Mm002_serial_diagram.png|center|500px]]<br />
<br><br><br />
For evaluation/test purpose, Nemeus recommends to use NemeusATK java application to drive the module.<br />
<br><br><br />
{{TOC limit|3}}<br />
<br />
== UART configuration ==<br />
<br />
The UART configuration for Modem connection is as follows:<br />
<br />
* Baud Rate : 38400<br />
* Data : 8 bits<br />
* Parity : None<br />
* Stop : 1 bit<br />
* Flow control : None<br />
* End line character : &lt;LF&gt;<br />
<br />
<br><br />
<br><br />
<br />
E.g. Typical configuration given by ‘stty’ command on linux:<br />
<br />
''speed 38400 baud; rows 0; columns 0; line = 0;''<br />
<br />
''intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 = &lt;undef&gt;;swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;flush = ^O; min = 1; time = 0;''<br />
<br />
''-parenb -parodd cs8 hupcl -cstopb cread clocal –crtsct signbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff –iuclc -ixany -imaxbel -iutf8''<br />
<br />
''-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop –echoprt -echoctl -echoke''<br />
<br />
<br><br />
<br />
== AT commands ==<br />
<br />
---- <br />
At command are split according to communication layers. This is a list of main AT commands for SW given in ‘compatibility’ paragraph. The full list and limitation can be found in SW delivery note.<br />
<br />
Formalism is the following:<br />
<br />
<br> <br />
<br><br />
[[File:AT-command-line.png|center]]<br />
<br><br />
<br><br />
<br />
For each group among RF, RFRX, RFTX, MAC and SFX, the command AT+&lt;group&gt;= HELP describes available sub-commands. Example:<br />
<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SET,SCH,RCH,STI,RTI,SRX,RRX,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br />
When a sub-command has parameter, AT+&lt;group&gt;= &lt;cmd&gt;? Describes the parameter list. Example:<br />
<br />
AT+MAC=SNDTXT?<br />
+MAC: SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
OK<br />
<br />
When command is unknown “command not found (‘try help’)” is returned.<br />
<br />
AT commands are not cancelable, thus AT client application must wait for AT response before sending a new command.<br />
<br />
<br><br />
<br />
== Generic Parameter description ==<br />
<br />
---- <br />
Following table describes mains parameters used with AT commands.<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Type'''<br />
<br />
|-<br />
| <br />
'''&lt;mod&gt;'''<br />
<br />
| <br />
Modulation to be use<br />
<br />
| <br />
LORA/FSK<br />
<br />
|-<br />
| <br />
'''&lt;freq&gt;'''<br />
<br />
| <br />
Carrier frequency<br />
<br />
| <br />
Expressed in Hertz *<br />
<br />
|-<br />
| <br />
'''&lt;pwr&gt;'''<br />
<br />
| <br />
Tx power (range depends on Module definition; e.g. MM001 -1dBm to 14dBm)<br />
<br />
| <br />
In dBm *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;bw&gt;'''<br />
<br />
| <br />
Bandwidth from 125kHz to 500 kHz<br />
<br />
| <br />
In Hertz *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;dr&gt;'''<br />
<br />
| <br />
Spreading Factor in LoRa mode<br />
<br />
Data rate in FSK mode<br />
<br />
| <br />
6/7 to 12 *<br />
<br />
In kb/s<br />
<br />
|-<br />
| <br />
'''&lt;cr&gt;'''<br />
<br />
| <br />
Coding Rate (LoRa mode only)<br />
<br />
| <br />
1 to 4<br />
<br />
|-<br />
| <br />
'''&lt;min/maxdr&gt;'''<br />
<br />
| <br />
Data rate range<br />
<br />
| <br />
SF7BW125 to SF12BW125, SF7BW250 or FSK50KBPS<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxcrcon&gt;'''<br />
<br />
| <br />
Flag for CRC check activation in TX or RX<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;preamble&gt;'''<br />
<br />
| <br />
Length of the preamble<br />
<br />
| <br />
6 to 65535<br />
<br />
|-<br />
| <br />
'''&lt;f_dev&gt;'''<br />
<br />
| <br />
Frequency deviation (FSK mode only)<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;fixed_len&gt;'''<br />
<br />
| <br />
When true, PHY payload is constant (no header)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxiqinv'''<br />
<br />
| <br />
Flag for IQ inversion in TX or RX (LoRa mode only)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;rxw1&gt;'''<br />
<br />
| <br />
Delay before RX windows 1<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;rxw2&gt;'''<br />
<br />
| <br />
Delay before RX windows 2 ; NOTE: rx_w2 must be longer than rx_w1.<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;tstamp&gt;'''<br />
<br />
| <br />
Rx ot Tx timestamp<br />
<br />
| <br />
In ticks<br />
<br />
|-<br />
| <br />
'''&lt;symbtimeout&gt;'''<br />
<br />
| <br />
Number of symbols before RX timeout<br />
<br />
| <br />
5 to 1023<br />
<br />
|-<br />
| <br />
'''&lt;port&gt;'''<br />
<br />
| <br />
MAC port<br />
<br />
| <br />
0 to 10<br />
<br />
|-<br />
| <br />
'''&lt;textpayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in ASCII<br />
<br />
| <br />
ASCII string<br />
<br />
|-<br />
| <br />
'''&lt; binarypayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in hexadecimal coded in ASCII<br />
<br />
| <br />
ASCII string containing 0 to F characters<br />
<br />
|-<br />
| <br />
'''&lt;chan&gt;'''<br />
<br />
| <br />
Identifies one of the 8 MAC channels<br />
<br />
| <br />
0 to 7<br />
<br />
|-<br />
| <br />
'''&lt;enable&gt;'''<br />
| <br />
Indicates the status of a channel<br />
|<br />
True or false<br />
|-<br />
| <br />
'''&lt;nbrepeat&gt;'''<br />
| <br />
Number of repetitions when sending a payload.<br />
<br />
At MAC level this parameter indicates if data confirmed must be used or not (0 means unacked mode&gt;).<br />
<br />
| <br />
0 to N<br />
<br />
|-<br />
| <br />
'''&lt;interval&gt;'''<br />
| <br />
Time interval between repetitions<br />
| <br />
In ms<br />
|-<br />
| <br />
'''&lt;hexaddress&gt;'''<br />
| <br />
Address of a registry in hexadecimal<br />
| <br />
<br><br />
|-<br />
| <br />
'''&lt;nbbytes&gt;'''<br />
| <br />
<br><br />
| <br />
0 to 4<br />
|-<br />
| <br />
'''&lt;byteN&gt;'''<br />
| <br />
Byte to write<br />
| <br />
0x00 to 0xFF<br />
|-<br />
| <br />
'''&lt;margin&gt;'''<br />
| <br />
Link demodulation margin above the demodulation floor computed by the nearest gateway<br />
| <br />
0 to 254 in dB<br />
|-<br />
| <br />
'''&lt;gwcnt&gt;'''<br />
| <br />
Number of gateways which received the MAC message<br />
| <br />
1 to N<br />
|-<br />
| <br />
'''&lt;devuid&gt;'''<br />
| <br />
Device unique identifier<br />
| <br />
8 bytes<br />
|-<br />
| <br />
'''&lt;devaddr&gt;'''<br />
| <br />
Device address (4 LSB of &lt;devuid&gt;)<br />
| <br />
4 bytes<br />
|-<br />
| <br />
'''&lt;more&gt;'''<br />
| <br />
Indicates if more downlink data is pending<br />
| <br />
true or false<br />
|-<br />
| <br />
'''&lt;mode&gt;'''<br />
| <br />
LoRa MAC transmission mode<br />
| <br />
0 for confirmed data<br />
not 0 for unconfirmed data<br />
|-<br />
| <br />
'''&lt;rxw1freq&gt;'''<br />
| <br />
Channel frequency used for Rx window 1<br />
<br />
| <br />
In Hz, 0 means same as Tx frequency<br />
<br />
|-<br />
| <br />
'''&lt;eirp&gt;'''<br />
<br />
| <br />
Effective Isotropic Radiated Power received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
In dBm<br />
<br />
|-<br />
| <br />
'''&lt;updwell&gt;'''<br />
<br />
| <br />
Uplink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;dwdwell&gt;'''<br />
<br />
| <br />
Downlink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;backoff&gt;'''<br />
<br />
| <br />
Ack mode retransmission back-off procedure<br />
<br />
| <br />
false means disabled<br />
<br />
true means enabled<br />
<br />
|} <br />
<br><br />
<br />
* Depends on Module in use<br />
<br />
<br><br />
<br />
== Generic Response description ==<br />
<br />
---- <br />
<br><br />
<br />
Every AT command send a response of one of the following types:<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Visible output'''<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
'''Generic'''<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;OK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
OK response<br />
<br />
<br><br />
<br />
| <br />
OK<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response<br />
<br />
<br><br />
<br />
| <br />
ERROR<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR NOACK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response due to a missing ACK<br />
<br />
| <br />
ERROR_NOACK<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+MAC: '''<br />
<br />
| <br />
Response from MAC layer<br />
<br />
<br><br />
<br />
| <br />
+MAC:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFTX: '''<br />
<br />
| <br />
Response from RF layer (TX)<br />
<br />
<br><br />
<br />
| <br />
+RFTX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFRX: '''<br />
<br />
| <br />
Response from RF layer (RX)<br />
<br />
<br><br />
<br />
| <br />
+RFRX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+DEBUG: '''<br />
<br />
| <br />
Response from debug layer<br />
<br />
| <br />
+DEBUG:<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
|} <br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT Generic commands ==<br />
<br />
---- <br />
Intentionally left blank<br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT RF commands ==<br />
<br />
---- <br />
RF commands are dealing with the RF Layer. This layer should be started before using most of RF commands listed in this section (unless stated otherwise).<br />
<br />
3 groups of commands exist:<br />
<br />
* +RF group: commands common to TX and RX functions.<br />
* +RFTX group: commands dedicated to TX functions.<br />
* +RFRX group: commands dedicated to RX functions.<br />
<br><br />
----<br />
=== AT+RF=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RF=HELP<br />
+RF: &lt;cmd&gt;<br />
+RF: &lt;cmd&gt; are ON,OFF,?,RPER,SPER,RSW,SSW<br />
+RF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RF=ON ===<br />
<br />
This command is used to start RF layer (Radio driver) and is mandatory in order to use most of RF commands listed in this section (unless otherwise stated).<br />
<br />
==== Response ====<br />
<br />
ERROR is returned if either LoRa™WAN stack or SIGFOX™ stack is using the radio (Tx or Rx is ongoing).<br />
<br />
Else OK is returned.<br />
<br />
If LoRa™WAN stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
If SIGFOX™ stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
<br><br />
----<br />
=== AT+RF=OFF ===<br />
<br />
This command is used to stop RF layer (Radio driver). After calling this command, most of RF commands listed in this section will return ERROR (unless stated otherwise).<br />
<br />
RF layer stop (Radio driver).<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+RF=? ===<br />
<br />
This command is used to read the current RF layer state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=?<br />
+RF: OFF<br />
OK<br />
<br><br />
----<br />
=== AT+RF=RPER ===<br />
<br />
This command is used to read the Packet Error Rate state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RPER<br />
+RF: false<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SPER, === <br />
This command is used to set the Packet Error Rate state and the power offset<br />
<br />
The following formalism is used. It can be checked by the AT+RF=SPER?command:<br />
<br />
+RF=SPER,&lt;per_state&gt;,&lt;pwroffset&gt;,&lt;loracsoffset&gt;,&lt;fskcsoffset&gt;<br />
<br />
&lt;per_state&gt; PER state, unchanged when absent.<br />
<br />
&lt;pwroffset&gt; is the Power offset<br />
<br />
&lt;loracoffset&gt; is the Power offset in LoRa<br />
<br />
&lt;fskcoffset&gt; is the Power offset in Fsk<br />
<br />
<br />
When PER state is true, a counter is added at the beginning of Tx frames. This counter is used on Rx side to compute the Packet Error Rate.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;per_state&gt; is “true”, “false” or omitted.<br />
<br />
ERROR if &lt;per_state&gt; is syntactically incorrect.<br />
<br />
==== Example ====<br />
AT+RF=SPER,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RF=RSW ===<br />
<br />
This command is used to read the current LoRa and FSK synchro words. Synchro words are in hexadecimal format (see formalism on SSW command)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RSW<br />
+RF: 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SSW, === <br />
This command is used to set the synchro words.<br />
<br />
AT+RF=SSW,&lt;LoRa_SyncWord&gt;,&lt;Fsk_SyncWord&gt;<br />
<br />
&lt;LoRa_SyncWord&gt; LoRa Synchro Word (one byte)<br />
<br />
&lt;Fsk_SyncWord&gt; FSK Synchro Word (up to six bytes)<br />
<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+RF=SSW, 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFTX=HELP<br />
+RFTX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFTX: &lt;cmd&gt; are ?,SET,SEND,SNDTXT,SNDBIN,START,STOP<br />
+RFTX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=? ===<br />
<br />
Read TX parameters. This command does not need the RF layer to be ON.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFTX: &lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;<br />
<br />
==== Example ====<br />
AT+RFTX=?<br />
+RFTX : LORA,868100000,14,125000,7,1,true,8,0,false,false,0,0,0,5,false,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SET, === <br />
Write Tx parameters. This command does not need the RF layer to be ON. Only modified parameters can be specified.<br />
<br />
The following formalism is used. It can be checked by the '''''AT+RFTX=SET?''''' command:<br />
<br />
+RFTX= SET,&lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;,&lt;rxaftertx&gt;<br />
<br />
The parameters &lt;symbtimeout&gt;, &lt;rxiqinv&gt; and &lt;rxcrcon&gt; are used only when an Rx window is specified.<br />
<br />
&lt;tstamp&gt; is the absolute clock time of the module. If the time is over, the frame is immediately transmitted. Usually this timestamp is a delay added to an Rx timestamp (feature not fully implemented)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To set the &lt;pwr&gt; to 12 and the &lt;txcrcon&gt; to false:<br />
<br />
AT+RFTX=SET,,,12,,,,false<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RFTX=SEND, (for test purpose) === <br />
Transmit &lt;nb_frames&gt; numbered frames every &lt;interval&gt; ms.<br />
<br />
AT+RFTX= SEND,&lt;nb_frames&gt;,&lt;interval&gt;<br />
<br />
Default values : &lt;nb_frames&gt; = 1, &lt;interval&gt; = 500 (ms).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), transmitted frames contain a counter on 4 bytes followed by a 32 bytes fixed pattern.<br />
<br />
This command is used as a generator for Packet Error Rate (PER) computing.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nb_frames&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SEND,3,500<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=START (for test purpose) ===<br />
<br />
FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=START<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=STOP (for test purpose) ===<br />
<br />
Stop FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDTXT, === <br />
Repeat &lt;nbrepeat&gt; text frames every 500 ms.<br />
<br />
AT+RFTX= SNDTXT,&lt;txt&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat&gt; = 1.<br />
<br />
&lt;txt&gt; parameter is transmitted as received on serial link, the module doesn’t manage any character set.<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SNDTXT,HELLO WORLD,3<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDBIN, === <br />
Repeat &lt;nbrepeat&gt; binary frames every 500 ms.<br />
<br />
AT+RFTX= SNDBIN,&lt;bin&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat &gt; = 1<br />
<br />
&lt;bin&gt; parameter is hexadecimal coded in ASCII (2 ASCII characters for 1 binary byte).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
<br />
To send 2 times the 3 bytes 1A 2B 3C:<br />
<br />
AT+RFTX=SNDBIN,1A2B3C,2<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFRX=HELP<br />
+RFRX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFRX: &lt;cmd&gt; are ?,SET,RECV,START,STOP,CONTRX,LVL<br />
+RFRX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=? ===<br />
<br />
Read RX parameters.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFRX: &lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Example ====<br />
AT+RFRX=?<br />
,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=SET, === <br />
Set Rx parameters. Only modified parameter can be specified.<br />
<br />
The following formalism is used. It can be check by the '''''AT+RFRX=SET?'''''command:&lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
==== Example ====<br />
<br />
To set &lt;dr&gt; parameter to 7:<br />
<br />
AT+RFRX=SET,,,,7<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=RECV (for test purpose) ===<br />
<br />
Single frame reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer comes back to IDLE state after reception or after AT+RFRX=STOP command.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
+RFRX: &lt;per&gt;,&lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
Then, when a frame is received the unsolicited response below is sent:<br />
<br />
If &lt;per_state&gt; is true (see +RF=SPER command):<br />
<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA…<br />
<br />
Where 100% is the PER, -35.00 is the RSSI level, 7.00 is the SNR, 0 is “no CRC error”, 1521551302 is the Rx clock time in ms and 12000000CAFEDECA is the received payload, starting with the 4 bytes counter.<br />
<br />
If &lt;per_state&gt; is false:<br />
<br />
+RFRX: ,-35.00,7.00,0,1521551302,CAFEDECA…<br />
<br />
PER is not displayed and the 4 bytes counter is not present in the payload (it means that Tx device also has &lt;per_state&gt; set to false.<br />
<br />
After frame reception the Rx is automatically stopped.<br />
<br />
==== Example ====<br />
AT+RFRX=RECV<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
<br><br />
----<br />
=== AT+RFRX=START (for test purpose) ===<br />
<br />
Continuous reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer stays in RX until Rx stop command is sent (see AT+RFRX=STOP)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
When a TX has been performed during Reception, An AT+RFRX=STOP command may be needed to avoid ERROR from this command<br />
<br />
After frame reception RF layer stays in RX (RX stop command must be used to leave RX mode).<br />
<br />
==== Example ====<br />
AT+RFRX=START<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
+RFRX: 100%,-32.00,7.00,0,1521554506,13000000CAFEDECA<br />
…<br />
<br><br />
----<br />
=== AT+RFRX=STOP ===<br />
<br />
Stop single or continuous reception.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is in RX.<br />
<br />
ERROR if RF layer is not in RX.<br />
<br />
==== Example ====<br />
AT+RFRX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=CONTRX ===<br />
<br />
Continuous reception without PER computation.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
Then, for each received frame, the unsolicited response below is sent:<br />
<br />
+RFRX: &lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
<br><br />
----<br />
=== AT+RFRX=LVL (for test purpose) ===<br />
<br />
Last reception parameters read (RSSI, SNR)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
Response information is as below:<br />
<br />
+RFRX: LVL,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+RFRX=LVL<br />
+RFRX: LVL,-77.00,8.00<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
<br />
==== LoRa Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency.<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,LORA,,125000,7 <br />
OK<br />
| <br />
:Set some RX parameters. Let the channel to default frequency<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,LORA,868100000,14,125000,7<br />
OK<br />
| <br />
:set Tx modulation LoRa, freq 868100000, Tx power 14dbm, bandwidth 125KHz, SF7<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
==== FSK Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency. For FSK some rules apply on selected "bandwith/datarate" in RX and "frequency deviation/datarate" in TX. This is described in ([[MM002-xx-EU datasheet#Reference|sx1272 datasheet]])<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,FSK,868100000,125000,1200 <br />
OK<br />
| <br />
:Set some RX parameters.freq 868100000,Bandwith 125 000, Datarate 1200<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,FSK,868100000,14,,1200,,,,50000<br />
OK<br />
| <br />
:set Tx modulation FSK, freq 868100000, Tx power 14dbm, Datarate 1200, Deviation Frequency 50 000<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
== AT LoRa™WAN (MAC) commands ==<br />
<br />
---- <br />
3 types of AT strings are specified:<br />
<br />
* MAC commands: AT+MAC=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* MAC solicited responses: +MAC: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to MAC commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the MAC command and the OK response.<br />
* MAC unsolicited responses: +MAC: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the MAC command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+MAC=? to know the current MAC mode (ABP or OTAA, Class A or C).<br />
* AT+MAC=OFF and AT+MAC=ON,… to change the MAC mode.<br />
* AT+MAC=DEVADRR and unsolicited +MAC: DEVADDR,… to know the current state of an OTAA device.<br />
* AT+MAC=SNDBIN,… to send uplink frame.<br />
* +MAC: RCVBIN,… when receiving downlink frames and to know Rx windows termination.<br />
<br />
All other commands are not really required, they are mainly used by NemeusATK Java application to manage the LoRa™WAN layer (for IOT purpose, device provisioning …).<br />
<br />
<br><br />
----<br />
=== AT+MAC=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SCH,RCH,SDR,RDR,STI,RTI,SRX2,RRX2,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=ON, === <br />
This command is used to start LoRa™WAN layer and is mandatory in order to use most of MAC commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
AT+MAC= ON,&lt;minor_ver&gt;,&lt;class&gt;,&lt;otaa&gt;<br />
<br />
&lt;minor_ver&gt; can be 1 or 3 (default is 3 for LoRa™WAN V1.0). V1 is no more maintained.<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;otaa&gt; is 0 for ABP and 1 for OTAA.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
Start LoRa™WAN layer in class A with OTAA:<br />
<br />
AT+MAC=ON,3,A,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=OFF ===<br />
<br />
Stop LoRa™WAN layer.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+MAC=? ===<br />
<br />
Read current LoRa™WAN layer status.<br />
<br />
To change LoRa™WAN layer status, AT+MAC=OFF and AT+MAC=ON,… must be performed.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;state&gt;,&lt;minor_ver&gt;,&lt;class&gt;,&lt;ch_pages&gt;,&lt;ism_band&gt;,&lt;otaa&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;minor_ver&gt; can be '''V'''1 or '''V'''3 (default is 3 for LoRa™WAN V1.0).<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;page&gt; is the number of pages of 16 channels available at LoRa™WAN layer (in terms of memory space).<br />
<br />
&lt;ism_band&gt; is 4 for EU433MHz, 7 for China779-787MHz, 8 is EU863-870MHz and 9 for US902-928MHz. ISM band can’t be modified dynamically, it is set at compilation time.<br />
<br />
&lt;otaa&gt; is 0 or 2 for ABP and 1 for OTAA (2 means ABP, and OTAA is not supported by the module).<br />
<br />
<br><br />
<br />
==== Example ====<br />
<br />
A class A US902-928MHz device with 80 channels (5*16) which doesn’t support OTAA:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,5,9,2<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+MAC= SNDBIN,&lt;binpyload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application).<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC=SNDBIN,1A2B3C,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVBIN, === <br />
Register for receiving downlink frames on specified port, payload is output as binary hexa string.<br />
<br />
AT+MAC= RCVBIN,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVBIN,&lt;port&gt;,&lt;more&gt;,&lt;binarypayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
The RCVBIN unsolicited response is always sent after a Tx, even if no frame has been received. It indicates the end of Rx windows.<br />
<br />
For a class A device, it is sent when a downlink frame has been received or at the end of the Rx window 2 (if no downlink frame has been received).<br />
<br />
For a class C device, it is sent when a downlink frame has been received or at the end of the Rx window 1 (if no downlink frame has been received).<br />
<br />
If the Tx was in ack mode, the RCVBIN is sent before the OK (or ERROR NOACK) response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
If the Tx was in unack mode, the RCVBIN is sent after the OK response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
==== Example ====<br />
AT+MAC= RCVBIN,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVBIN,2,true,1A2B3C4D,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC=SNDTXT, === <br />
It is the same command as AT+MAC=SNDBIN except that the payload is interpreted as text and is transmitted as received on serial link (no translation from hexa ASCII to hexa binary is performed).<br />
<br />
AT+MAC= SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
Text frame transmission.<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application)<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC= SNDTXT,HELLO WORLD,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVTXT, === <br />
Register for receiving downlink frames on specified port, payload is output as text string (translation to binary hexa string is not performed).<br />
<br />
AT+MAC=RCVTXT,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
'''By default, downlink payload are processed as binary payload, thus if the AT client application needs to receive the payload as text (without any binary hexa string translation), it must uses this command.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVTXT,&lt;port&gt;,&lt;more&gt;,&lt;textpayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
==== Example ====<br />
AT+MAC=RCVTXT,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVTXT,2,true,HELLO WORLD,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC= STOPRCV, === <br />
Unregister for receiving downlink frames on specified port.<br />
<br />
AT+MAC=STOPRCV,&lt;port&gt;<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid.<br />
<br />
ERROR if MAC is OFF or port is invalid.<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+MAC=SNDLCR, === <br />
Send a Link Check Request.<br />
<br />
AT+MAC=SNDLCR,&lt;nbrepeat&gt;<br />
<br />
&lt;nbrepeat&gt; = 0 means the LCR message is sent in unack mode on port 0.<br />
<br />
&lt;nbrepeat&gt; != 0 means the LCR message is sent in ack mode on port 0 with &lt;nbrepeat&gt; transmissions.<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and Link Check Answer has been received.<br />
<br />
ERROR if MAC is OFF or Link Check Answer has not been received and Tx was in unack mode.<br />
<br />
ERROR NOACK if Link Check Answer has not been received and Tx was in ack mode.<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
Received data is sent back as<br />
<br />
+MAC: &lt;margin&gt;,&lt;gwcnt&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+MAC=SNDLCR<br />
+MAC: 20,3,-45.00,8.00<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RCH, === <br />
Read MAC channels command.<br />
<br />
AT+MAC=RCH,&lt;chan&gt;,&lt;page&gt;,&lt;unsol_evt&gt;<br />
<br />
&lt;chan&gt; specifies the channel to read (all channels of the page if omitted or if 16)<br />
<br />
&lt;page&gt; specifies the channel page (all pages if omitted or if number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;unsol_evt&gt; specifies if unsolicited events are required (0 when not required). The unsolicited events inform the AT client application when a MAC parameter has been changed by the LoRa™WAN layer.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
For each channel, the following information is output:<br />
<br />
+MAC: &lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;busytime&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
&lt;chan&gt;: the channel index in the page (0 to 15).<br />
<br />
&lt;frequency&gt;: the frequency in Hz (0 means channel is disabled).<br />
<br />
&lt;mindr&gt;: minimum datarate allowed on the channel.<br />
<br />
&lt;maxdr&gt;: maximum datarate allowed on the channel.<br />
<br />
&lt;dutycycle&gt;: restricted duty cycle assigned to the channel (applies only when more restricted than ISM regulation specification).<br />
<br />
&lt;busytime&gt;: time in ms before the channel can be used again for Tx (due to duty cycle restrictions).<br />
<br />
&lt;page&gt;: channel page (0 to number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;rxw1freq&gt;: frequency used to open Rx window 1. 0 means same frequency as &lt;frequency&gt; parameter (available only from LoRaWAN V1.0.2, if the parameter is absent in the response, it means the firmware version is older).<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when &lt;busytime&gt; changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RCH<br />
+MAC: 0,868100000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 1,868300000,SF12BW125,SF7BW125,100,0,0,869525000<br />
+MAC: 2,868500000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 3,868850000,SF12BW125,SF7BW125,1000,0,0,0<br />
…<br />
+MAC: 15,000000000,SF12BW125,FSK50KBPS,1,0,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SCH, === <br />
Set MAC channel command.<br />
<br />
AT+MAC=SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;min_dr&gt;,&lt;max_dr&gt;,&lt;dutycycle&gt;,&lt;page&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=SCH?'''''Command.<br />
<br />
&lt;dutycycle&gt; is applied only if it is more restricted than the ISM regulation specification. 1 means 100%, 10 means 10%, 100 means 1%, ...<br />
<br />
&lt;rxw1freq&gt; is available only from LoRaWAN V1.0.2<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when LoRa™WAN layer modifies a channel and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
==== Example ====<br />
<br />
To modify channel 0:<br />
<br />
AT+MAC=SCH,0,868100000,SF12BW125,SF7BW125,100,0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC= RDR ===<br />
<br />
Read current MAC datarate command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band firmware<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current datarate changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RDR<br />
+MAC: SF12BW125,11,001F,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDR, === <br />
Set MAC data rate command.<br />
<br />
AT+MAC=SDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
Set the data rate, Tx power and number of repetitions for uplink transmission (applied to all channels compatible with the datarate). &lt;nbrep&gt; applies only to unconfirmed transmissions.<br />
<br />
&lt;chanmask&gt; and &lt;chanmaskctrl&gt; specify the channels usable for uplink access.<br />
<br />
The parameter list can be found by '''''AT+MAC=SDR?'''''Command.<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify current datarate:<br />
<br />
AT+MAC=SDR,SF12BW125,10,001F,0,0<br />
<br />
<br><br />
<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RTI ===<br />
<br />
Read MAC Time Information command.<br />
<br />
Read common channel time information.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current time info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RTI,&lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Example ====<br />
AT+MAC= RTI<br />
+MAC: 1000,2000,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC= STI, === <br />
Set MAC time information command.<br />
<br />
AT+MAC=STI,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;symbtimeout&gt;<br />
<br />
Only modified parameter can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=STI?'''''Command.<br />
<br />
The parameters &lt;rxw1&gt; and &lt;symbtimeout&gt; are common to all channels.<br />
<br />
The &lt;''rxw2''&gt; parameter is no more used because &lt;''rxw2''&gt; value is set to &lt;rxw1&gt; value + 1000 ms. It is still present for compatibility with old devices.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To modify time info:<br />
<br />
AT+MAC=STI,1000,,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RRX ===<br />
<br />
Read MAC Rx information command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current Rx info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RRX,&lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RRX<br />
+MAC: 869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SRX, === <br />
Set MAC Rx information command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SRX?'''''Command.<br />
<br />
The parameters are common to all channels.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify Rx parameters:<br />
<br />
AT+MAC=SRX,869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RSW ===<br />
<br />
This command is used to read the current LoRa™ and FSK synchro words used by LoRa™WAN layer. Synchro words are in hexadecimal format.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;LoRa™ sync_word&gt;,&lt;FSK sync_word&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RSW<br />
+MAC: 34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SSW, === <br />
This command is used to set the synchro words used by LoRa™WAN layer.<br />
<br />
AT+MAC=SSW,&lt;LoRaSyncWord&gt;,&lt;FskSyncWord&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
Synchro words are in hexadecimal.<br />
<br />
The parameter list can be found by '''''AT+MAC=SSW?'''''Command.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+MAC=SSW,34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RVAR ===<br />
<br />
This command is used to read the miscellaneous LoRa™WAN variables.<br />
<br />
This variables are Tx/Rx counters, aggregated DC and data encryption.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;txcounter&gt;,&lt;rxcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
&lt;aggregateddc&gt; values: 1 means 100%, 10 means 10%, 100 means 1%, …<br />
<br />
&lt;encryption&gt; values: 0 means no encryption, != 0 means encryption enabled.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent only when current aggregated DC changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RVAR,,,&lt;aggregateddc&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RVAR<br />
+MAC: 0,0,1,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SVAR, === <br />
This command is used to set some LoRa™WAN variables.<br />
<br />
AT+MAC=SVAR,&lt;txcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SVAR?'''''Command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To disable encryption:<br />
<br />
AT+MAC=SVAR,,,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RADR ===<br />
<br />
This command is used to read the current LoRa™WAN ADR, piggyback and back-off states.<br />
<br />
'''The ack mode retransmission back-off procedure was initially linked to ADR bit. When ADR bit was on/off, the back-off procedure was on/off. From now, the back-off procedure is linked to the back-off state, it allows to enable ADR bit without enabling the back-off procedure. If &lt;backoff&gt; parameter is absent in RADR response, it means that back-off procedure is still linked to ADR bit (older firmware version).'''<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
&lt;adr&gt;, &lt;piggyback&gt; and &lt;backoff&gt; values: true or false.<br />
<br />
==== Example ====<br />
AT+MAC=RADR<br />
+MAC: true,false,false<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SADR, === <br />
This command is used to set some LoRa™WAN ADR and piggyback states.<br />
<br />
AT+MAC=SADR,&lt;adr&gt;,&lt;piggyback&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SADR?'''''Command.<br />
<br />
When ADR state value is changed, ADR ack counter is reset.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct.<br />
<br />
==== Example ====<br />
<br />
To enable piggyback:<br />
<br />
AT+MAC=SADR,,true<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVUID ===<br />
<br />
Read device unique identifier.<br />
<br />
Device UID is coded on 8 bytes.<br />
<br />
''This command obsoletes AT+MAC=DEVUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
UID is returned as<br />
<br />
+MAC: &lt;devuid&gt;,&lt;rand_seed&gt;,&lt;read_only&gt;<br />
<br />
When read_only value is 1, it means that the device unique identifier is built from Nemeus 36 bits OUI (70B3D5326xxxxxxx). In this case the device UID can’t be modified and the security keys are not readable.<br />
<br />
==== Example ====<br />
AT+MAC=RDEVUID<br />
0010203,306A0327,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDEVUID, === <br />
This command is used to modify device UID.<br />
<br />
AT+MAC=SDEVUID,&lt;devuid&gt;<br />
<br />
Device UID must be writable.<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devuid&gt; length is 16 characters and device UID is writable.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVADDR ===<br />
<br />
Read device address.<br />
<br />
''This command obsoletes AT+MAC=DEVADDR command.''<br />
<br />
''Old command still works and returns the same solicited response.''<br />
<br />
''Warning: unsolicited response changed, old one is no more sent!!!''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Address is returned as<br />
<br />
+MAC: &lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
In ABP mode, the device address is the 4 LSB of the device unique identifier.<br />
<br />
In OTAA mode, the device address is assigned by the network.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when device is in OTAA mode and at least one AT+MAC=? command has been sent.<br />
<br />
+MAC: RDEVADDR,&lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
==== Example ====<br />
<br />
Read device address of an OTAA device when not yet joint to network:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
<br />
After receipt of valid join accept, unsolicited response is sent:<br />
<br />
DEVADDR,0870C367,010203 <br />
<br><br />
----<br />
=== AT+MAC=SDEVADDR, === <br />
This command is used to modify device address when ABP mode is used.<br />
<br />
AT+MAC=SDEVADDR,&lt;devaddr&gt;<br />
<br />
If MAC layer is on in ABP mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devaddr&gt; length is 8 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVADDR,01020304<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPUID ===<br />
<br />
Read application Unique ID.<br />
<br />
Application UID is coded on 8 bytes.<br />
<br />
By default it is set to 0000000000000000.<br />
<br />
It can be modified by sending the following AT command:<br />
<br />
AT+GA=DIND,1,8301000008xxxxxxxxxxxxxxxx0000<br />
<br />
Where xxxxxxxxxxxxxxxx is the new application UID LSB first.<br />
<br />
MAC layer must be restarted to take into account new application UID (AT+MAC=OFF and AT+MAC=ON).<br />
<br />
Application UID can also be modified using AT+MAC=SAPPUID,&lt;app_uid&gt;.<br />
<br />
''This command obsoletes AT+MAC=APPUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Application UID is returned as<br />
<br />
+MAC: &lt;appuid&gt;<br />
<br />
==== Example ====<br />
<br />
Read default application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: 0000000000000000<br />
OK<br />
<br />
Set application UID to FEDCBA9876543210:<br />
<br />
0000<br />
OK<br />
<br />
Restart MAC layer:<br />
<br />
AT+MAC=OFF<br />
OK<br />
AT+MAC=ON<br />
OK<br />
<br />
Read new application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: FEDCBA9876543210<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SAPPUID, === <br />
This command is used to modify application UID.<br />
<br />
AT+MAC=SAPPUID,&lt;appuid&gt;<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;appuid&gt; length is 16 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SAPPUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPKEY ===<br />
<br />
Read application key.<br />
<br />
Application Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPKEY command.''<br />
<br />
''Old command still works and returns the &lt;appkey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application key is returned as<br />
<br />
+MAC: &lt;appkey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPKEY<br />
+MAC: A8FA642E2E3245BB9B8CAC7E2456EF3C<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPKEY<br />
+MAC: 3CEF56247EAC8C9BBB45322E2E64FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RNSKEY ===<br />
<br />
Read Network Session Key.<br />
<br />
Network Session Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=NSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=NSKEY command.''<br />
<br />
''Old command still works and returns the &lt;nskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Network session key is returned as<br />
<br />
+MAC: &lt;nskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RNSKEY<br />
+MAC: A8F1642E2E32453B9B8CAC7C2456EF72<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=NSKEY<br />
+MAC: 72EF56247CAC8C9B3B45322E2E64F1A8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPSKEY ===<br />
<br />
Read application session key.<br />
<br />
Application session key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPSKEY command.''<br />
<br />
''Old command still works and returns the &lt;appskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application session key is returned as<br />
<br />
+MAC: &lt;appskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPSKEY<br />
+MAC: A8FA672E2E4245BB9ECCCA7E64F54C38<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPSKEY<br />
+MAC: 384CF5647ECACC9EBB45422E2E67FAA8<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
==== Device start ====<br />
<br />
AT client application can detect a device start or restart when the unsolicited response +DEBUG: START,&lt;version&gt; is received. Depending on initialization timing, AT client application is not sure to receive this unsolicited response, that’s the reason why it is recommended that AT client application use AT+MAC=? command to synchronize with the device.<br />
<br />
<br><br />
<br />
<u>'''OTAA case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
+MAC: RDEVADDR,0870C367,010203 <br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<u>'''ABP case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,0 <br />
OK<br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<br><br />
<br />
==== Send unconfirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''No downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
AT+MAC=SNDBIN,,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
==== Send confirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''Ack received, no downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,0,false,,-60.00,7.00 <br />
OK <br />
<br />
<u>'''Ack not received:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
ERROR NOACK <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
OK <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
AT+MAC=SNDBIN,,0,2,1 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
OK <br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT SIGFOX™ commands ==<br />
<br />
---- <br />
These commands are available only on Nemeus modules embedding SIGFOX™ library. If the library is not embedded then ERROR is returned.<br />
<br />
3 type of AT strings are specified:<br />
<br />
* SF commands: AT+SF=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* SF solicited responses: +SF: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to SF commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the SF command and the OK response.<br />
* SF unsolicited responses: +SF: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the SF command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+SF=? to know the current SIGFOX™ layer state.<br />
* AT+SF=OFF and AT+SF=ON to stop and start SIGFOX™ layer.<br />
* AT+SF=SNDBIN,… to send uplink frame.<br />
* AT+SF=SNDBIT,… to send uplink bit.<br />
* AT+SF=SNDOOB to send uplink out of band message (keep alive messages).<br />
* +SF: RCVBIN,… when receiving downlink frames.<br />
<br />
All other commands are not really required, they are mainly used to configure SIGFOX™ layer and to perform SIGFOX™ qualification tests.<br />
<br />
SIGFOX™ proprietary AT command set is also supported but not described in this document.<br />
<br />
<br><br />
----<br />
=== AT+SF=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+SF=HELP<br />
+SF: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+SF: &lt;cmd&gt; are ON,OFF,?,SNDBIN,SNDBIT,SNDOOB,SREP,RREP,STXF,RTXF,SRXF,RRXF,STXP,RTXP<br />
+SF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+SF=ON ===<br />
<br />
This command is used to start SIGFOX™ layer and is mandatory in order to use most of SF commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
==== Response ====<br />
<br />
If LoRa™WAN stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=ON<br />
OK<br />
<br><br />
----<br />
=== AT+SF=OFF ===<br />
<br />
Stop SIGFOX™ layer.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=OFF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=? ===<br />
<br />
Read current SIGFOX™ layer status.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ library is embedded OK is returned.<br />
<br />
Else ERROR is returned.<br />
<br />
+SF: &lt;state&gt;,&lt;NMS_lib_ver&gt;,&lt;SFX_lib_ver&gt;,&lt;dev_id&gt;,&lt;initial_pac&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;NMS_lib_ver&gt; is the version of Nemeus library used to communicate with SIGFOX™ network.<br />
<br />
&lt;SFX_lib_ver&gt; is the version of SIGFOX™ library.<br />
<br />
&lt;dev_id&gt; is the device unique identifier on SIGFOX™ network.<br />
<br />
&lt;initial_pac&gt; is the first Portability Access Code used to register the device on SIGFOX™ network. It is used one time for first registration.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=?<br />
+SF: ON,NMS-SFX-LIB-1.2,UDL1-1.6.0,000ABCDE,0123456789ABCDEF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+SF=SNDBIN,&lt;binpayload&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the frame is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the frame is sent in acknowledged mode.<br />
<br />
The frame is sent when channel becomes free regarding duty cycle limitations.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIN,CAFE,1<br />
+SF: SND,4576<br />
+SF: SND,0<br />
+SF: 6282<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDBIT, === <br />
Bit transmission.<br />
<br />
AT+SF=SNDBIT,&lt;bitvalue&gt;,&lt;ack&gt;<br />
<br />
If &lt;ack&gt; value is 0 then the bit is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the bit is sent in acknowledged mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIT,0,1<br />
+SF: SND,6422<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDOOB ===<br />
<br />
Out Of Band message transmission.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it can be used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent.<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent.<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
==== Example ====<br />
AT+SF=SNDOOB<br />
+SF: SND,3987<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
<br><br />
----<br />
=== AT+SF=RREP ===<br />
<br />
Read Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;repeat&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 2 repetitions.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RREP<br />
+SF: 2<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SREP, === <br />
<br />
Set Tx repetitions used in acked mode.<br />
<br />
AT+SF=SREP,&lt;repeatnb&gt;<br />
<br />
==== Response ====<br />
<br />
Default value is 2 repetitions.<br />
<br />
OK if number of repetitions &lt;= 2.<br />
<br />
ERROR if number of repetitions &gt; 2.<br />
<br />
==== Example ====<br />
AT+SF=SREP,1<br />
OK<br />
AT+SF=SREP,3<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXF ===<br />
<br />
Read output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 868130000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXF<br />
+SF: 868130000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXF, === <br />
Set output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= tx_frequency &lt;= 870000000.<br />
<br />
ERROR if tx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=STXF,868200000<br />
OK<br />
AT+SF=STXF,862200000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RRXF ===<br />
<br />
Read reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;rx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 869525000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RRXF<br />
+SF: 869525000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SRXF, === <br />
Set reception carrier macro channel.<br />
<br />
AT+SF=SRXF,&lt;rx_frequency&gt;<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= rx_frequency &lt;= 870000000.<br />
<br />
ERROR if rx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=SRXF,869525000<br />
OK<br />
AT+SF=SRXF,869525000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXP ===<br />
<br />
Read Tx power.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_power&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 14 dBm.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXP<br />
+SF: 14<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXP, === <br />
Set Tx power.<br />
<br />
==== Response ====<br />
<br />
OK if tx_power &lt;= 14 dBm.<br />
<br />
ERROR if tx_power &gt; 14 dBm.<br />
<br />
==== Example ====<br />
AT+SF=STXP,10<br />
OK<br />
AT+SF=STXP,20<br />
ERROR<br />
<br />
<br><br />
<br />
== AT Generic command ==<br />
<br />
---- <br />
AT Generic command can be used to activate/deactivate some generic functionalities.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8801 ===<br />
<br />
This command is use to know the status of PowerSaving.<br />
<br />
==== Response ====<br />
<br />
+GA : DIND,1,0801&lt;pwr_state&gt;<br />
<br />
Always OK.<br />
<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,8801<br />
<br />
+GA : DIND,1,080100<br />
<br />
OK.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8802&lt;pwr_state&gt; ===<br />
<br><br />
'''WARNING: CONNECT CORRECTLY THE WAKEUP PIN BEFORE ACTIVATION OF POWERSAVING'''<br />
<br><br />
This command is use to set the PowerSaving.<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
PowerSaving can be activated once after boot-up, and from this point will go in stop mode as soon as possible and is wake-up by RTC or Wakeup pin.<br />
Please note that once power-saving is activated, user should toggle wake-up pin before sending an AT command.<br />
<br />
If the module is reset, the powersaving is set back to OFF. So User should ensure setting it to ON after any reset<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,880201<br />
<br />
OK<br />
<br />
<br><br />
----<br />
<br />
== AT debug command ==<br />
<br />
---- <br />
AT debug command can be used to activate/deactivate some debug functionalities.<br />
<br />
<br><br />
----<br />
=== AT+DEBUG= HELP ===<br />
<br />
This commandis use to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= HELP<br />
+DEBUG: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+DEBUG: &lt;cmd&gt; are MVER,MVOFF,MVON,MV?,MEOFF,MEON,ME?,MPOFF,MPON,MP?,RREAD,RWRITE<br />
+DEBUG: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG=MVER ===<br />
<br />
Read Mcu software version.<br />
<br />
Furthermore, when the device boots the software version is sent as an unsolicited response:<br />
<br />
+DEBUG: START,&lt;version&gt;<br />
<br />
This unsolicited response can be used to detect a reset of the device.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: MVER,&lt;version&gt;<br />
<br />
==== Example ====<br />
<br />
AT boot:<br />
<br />
+DEBUG: START,Nemeus 1.x<br />
<br />
When requested:<br />
<br />
AT+DEBUG= MVER<br />
+DEBUG: MVER,Nemeus 1.x<br />
OK<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+DEBUG= MVOFF ===<br />
<br />
Disable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MVON ===<br />
<br />
Enable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
OK if software is compiled with debug traces.<br />
<br />
ERROR if software is compiled without debug traces.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MV? ===<br />
<br />
Read current verbose mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;verbose&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MV?<br />
+DEBUG: MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEOFF ===<br />
<br />
Disable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEON ===<br />
<br />
Enable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= ME? ===<br />
<br />
Read current echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;echo&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= ME?<br />
+DEBUG: MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPOFF ===<br />
<br />
Disable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPON ===<br />
<br />
Enable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MP? ===<br />
<br />
Read current prompt mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;prompt&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MP?<br />
+DEBUG: MPON<br />
OK</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_AT_Commands&diff=209MM002-xx-EU AT Commands2017-11-28T10:44:54Z<p>Lcs: /* AT LoRa™WAN (MAC) commands */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
AT commands are used as an interface with Nemeus Communication modules. Modules can be driven at 3 different levels:<br />
<br />
* Radio level: embedded AT server uses RF SX127x driver API (LoRa™and FSK modulations can be used).<br />
* LoRa™WAN level: embedded AT server uses LoRa™WAN library API(available only when the library is present in embedded software).<br />
* SIGFOX™ level: embedded AT server uses SIGFOX™ library API(available only when the library is present in embedded software).<br />
<br />
<u>'''When radio level is used'''</u>, no device personalization is required, it is up to AT client application to implement network layer according to the network the device is attached (the module doesn’t know the network).<br />
<br />
<u>'''When LoRa™WAN level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* Whatever the activation type, a 64 bits device unique identifier.<br />
* When Activation By Personalization (ABP) is used:<br />
** An AES128 network security key for MIC computation and encryptionof MAC control commands on port 0.<br />
** An AES128 application security key for encryption of applicationpayloads (not required when data encryption is disabled on themodule).<br />
* When Over The Air Activation (OTAA) is used:<br />
** A 64 bits application unique identifier.<br />
** An AES128 application Key used to derive the network andapplication security keys.<br />
<br />
In first software versions (before 15W40) the module generates unique identifiers and keys, these default LoRa™WAN personalization parameters are modifiable by AT commands. It allows customers to personalize their devices according to the network operator rules.<br />
<br />
In further software versions, modules are personalized with Nemeus OUI during production phase and they can’t be modified. In this case the device unique identifier is read-only and the AES128 keys are hidden. The application unique identifier is still modifiable by AT command.<br />
<br />
<u>'''When SIGFOX™ level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* The read-only device unique identifier.<br />
* The hidden AES128 security key.<br />
* The initial read-only Portability Access Code (PAC).<br />
<br />
Before driving the module, the AT client application must activate the level it wants to use.<br />
<br />
Only one level can be activated at a time.<br />
<br />
When activating a level, a previously activated level is automatically deactivated.<br />
<br />
<br />
[[File:Mm002_serial_diagram.png|center|500px]]<br />
<br><br><br />
For evaluation/test purpose, Nemeus recommends to use NemeusATK java application to drive the module.<br />
<br><br><br />
{{TOC limit|3}}<br />
<br />
== UART configuration ==<br />
<br />
The UART configuration for Modem connection is as follows:<br />
<br />
* Baud Rate : 38400<br />
* Data : 8 bits<br />
* Parity : None<br />
* Stop : 1 bit<br />
* Flow control : None<br />
* End line character : &lt;LF&gt;<br />
<br />
<br><br />
<br><br />
<br />
E.g. Typical configuration given by ‘stty’ command on linux:<br />
<br />
''speed 38400 baud; rows 0; columns 0; line = 0;''<br />
<br />
''intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 = &lt;undef&gt;;swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;flush = ^O; min = 1; time = 0;''<br />
<br />
''-parenb -parodd cs8 hupcl -cstopb cread clocal –crtsct signbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff –iuclc -ixany -imaxbel -iutf8''<br />
<br />
''-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop –echoprt -echoctl -echoke''<br />
<br />
<br><br />
<br />
== AT commands ==<br />
<br />
---- <br />
At command are split according to communication layers. This is a list of main AT commands for SW given in ‘compatibility’ paragraph. The full list and limitation can be found in SW delivery note.<br />
<br />
Formalism is the following:<br />
<br />
<br> <br />
<br><br />
[[File:AT-command-line.png|center]]<br />
<br><br />
<br><br />
<br />
For each group among RF, RFRX, RFTX, MAC and SFX, the command AT+&lt;group&gt;= HELP describes available sub-commands. Example:<br />
<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SET,SCH,RCH,STI,RTI,SRX,RRX,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br />
When a sub-command has parameter, AT+&lt;group&gt;= &lt;cmd&gt;? Describes the parameter list. Example:<br />
<br />
AT+MAC=SNDTXT?<br />
+MAC: SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
OK<br />
<br />
When command is unknown “command not found (‘try help’)” is returned.<br />
<br />
AT commands are not cancelable, thus AT client application must wait for AT response before sending a new command.<br />
<br />
<br><br />
<br />
== Generic Parameter description ==<br />
<br />
---- <br />
Following table describes mains parameters used with AT commands.<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Type'''<br />
<br />
|-<br />
| <br />
'''&lt;mod&gt;'''<br />
<br />
| <br />
Modulation to be use<br />
<br />
| <br />
LORA/FSK<br />
<br />
|-<br />
| <br />
'''&lt;freq&gt;'''<br />
<br />
| <br />
Carrier frequency<br />
<br />
| <br />
Expressed in Hertz *<br />
<br />
|-<br />
| <br />
'''&lt;pwr&gt;'''<br />
<br />
| <br />
Tx power (range depends on Module definition; e.g. MM001 -1dBm to 14dBm)<br />
<br />
| <br />
In dBm *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;bw&gt;'''<br />
<br />
| <br />
Bandwidth from 125kHz to 500 kHz<br />
<br />
| <br />
In Hertz *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;dr&gt;'''<br />
<br />
| <br />
Spreading Factor in LoRa mode<br />
<br />
Data rate in FSK mode<br />
<br />
| <br />
6/7 to 12 *<br />
<br />
In kb/s<br />
<br />
|-<br />
| <br />
'''&lt;cr&gt;'''<br />
<br />
| <br />
Coding Rate (LoRa mode only)<br />
<br />
| <br />
1 to 4<br />
<br />
|-<br />
| <br />
'''&lt;min/maxdr&gt;'''<br />
<br />
| <br />
Data rate range<br />
<br />
| <br />
SF7BW125 to SF12BW125, SF7BW250 or FSK50KBPS<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxcrcon&gt;'''<br />
<br />
| <br />
Flag for CRC check activation in TX or RX<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;preamble&gt;'''<br />
<br />
| <br />
Length of the preamble<br />
<br />
| <br />
6 to 65535<br />
<br />
|-<br />
| <br />
'''&lt;f_dev&gt;'''<br />
<br />
| <br />
Frequency deviation (FSK mode only)<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;fixed_len&gt;'''<br />
<br />
| <br />
When true, PHY payload is constant (no header)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxiqinv'''<br />
<br />
| <br />
Flag for IQ inversion in TX or RX (LoRa mode only)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;rxw1&gt;'''<br />
<br />
| <br />
Delay before RX windows 1<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;rxw2&gt;'''<br />
<br />
| <br />
Delay before RX windows 2 ; NOTE: rx_w2 must be longer than rx_w1.<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;tstamp&gt;'''<br />
<br />
| <br />
Rx ot Tx timestamp<br />
<br />
| <br />
In ticks<br />
<br />
|-<br />
| <br />
'''&lt;symbtimeout&gt;'''<br />
<br />
| <br />
Number of symbols before RX timeout<br />
<br />
| <br />
5 to 1023<br />
<br />
|-<br />
| <br />
'''&lt;port&gt;'''<br />
<br />
| <br />
MAC port<br />
<br />
| <br />
0 to 10<br />
<br />
|-<br />
| <br />
'''&lt;textpayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in ASCII<br />
<br />
| <br />
ASCII string<br />
<br />
|-<br />
| <br />
'''&lt; binarypayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in hexadecimal coded in ASCII<br />
<br />
| <br />
ASCII string containing 0 to F characters<br />
<br />
|-<br />
| <br />
'''&lt;chan&gt;'''<br />
<br />
| <br />
Identifies one of the 8 MAC channels<br />
<br />
| <br />
0 to 7<br />
<br />
|-<br />
| <br />
'''&lt;enable&gt;'''<br />
| <br />
Indicates the status of a channel<br />
|<br />
True or false<br />
|-<br />
| <br />
'''&lt;nbrepeat&gt;'''<br />
| <br />
Number of repetitions when sending a payload.<br />
<br />
At MAC level this parameter indicates if data confirmed must be used or not (0 means unacked mode&gt;).<br />
<br />
| <br />
0 to N<br />
<br />
|-<br />
| <br />
'''&lt;interval&gt;'''<br />
| <br />
Time interval between repetitions<br />
| <br />
In ms<br />
|-<br />
| <br />
'''&lt;hexaddress&gt;'''<br />
| <br />
Address of a registry in hexadecimal<br />
| <br />
<br><br />
|-<br />
| <br />
'''&lt;nbbytes&gt;'''<br />
| <br />
<br><br />
| <br />
0 to 4<br />
|-<br />
| <br />
'''&lt;byteN&gt;'''<br />
| <br />
Byte to write<br />
| <br />
0x00 to 0xFF<br />
|-<br />
| <br />
'''&lt;margin&gt;'''<br />
| <br />
Link demodulation margin above the demodulation floor computed by the nearest gateway<br />
| <br />
0 to 254 in dB<br />
|-<br />
| <br />
'''&lt;gwcnt&gt;'''<br />
| <br />
Number of gateways which received the MAC message<br />
| <br />
1 to N<br />
|-<br />
| <br />
'''&lt;devuid&gt;'''<br />
| <br />
Device unique identifier<br />
| <br />
8 bytes<br />
|-<br />
| <br />
'''&lt;devaddr&gt;'''<br />
| <br />
Device address (4 LSB of &lt;devuid&gt;)<br />
| <br />
4 bytes<br />
|-<br />
| <br />
'''&lt;more&gt;'''<br />
| <br />
Indicates if more downlink data is pending<br />
| <br />
true or false<br />
|-<br />
| <br />
'''&lt;mode&gt;'''<br />
| <br />
LoRa MAC transmission mode<br />
| <br />
0 for confirmed data<br />
not 0 for unconfirmed data<br />
|-<br />
| <br />
'''&lt;rxw1freq&gt;'''<br />
| <br />
Channel frequency used for Rx window 1<br />
<br />
| <br />
In Hz, 0 means same as Tx frequency<br />
<br />
|-<br />
| <br />
'''&lt;eirp&gt;'''<br />
<br />
| <br />
Effective Isotropic Radiated Power received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
In dBm<br />
<br />
|-<br />
| <br />
'''&lt;updwell&gt;'''<br />
<br />
| <br />
Uplink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;dwdwell&gt;'''<br />
<br />
| <br />
Downlink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;backoff&gt;'''<br />
<br />
| <br />
Ack mode retransmission back-off procedure<br />
<br />
| <br />
false means disabled<br />
<br />
true means enabled<br />
<br />
|} <br />
<br><br />
<br />
* Depends on Module in use<br />
<br />
<br><br />
<br />
== Generic Response description ==<br />
<br />
---- <br />
<br><br />
<br />
Every AT command send a response of one of the following types:<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Visible output'''<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
'''Generic'''<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;OK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
OK response<br />
<br />
<br><br />
<br />
| <br />
OK<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response<br />
<br />
<br><br />
<br />
| <br />
ERROR<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR NOACK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response due to a missing ACK<br />
<br />
| <br />
ERROR_NOACK<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+MAC: '''<br />
<br />
| <br />
Response from MAC layer<br />
<br />
<br><br />
<br />
| <br />
+MAC:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFTX: '''<br />
<br />
| <br />
Response from RF layer (TX)<br />
<br />
<br><br />
<br />
| <br />
+RFTX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFRX: '''<br />
<br />
| <br />
Response from RF layer (RX)<br />
<br />
<br><br />
<br />
| <br />
+RFRX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+DEBUG: '''<br />
<br />
| <br />
Response from debug layer<br />
<br />
| <br />
+DEBUG:<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
|} <br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT Generic commands ==<br />
<br />
---- <br />
Intentionally left blank<br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT RF commands ==<br />
<br />
---- <br />
RF commands are dealing with the RF Layer. This layer should be started before using most of RF commands listed in this section (unless stated otherwise).<br />
<br />
3 groups of commands exist:<br />
<br />
* +RF group: commands common to TX and RX functions.<br />
* +RFTX group: commands dedicated to TX functions.<br />
* +RFRX group: commands dedicated to RX functions.<br />
<br><br />
----<br />
=== AT+RF=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RF=HELP<br />
+RF: &lt;cmd&gt;<br />
+RF: &lt;cmd&gt; are ON,OFF,?,RPER,SPER,RSW,SSW<br />
+RF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RF=ON ===<br />
<br />
This command is used to start RF layer (Radio driver) and is mandatory in order to use most of RF commands listed in this section (unless otherwise stated).<br />
<br />
==== Response ====<br />
<br />
ERROR is returned if either LoRa™WAN stack or SIGFOX™ stack is using the radio (Tx or Rx is ongoing).<br />
<br />
Else OK is returned.<br />
<br />
If LoRa™WAN stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
If SIGFOX™ stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
<br><br />
----<br />
=== AT+RF=OFF ===<br />
<br />
This command is used to stop RF layer (Radio driver). After calling this command, most of RF commands listed in this section will return ERROR (unless stated otherwise).<br />
<br />
RF layer stop (Radio driver).<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+RF=? ===<br />
<br />
This command is used to read the current RF layer state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=?<br />
+RF: OFF<br />
OK<br />
<br><br />
----<br />
=== AT+RF=RPER ===<br />
<br />
This command is used to read the Packet Error Rate state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RPER<br />
+RF: false<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SPER, === <br />
This command is used to set the Packet Error Rate state and the power offset<br />
<br />
The following formalism is used. It can be checked by the AT+RF=SPER?command:<br />
<br />
+RF=SPER,&lt;per_state&gt;,&lt;pwroffset&gt;,&lt;loracsoffset&gt;,&lt;fskcsoffset&gt;<br />
<br />
&lt;per_state&gt; PER state, unchanged when absent.<br />
<br />
&lt;pwroffset&gt; is the Power offset<br />
<br />
&lt;loracoffset&gt; is the Power offset in LoRa<br />
<br />
&lt;fskcoffset&gt; is the Power offset in Fsk<br />
<br />
<br />
When PER state is true, a counter is added at the beginning of Tx frames. This counter is used on Rx side to compute the Packet Error Rate.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;per_state&gt; is “true”, “false” or omitted.<br />
<br />
ERROR if &lt;per_state&gt; is syntactically incorrect.<br />
<br />
==== Example ====<br />
AT+RF=SPER,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RF=RSW ===<br />
<br />
This command is used to read the current LoRa and FSK synchro words. Synchro words are in hexadecimal format (see formalism on SSW command)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RSW<br />
+RF: 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SSW, === <br />
This command is used to set the synchro words.<br />
<br />
AT+RF=SSW,&lt;LoRa_SyncWord&gt;,&lt;Fsk_SyncWord&gt;<br />
<br />
&lt;LoRa_SyncWord&gt; LoRa Synchro Word (one byte)<br />
<br />
&lt;Fsk_SyncWord&gt; FSK Synchro Word (up to six bytes)<br />
<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+RF=SSW, 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFTX=HELP<br />
+RFTX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFTX: &lt;cmd&gt; are ?,SET,SEND,SNDTXT,SNDBIN,START,STOP<br />
+RFTX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=? ===<br />
<br />
Read TX parameters. This command does not need the RF layer to be ON.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFTX: &lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;<br />
<br />
==== Example ====<br />
AT+RFTX=?<br />
+RFTX : LORA,868100000,14,125000,7,1,true,8,0,false,false,0,0,0,5,false,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SET, === <br />
Write Tx parameters. This command does not need the RF layer to be ON. Only modified parameters can be specified.<br />
<br />
The following formalism is used. It can be checked by the '''''AT+RFTX=SET?''''' command:<br />
<br />
+RFTX= SET,&lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;,&lt;rxaftertx&gt;<br />
<br />
The parameters &lt;symbtimeout&gt;, &lt;rxiqinv&gt; and &lt;rxcrcon&gt; are used only when an Rx window is specified.<br />
<br />
&lt;tstamp&gt; is the absolute clock time of the module. If the time is over, the frame is immediately transmitted. Usually this timestamp is a delay added to an Rx timestamp (feature not fully implemented)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To set the &lt;pwr&gt; to 12 and the &lt;txcrcon&gt; to false:<br />
<br />
AT+RFTX=SET,,,12,,,,false<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RFTX=SEND, (for test purpose) === <br />
Transmit &lt;nb_frames&gt; numbered frames every &lt;interval&gt; ms.<br />
<br />
AT+RFTX= SEND,&lt;nb_frames&gt;,&lt;interval&gt;<br />
<br />
Default values : &lt;nb_frames&gt; = 1, &lt;interval&gt; = 500 (ms).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), transmitted frames contain a counter on 4 bytes followed by a 32 bytes fixed pattern.<br />
<br />
This command is used as a generator for Packet Error Rate (PER) computing.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nb_frames&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SEND,3,500<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=START (for test purpose) ===<br />
<br />
FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=START<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=STOP (for test purpose) ===<br />
<br />
Stop FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDTXT, === <br />
Repeat &lt;nbrepeat&gt; text frames every 500 ms.<br />
<br />
AT+RFTX= SNDTXT,&lt;txt&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat&gt; = 1.<br />
<br />
&lt;txt&gt; parameter is transmitted as received on serial link, the module doesn’t manage any character set.<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SNDTXT,HELLO WORLD,3<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDBIN, === <br />
Repeat &lt;nbrepeat&gt; binary frames every 500 ms.<br />
<br />
AT+RFTX= SNDBIN,&lt;bin&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat &gt; = 1<br />
<br />
&lt;bin&gt; parameter is hexadecimal coded in ASCII (2 ASCII characters for 1 binary byte).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
<br />
To send 2 times the 3 bytes 1A 2B 3C:<br />
<br />
AT+RFTX=SNDBIN,1A2B3C,2<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFRX=HELP<br />
+RFRX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFRX: &lt;cmd&gt; are ?,SET,RECV,START,STOP,CONTRX,LVL<br />
+RFRX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=? ===<br />
<br />
Read RX parameters.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFRX: &lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Example ====<br />
AT+RFRX=?<br />
,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=SET, === <br />
Set Rx parameters. Only modified parameter can be specified.<br />
<br />
The following formalism is used. It can be check by the '''''AT+RFRX=SET?'''''command:&lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
==== Example ====<br />
<br />
To set &lt;dr&gt; parameter to 7:<br />
<br />
AT+RFRX=SET,,,,7<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=RECV (for test purpose) ===<br />
<br />
Single frame reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer comes back to IDLE state after reception or after AT+RFRX=STOP command.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
+RFRX: &lt;per&gt;,&lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
Then, when a frame is received the unsolicited response below is sent:<br />
<br />
If &lt;per_state&gt; is true (see +RF=SPER command):<br />
<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA…<br />
<br />
Where 100% is the PER, -35.00 is the RSSI level, 7.00 is the SNR, 0 is “no CRC error”, 1521551302 is the Rx clock time in ms and 12000000CAFEDECA is the received payload, starting with the 4 bytes counter.<br />
<br />
If &lt;per_state&gt; is false:<br />
<br />
+RFRX: ,-35.00,7.00,0,1521551302,CAFEDECA…<br />
<br />
PER is not displayed and the 4 bytes counter is not present in the payload (it means that Tx device also has &lt;per_state&gt; set to false.<br />
<br />
After frame reception the Rx is automatically stopped.<br />
<br />
==== Example ====<br />
AT+RFRX=RECV<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
<br><br />
----<br />
=== AT+RFRX=START (for test purpose) ===<br />
<br />
Continuous reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer stays in RX until Rx stop command is sent (see AT+RFRX=STOP)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
When a TX has been performed during Reception, An AT+RFRX=STOP command may be needed to avoid ERROR from this command<br />
<br />
After frame reception RF layer stays in RX (RX stop command must be used to leave RX mode).<br />
<br />
==== Example ====<br />
AT+RFRX=START<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
+RFRX: 100%,-32.00,7.00,0,1521554506,13000000CAFEDECA<br />
…<br />
<br><br />
----<br />
=== AT+RFRX=STOP ===<br />
<br />
Stop single or continuous reception.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is in RX.<br />
<br />
ERROR if RF layer is not in RX.<br />
<br />
==== Example ====<br />
AT+RFRX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=CONTRX ===<br />
<br />
Continuous reception without PER computation.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
Then, for each received frame, the unsolicited response below is sent:<br />
<br />
+RFRX: &lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
<br><br />
----<br />
=== AT+RFRX=LVL (for test purpose) ===<br />
<br />
Last reception parameters read (RSSI, SNR)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
Response information is as below:<br />
<br />
+RFRX: LVL,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+RFRX=LVL<br />
+RFRX: LVL,-77.00,8.00<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
<br />
==== LoRa Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency.<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,LORA,,125000,7 <br />
OK<br />
| <br />
:Set some RX parameters. Let the channel to default frequency<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,LORA,868100000,14,125000,7<br />
OK<br />
| <br />
:set Tx modulation LoRa, freq 868100000, Tx power 14dbm, bandwidth 125KHz, SF7<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
==== FSK Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency. For FSK some rules apply on selected "bandwith/datarate" in RX and "frequency deviation/datarate" in TX. This is described in ([[MM002-xx-EU datasheet#Reference|sx1272 datasheet]])<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,FSK,868100000,125000,1200 <br />
OK<br />
| <br />
:Set some RX parameters.freq 868100000,Bandwith 125 000, Datarate 1200<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,FSK,868100000,14,,1200,,,,50000<br />
OK<br />
| <br />
:set Tx modulation FSK, freq 868100000, Tx power 14dbm, Datarate 1200, Deviation Frequency 50 000<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
== AT LoRa™WAN (MAC) commands ==<br />
<br />
---- <br />
3 types of AT strings are specified:<br />
<br />
* MAC commands: AT+MAC=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* MAC solicited responses: +MAC: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to MAC commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the MAC command and the OK response.<br />
* MAC unsolicited responses: +MAC: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the MAC command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+MAC=? to know the current MAC mode (ABP or OTAA, Class A or C).<br />
* AT+MAC=OFF and AT+MAC=ON,… to change the MAC mode.<br />
* AT+MAC=DEVADRR and unsolicited +MAC: DEVADDR,… to know the current state of an OTAA device.<br />
* AT+MAC=SNDBIN,… to send uplink frame.<br />
* +MAC: RCVBIN,… when receiving downlink frames and to know Rx windows termination.<br />
<br />
All other commands are not really required, they are mainly used by NemeusATK Java application to manage the LoRa™WAN layer (for IOT purpose, device provisioning …).<br />
<br />
<br><br />
----<br />
=== AT+MAC=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SCH,RCH,SDR,RDR,STI,RTI,SRX2,RRX2,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=ON, === <br />
This command is used to start LoRa™WAN layer and is mandatory in order to use most of MAC commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
AT+MAC= ON,&lt;minor_ver&gt;,&lt;class&gt;,&lt;otaa&gt;<br />
<br />
&lt;minor_ver&gt; can be 1 or 3 (default is 3 for LoRa™WAN V1.0). V1 is no more maintained.<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;otaa&gt; is 0 for ABP and 1 for OTAA.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
Start LoRa™WAN layer in class A with OTAA:<br />
<br />
AT+MAC=ON,3,A,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=OFF ===<br />
<br />
Stop LoRa™WAN layer.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+MAC=? ===<br />
<br />
Read current LoRa™WAN layer status.<br />
<br />
To change LoRa™WAN layer status, AT+MAC=OFF and AT+MAC=ON,… must be performed.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;state&gt;,&lt;minor_ver&gt;,&lt;class&gt;,&lt;ch_pages&gt;,&lt;ism_band&gt;,&lt;otaa&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;minor_ver&gt; can be '''V'''1 or '''V'''3 (default is 3 for LoRa™WAN V1.0).<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;page&gt; is the number of pages of 16 channels available at LoRa™WAN layer (in terms of memory space).<br />
<br />
&lt;ism_band&gt; is 4 for EU433MHz, 7 for China779-787MHz, 8 is EU863-870MHz and 9 for US902-928MHz. ISM band can’t be modified dynamically, it is set at compilation time.<br />
<br />
&lt;otaa&gt; is 0 or 2 for ABP and 1 for OTAA (2 means ABP, and OTAA is not supported by the module).<br />
<br />
<br><br />
<br />
==== Example ====<br />
<br />
A class A US902-928MHz device with 80 channels (5*16) which doesn’t support OTAA:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,5,9,2<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
AT+MAC= SNDBIN,&lt;binpyload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application).<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC=SNDBIN,1A2B3C,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVBIN, === <br />
Register for receiving downlink frames on specified port, payload is output as binary hexa string.<br />
<br />
AT+MAC= RCVBIN,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVBIN,&lt;port&gt;,&lt;more&gt;,&lt;binarypayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
The RCVBIN unsolicited response is always sent after a Tx, even if no frame has been received. It indicates the end of Rx windows.<br />
<br />
For a class A device, it is sent when a downlink frame has been received or at the end of the Rx window 2 (if no downlink frame has been received).<br />
<br />
For a class C device, it is sent when a downlink frame has been received or at the end of the Rx window 1 (if no downlink frame has been received).<br />
<br />
If the Tx was in ack mode, the RCVBIN is sent before the OK (or ERROR NOACK) response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
If the Tx was in unack mode, the RCVBIN is sent after the OK response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
==== Example ====<br />
AT+MAC= RCVBIN,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVBIN,2,true,1A2B3C4D,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC=SNDTXT, === <br />
It is the same command as AT+MAC=SNDBIN except that the payload is interpreted as text and is transmitted as received on serial link (no translation from hexa ASCII to hexa binary is performed).<br />
<br />
AT+MAC= SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
<br />
Text frame transmission.<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application)<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC= SNDTXT,HELLO WORLD,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVTXT, === <br />
Register for receiving downlink frames on specified port, payload is output as text string (translation to binary hexa string is not performed).<br />
<br />
AT+MAC=RCVTXT,&lt;port&gt;<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
'''By default, downlink payload are processed as binary payload, thus if the AT client application needs to receive the payload as text (without any binary hexa string translation), it must uses this command.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVTXT,&lt;port&gt;,&lt;more&gt;,&lt;textpayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
==== Example ====<br />
AT+MAC=RCVTXT,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVTXT,2,true,HELLO WORLD,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC= STOPRCV, === <br />
Unregister for receiving downlink frames on specified port.<br />
<br />
AT+MAC=STOPRCV,&lt;port&gt;<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid.<br />
<br />
ERROR if MAC is OFF or port is invalid.<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+MAC=SNDLCR, === <br />
Send a Link Check Request.<br />
<br />
AT+MAC=SNDLCR,&lt;nbrepeat&gt;<br />
<br />
&lt;nbrepeat&gt; = 0 means the LCR message is sent in unack mode on port 0.<br />
<br />
&lt;nbrepeat&gt; != 0 means the LCR message is sent in ack mode on port 0 with &lt;nbrepeat&gt; transmissions.<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and Link Check Answer has been received.<br />
<br />
ERROR if MAC is OFF or Link Check Answer has not been received and Tx was in unack mode.<br />
<br />
ERROR NOACK if Link Check Answer has not been received and Tx was in ack mode.<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
Received data is sent back as<br />
<br />
+MAC: &lt;margin&gt;,&lt;gwcnt&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+MAC=SNDLCR<br />
+MAC: 20,3,-45.00,8.00<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RCH, === <br />
Read MAC channels command.<br />
<br />
AT+MAC=RCH,&lt;chan&gt;,&lt;page&gt;,&lt;unsol_evt&gt;<br />
<br />
&lt;chan&gt; specifies the channel to read (all channels of the page if omitted or if 16)<br />
<br />
&lt;page&gt; specifies the channel page (all pages if omitted or if number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;unsol_evt&gt; specifies if unsolicited events are required (0 when not required). The unsolicited events inform the AT client application when a MAC parameter has been changed by the LoRa™WAN layer.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
For each channel, the following information is output:<br />
<br />
+MAC: &lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;busytime&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
&lt;chan&gt;: the channel index in the page (0 to 15).<br />
<br />
&lt;frequency&gt;: the frequency in Hz (0 means channel is disabled).<br />
<br />
&lt;mindr&gt;: minimum datarate allowed on the channel.<br />
<br />
&lt;maxdr&gt;: maximum datarate allowed on the channel.<br />
<br />
&lt;dutycycle&gt;: restricted duty cycle assigned to the channel (applies only when more restricted than ISM regulation specification).<br />
<br />
&lt;busytime&gt;: time in ms before the channel can be used again for Tx (due to duty cycle restrictions).<br />
<br />
&lt;page&gt;: channel page (0 to number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;rxw1freq&gt;: frequency used to open Rx window 1. 0 means same frequency as &lt;frequency&gt; parameter (available only from LoRaWAN V1.0.2, if the parameter is absent in the response, it means the firmware version is older).<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when &lt;busytime&gt; changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RCH<br />
+MAC: 0,868100000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 1,868300000,SF12BW125,SF7BW125,100,0,0,869525000<br />
+MAC: 2,868500000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 3,868850000,SF12BW125,SF7BW125,1000,0,0,0<br />
…<br />
+MAC: 15,000000000,SF12BW125,FSK50KBPS,1,0,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SCH, === <br />
Set MAC channel command.<br />
<br />
AT+MAC=SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;min_dr&gt;,&lt;max_dr&gt;,&lt;dutycycle&gt;,&lt;page&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=SCH?'''''Command.<br />
<br />
&lt;dutycycle&gt; is applied only if it is more restricted than the ISM regulation specification. 1 means 100%, 10 means 10%, 100 means 1%, ...<br />
<br />
&lt;rxw1freq&gt; is available only from LoRaWAN V1.0.2<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when LoRa™WAN layer modifies a channel and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
==== Example ====<br />
<br />
To modify channel 0:<br />
<br />
AT+MAC=SCH,0,868100000,SF12BW125,SF7BW125,100,0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC= RDR ===<br />
<br />
Read current MAC datarate command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band firmware<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current datarate changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RDR<br />
+MAC: SF12BW125,11,001F,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDR, === <br />
Set MAC data rate command.<br />
<br />
AT+MAC=SDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
Set the data rate, Tx power and number of repetitions for uplink transmission (applied to all channels compatible with the datarate). &lt;nbrep&gt; applies only to unconfirmed transmissions.<br />
<br />
&lt;chanmask&gt; and &lt;chanmaskctrl&gt; specify the channels usable for uplink access.<br />
<br />
The parameter list can be found by '''''AT+MAC=SDR?'''''Command.<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify current datarate:<br />
<br />
AT+MAC=SDR,SF12BW125,10,001F,0,0<br />
<br />
<br><br />
<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RTI ===<br />
<br />
Read MAC Time Information command.<br />
<br />
Read common channel time information.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current time info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RTI,&lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Example ====<br />
AT+MAC= RTI<br />
+MAC: 1000,2000,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC= STI, === <br />
Set MAC time information command.<br />
<br />
AT+MAC=STI,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;symbtimeout&gt;<br />
<br />
Only modified parameter can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=STI?'''''Command.<br />
<br />
The parameters &lt;rxw1&gt; and &lt;symbtimeout&gt; are common to all channels.<br />
<br />
The &lt;''rxw2''&gt; parameter is no more used because &lt;''rxw2''&gt; value is set to &lt;rxw1&gt; value + 1000 ms. It is still present for compatibility with old devices.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To modify time info:<br />
<br />
AT+MAC=STI,1000,,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RRX ===<br />
<br />
Read MAC Rx information command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current Rx info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RRX,&lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RRX<br />
+MAC: 869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SRX, === <br />
Set MAC Rx information command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SRX?'''''Command.<br />
<br />
The parameters are common to all channels.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify Rx parameters:<br />
<br />
AT+MAC=SRX,869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RSW ===<br />
<br />
This command is used to read the current LoRa™ and FSK synchro words used by LoRa™WAN layer. Synchro words are in hexadecimal format.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;LoRa™ sync_word&gt;,&lt;FSK sync_word&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RSW<br />
+MAC: 34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SSW, === <br />
This command is used to set the synchro words used by LoRa™WAN layer.<br />
<br />
AT+MAC=SSW,&lt;LoRaSyncWord&gt;,&lt;FskSyncWord&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
Synchro words are in hexadecimal.<br />
<br />
The parameter list can be found by '''''AT+MAC=SSW?'''''Command.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+MAC=SSW,34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RVAR ===<br />
<br />
This command is used to read the miscellaneous LoRa™WAN variables.<br />
<br />
This variables are Tx/Rx counters, aggregated DC and data encryption.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;txcounter&gt;,&lt;rxcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
&lt;aggregateddc&gt; values: 1 means 100%, 10 means 10%, 100 means 1%, …<br />
<br />
&lt;encryption&gt; values: 0 means no encryption, != 0 means encryption enabled.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent only when current aggregated DC changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RVAR,,,&lt;aggregateddc&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RVAR<br />
+MAC: 0,0,1,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SVAR, === <br />
This command is used to set some LoRa™WAN variables.<br />
<br />
AT+MAC=SVAR,&lt;txcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SVAR?'''''Command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To disable encryption:<br />
<br />
AT+MAC=SVAR,,,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RADR ===<br />
<br />
This command is used to read the current LoRa™WAN ADR, piggyback and back-off states.<br />
<br />
'''The ack mode retransmission back-off procedure was initially linked to ADR bit. When ADR bit was on/off, the back-off procedure was on/off. From now, the back-off procedure is linked to the back-off state, it allows to enable ADR bit without enabling the back-off procedure. If &lt;backoff&gt; parameter is absent in RADR response, it means that back-off procedure is still linked to ADR bit (older firmware version).'''<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
&lt;adr&gt;, &lt;piggyback&gt; and &lt;backoff&gt; values: true or false.<br />
<br />
==== Example ====<br />
AT+MAC=RADR<br />
+MAC: true,false,false<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SADR, === <br />
This command is used to set some LoRa™WAN ADR and piggyback states.<br />
<br />
AT+MAC=SADR,&lt;adr&gt;,&lt;piggyback&gt;<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SADR?'''''Command.<br />
<br />
When ADR state value is changed, ADR ack counter is reset.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct.<br />
<br />
==== Example ====<br />
<br />
To enable piggyback:<br />
<br />
AT+MAC=SADR,,true<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVUID ===<br />
<br />
Read device unique identifier.<br />
<br />
Device UID is coded on 8 bytes.<br />
<br />
''This command obsoletes AT+MAC=DEVUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
UID is returned as<br />
<br />
+MAC: &lt;devuid&gt;,&lt;rand_seed&gt;,&lt;read_only&gt;<br />
<br />
When read_only value is 1, it means that the device unique identifier is built from Nemeus 36 bits OUI (70B3D5326xxxxxxx). In this case the device UID can’t be modified and the security keys are not readable.<br />
<br />
==== Example ====<br />
AT+MAC=RDEVUID<br />
0010203,306A0327,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDEVUID, === <br />
This command is used to modify device UID.<br />
<br />
AT+MAC=SDEVUID,&lt;devuid&gt;<br />
<br />
Device UID must be writable.<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devuid&gt; length is 16 characters and device UID is writable.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVADDR ===<br />
<br />
Read device address.<br />
<br />
''This command obsoletes AT+MAC=DEVADDR command.''<br />
<br />
''Old command still works and returns the same solicited response.''<br />
<br />
''Warning: unsolicited response changed, old one is no more sent!!!''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Address is returned as<br />
<br />
+MAC: &lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
In ABP mode, the device address is the 4 LSB of the device unique identifier.<br />
<br />
In OTAA mode, the device address is assigned by the network.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when device is in OTAA mode and at least one AT+MAC=? command has been sent.<br />
<br />
+MAC: RDEVADDR,&lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
==== Example ====<br />
<br />
Read device address of an OTAA device when not yet joint to network:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
<br />
After receipt of valid join accept, unsolicited response is sent:<br />
<br />
DEVADDR,0870C367,010203 <br />
<br><br />
----<br />
=== AT+MAC=SDEVADDR, === <br />
This command is used to modify device address when ABP mode is used.<br />
<br />
AT+MAC=SDEVADDR,&lt;devaddr&gt;<br />
<br />
If MAC layer is on in ABP mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devaddr&gt; length is 8 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVADDR,01020304<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPUID ===<br />
<br />
Read application Unique ID.<br />
<br />
Application UID is coded on 8 bytes.<br />
<br />
By default it is set to 0000000000000000.<br />
<br />
It can be modified by sending the following AT command:<br />
<br />
AT+GA=DIND,1,8301000008xxxxxxxxxxxxxxxx0000<br />
<br />
Where xxxxxxxxxxxxxxxx is the new application UID LSB first.<br />
<br />
MAC layer must be restarted to take into account new application UID (AT+MAC=OFF and AT+MAC=ON).<br />
<br />
Application UID can also be modified using AT+MAC=SAPPUID,&lt;app_uid&gt;.<br />
<br />
''This command obsoletes AT+MAC=APPUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Application UID is returned as<br />
<br />
+MAC: &lt;appuid&gt;<br />
<br />
==== Example ====<br />
<br />
Read default application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: 0000000000000000<br />
OK<br />
<br />
Set application UID to FEDCBA9876543210:<br />
<br />
0000<br />
OK<br />
<br />
Restart MAC layer:<br />
<br />
AT+MAC=OFF<br />
OK<br />
AT+MAC=ON<br />
OK<br />
<br />
Read new application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: FEDCBA9876543210<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SAPPUID, === <br />
This command is used to modify application UID.<br />
<br />
AT+MAC=SAPPUID,&lt;appuid&gt;<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;appuid&gt; length is 16 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SAPPUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPKEY ===<br />
<br />
Read application key.<br />
<br />
Application Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPKEY command.''<br />
<br />
''Old command still works and returns the &lt;appkey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application key is returned as<br />
<br />
+MAC: &lt;appkey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPKEY<br />
+MAC: A8FA642E2E3245BB9B8CAC7E2456EF3C<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPKEY<br />
+MAC: 3CEF56247EAC8C9BBB45322E2E64FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RNSKEY ===<br />
<br />
Read Network Session Key.<br />
<br />
Network Session Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=NSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=NSKEY command.''<br />
<br />
''Old command still works and returns the &lt;nskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Network session key is returned as<br />
<br />
+MAC: &lt;nskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RNSKEY<br />
+MAC: A8F1642E2E32453B9B8CAC7C2456EF72<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=NSKEY<br />
+MAC: 72EF56247CAC8C9B3B45322E2E64F1A8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPSKEY ===<br />
<br />
Read application session key.<br />
<br />
Application session key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPSKEY command.''<br />
<br />
''Old command still works and returns the &lt;appskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application session key is returned as<br />
<br />
+MAC: &lt;appskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPSKEY<br />
+MAC: A8FA672E2E4245BB9ECCCA7E64F54C38<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPSKEY<br />
+MAC: 384CF5647ECACC9EBB45422E2E67FAA8<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
==== Device start ====<br />
<br />
AT client application can detect a device start or restart when the unsolicited response +DEBUG: START,&lt;version&gt; is received. Depending on initialization timing, AT client application is not sure to receive this unsolicited response, that’s the reason why it is recommended that AT client application use AT+MAC=? command to synchronize with the device.<br />
<br />
<br><br />
<br />
<u>'''OTAA case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
+MAC: RDEVADDR,0870C367,010203 <br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<u>'''ABP case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,0 <br />
OK<br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<br><br />
<br />
==== Send unconfirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''No downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
AT+MAC=SNDBIN,,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
==== Send confirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''Ack received, no downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,0,false,,-60.00,7.00 <br />
OK <br />
<br />
<u>'''Ack not received:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
ERROR NOACK <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
OK <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
AT+MAC=SNDBIN,,0,2,1 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
OK <br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT SIGFOX™ commands ==<br />
<br />
---- <br />
These commands are available only on Nemeus modules embedding SIGFOX™ library. If the library is not embedded then ERROR is returned.<br />
<br />
3 type of AT strings are specified:<br />
<br />
* SF commands: AT+SF=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* SF solicited responses: +SF: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to SF commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the SF command and the OK response.<br />
* SF unsolicited responses: +SF: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the SF command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+SF=? to know the current SIGFOX™ layer state.<br />
* AT+SF=OFF and AT+SF=ON to stop and start SIGFOX™ layer.<br />
* AT+SF=SNDBIN,… to send uplink frame.<br />
* AT+SF=SNDBIT,… to send uplink bit.<br />
* AT+SF=SNDOOB to send uplink out of band message (keep alive messages).<br />
* +SF: RCVBIN,… when receiving downlink frames.<br />
<br />
All other commands are not really required, they are mainly used to configure SIGFOX™ layer and to perform SIGFOX™ qualification tests.<br />
<br />
SIGFOX™ proprietary AT command set is also supported but not described in this document.<br />
<br />
<br><br />
----<br />
=== AT+SF=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+SF=HELP<br />
+SF: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+SF: &lt;cmd&gt; are ON,OFF,?,SNDBIN,SNDBIT,SNDOOB,SREP,RREP,STXF,RTXF,SRXF,RRXF,STXP,RTXP<br />
+SF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+SF=ON ===<br />
<br />
This command is used to start SIGFOX™ layer and is mandatory in order to use most of SF commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
==== Response ====<br />
<br />
If LoRa™WAN stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=ON<br />
OK<br />
<br><br />
----<br />
=== AT+SF=OFF ===<br />
<br />
Stop SIGFOX™ layer.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=OFF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=? ===<br />
<br />
Read current SIGFOX™ layer status.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ library is embedded OK is returned.<br />
<br />
Else ERROR is returned.<br />
<br />
+SF: &lt;state&gt;,&lt;NMS_lib_ver&gt;,&lt;SFX_lib_ver&gt;,&lt;dev_id&gt;,&lt;initial_pac&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;NMS_lib_ver&gt; is the version of Nemeus library used to communicate with SIGFOX™ network.<br />
<br />
&lt;SFX_lib_ver&gt; is the version of SIGFOX™ library.<br />
<br />
&lt;dev_id&gt; is the device unique identifier on SIGFOX™ network.<br />
<br />
&lt;initial_pac&gt; is the first Portability Access Code used to register the device on SIGFOX™ network. It is used one time for first registration.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=?<br />
+SF: ON,NMS-SFX-LIB-1.2,UDL1-1.6.0,000ABCDE,0123456789ABCDEF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
If &lt;ack&gt; value is 0 then the frame is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the frame is sent in acknowledged mode.<br />
<br />
The frame is sent when channel becomes free regarding duty cycle limitations.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIN,CAFE,1<br />
+SF: SND,4576<br />
+SF: SND,0<br />
+SF: 6282<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDBIT, === <br />
Bit transmission.<br />
<br />
If &lt;ack&gt; value is 0 then the bit is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the bit is sent in acknowledged mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIT,0,1<br />
+SF: SND,6422<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDOOB ===<br />
<br />
Out Of Band message transmission.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it can be used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent.<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent.<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
==== Example ====<br />
AT+SF=SNDOOB<br />
+SF: SND,3987<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
<br><br />
----<br />
=== AT+SF=RREP ===<br />
<br />
Read Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;repeat&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 2 repetitions.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RREP<br />
+SF: 2<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SREP, === <br />
Set Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
Default value is 2 repetitions.<br />
<br />
OK if number of repetitions &lt;= 2.<br />
<br />
ERROR if number of repetitions &gt; 2.<br />
<br />
==== Example ====<br />
AT+SF=SREP,1<br />
OK<br />
AT+SF=SREP,3<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXF ===<br />
<br />
Read output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 868130000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXF<br />
+SF: 868130000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXF, === <br />
Set output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= tx_frequency &lt;= 870000000.<br />
<br />
ERROR if tx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=STXF,868200000<br />
OK<br />
AT+SF=STXF,862200000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RRXF ===<br />
<br />
Read reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;rx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 869525000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RRXF<br />
+SF: 869525000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SRXF, === <br />
Set reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= rx_frequency &lt;= 870000000.<br />
<br />
ERROR if rx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=SRXF,869525000<br />
OK<br />
AT+SF=SRXF,869525000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXP ===<br />
<br />
Read Tx power.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_power&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 14 dBm.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXP<br />
+SF: 14<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXP, === <br />
Set Tx power.<br />
<br />
==== Response ====<br />
<br />
OK if tx_power &lt;= 14 dBm.<br />
<br />
ERROR if tx_power &gt; 14 dBm.<br />
<br />
==== Example ====<br />
AT+SF=STXP,10<br />
OK<br />
AT+SF=STXP,20<br />
ERROR<br />
<br />
<br><br />
== AT Generic command ==<br />
<br />
---- <br />
AT Generic command can be used to activate/deactivate some generic functionalities.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8801 ===<br />
<br />
This command is use to know the status of PowerSaving.<br />
<br />
==== Response ====<br />
<br />
+GA : DIND,1,0801&lt;pwr_state&gt;<br />
<br />
Always OK.<br />
<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,8801<br />
<br />
+GA : DIND,1,080100<br />
<br />
OK.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8802&lt;pwr_state&gt; ===<br />
<br><br />
'''WARNING: CONNECT CORRECTLY THE WAKEUP PIN BEFORE ACTIVATION OF POWERSAVING'''<br />
<br><br />
This command is use to set the PowerSaving.<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
PowerSaving can be activated once after boot-up, and from this point will go in stop mode as soon as possible and is wake-up by RTC or Wakeup pin.<br />
Please note that once power-saving is activated, user should toggle wake-up pin before sending an AT command.<br />
<br />
If the module is reset, the powersaving is set back to OFF. So User should ensure setting it to ON after any reset<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,880201<br />
<br />
OK<br />
<br />
<br><br />
----<br />
<br />
== AT debug command ==<br />
<br />
---- <br />
AT debug command can be used to activate/deactivate some debug functionalities.<br />
<br />
<br><br />
----<br />
=== AT+DEBUG= HELP ===<br />
<br />
This commandis use to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= HELP<br />
+DEBUG: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+DEBUG: &lt;cmd&gt; are MVER,MVOFF,MVON,MV?,MEOFF,MEON,ME?,MPOFF,MPON,MP?,RREAD,RWRITE<br />
+DEBUG: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG=MVER ===<br />
<br />
Read Mcu software version.<br />
<br />
Furthermore, when the device boots the software version is sent as an unsolicited response:<br />
<br />
+DEBUG: START,&lt;version&gt;<br />
<br />
This unsolicited response can be used to detect a reset of the device.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: MVER,&lt;version&gt;<br />
<br />
==== Example ====<br />
<br />
AT boot:<br />
<br />
+DEBUG: START,Nemeus 1.x<br />
<br />
When requested:<br />
<br />
AT+DEBUG= MVER<br />
+DEBUG: MVER,Nemeus 1.x<br />
OK<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+DEBUG= MVOFF ===<br />
<br />
Disable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MVON ===<br />
<br />
Enable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
OK if software is compiled with debug traces.<br />
<br />
ERROR if software is compiled without debug traces.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MV? ===<br />
<br />
Read current verbose mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;verbose&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MV?<br />
+DEBUG: MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEOFF ===<br />
<br />
Disable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEON ===<br />
<br />
Enable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= ME? ===<br />
<br />
Read current echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;echo&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= ME?<br />
+DEBUG: MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPOFF ===<br />
<br />
Disable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPON ===<br />
<br />
Enable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MP? ===<br />
<br />
Read current prompt mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;prompt&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MP?<br />
+DEBUG: MPON<br />
OK</div>Lcshttps://wiki.nemeus.fr/index.php?title=MM002-xx-EU_AT_Commands&diff=205MM002-xx-EU AT Commands2017-11-28T10:25:30Z<p>Lcs: /* AT RF commands */</p>
<hr />
<div>[[Category:MM002]]<br />
[[Category:Modules]]<br />
AT commands are used as an interface with Nemeus Communication modules. Modules can be driven at 3 different levels:<br />
<br />
* Radio level: embedded AT server uses RF SX127x driver API (LoRa™and FSK modulations can be used).<br />
* LoRa™WAN level: embedded AT server uses LoRa™WAN library API(available only when the library is present in embedded software).<br />
* SIGFOX™ level: embedded AT server uses SIGFOX™ library API(available only when the library is present in embedded software).<br />
<br />
<u>'''When radio level is used'''</u>, no device personalization is required, it is up to AT client application to implement network layer according to the network the device is attached (the module doesn’t know the network).<br />
<br />
<u>'''When LoRa™WAN level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* Whatever the activation type, a 64 bits device unique identifier.<br />
* When Activation By Personalization (ABP) is used:<br />
** An AES128 network security key for MIC computation and encryptionof MAC control commands on port 0.<br />
** An AES128 application security key for encryption of applicationpayloads (not required when data encryption is disabled on themodule).<br />
* When Over The Air Activation (OTAA) is used:<br />
** A 64 bits application unique identifier.<br />
** An AES128 application Key used to derive the network andapplication security keys.<br />
<br />
In first software versions (before 15W40) the module generates unique identifiers and keys, these default LoRa™WAN personalization parameters are modifiable by AT commands. It allows customers to personalize their devices according to the network operator rules.<br />
<br />
In further software versions, modules are personalized with Nemeus OUI during production phase and they can’t be modified. In this case the device unique identifier is read-only and the AES128 keys are hidden. The application unique identifier is still modifiable by AT command.<br />
<br />
<u>'''When SIGFOX™ level is used'''</u>, the device is personalized with the following parameters:<br />
<br />
* The read-only device unique identifier.<br />
* The hidden AES128 security key.<br />
* The initial read-only Portability Access Code (PAC).<br />
<br />
Before driving the module, the AT client application must activate the level it wants to use.<br />
<br />
Only one level can be activated at a time.<br />
<br />
When activating a level, a previously activated level is automatically deactivated.<br />
<br />
<br />
[[File:Mm002_serial_diagram.png|center|500px]]<br />
<br><br><br />
For evaluation/test purpose, Nemeus recommends to use NemeusATK java application to drive the module.<br />
<br><br><br />
{{TOC limit|3}}<br />
<br />
== UART configuration ==<br />
<br />
The UART configuration for Modem connection is as follows:<br />
<br />
* Baud Rate : 38400<br />
* Data : 8 bits<br />
* Parity : None<br />
* Stop : 1 bit<br />
* Flow control : None<br />
* End line character : &lt;LF&gt;<br />
<br />
<br><br />
<br><br />
<br />
E.g. Typical configuration given by ‘stty’ command on linux:<br />
<br />
''speed 38400 baud; rows 0; columns 0; line = 0;''<br />
<br />
''intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 = &lt;undef&gt;;swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;flush = ^O; min = 1; time = 0;''<br />
<br />
''-parenb -parodd cs8 hupcl -cstopb cread clocal –crtsct signbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff –iuclc -ixany -imaxbel -iutf8''<br />
<br />
''-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop –echoprt -echoctl -echoke''<br />
<br />
<br><br />
<br />
== AT commands ==<br />
<br />
---- <br />
At command are split according to communication layers. This is a list of main AT commands for SW given in ‘compatibility’ paragraph. The full list and limitation can be found in SW delivery note.<br />
<br />
Formalism is the following:<br />
<br />
<br> <br />
<br><br />
[[File:AT-command-line.png|center]]<br />
<br><br />
<br><br />
<br />
For each group among RF, RFRX, RFTX, MAC and SFX, the command AT+&lt;group&gt;= HELP describes available sub-commands. Example:<br />
<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SET,SCH,RCH,STI,RTI,SRX,RRX,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br />
When a sub-command has parameter, AT+&lt;group&gt;= &lt;cmd&gt;? Describes the parameter list. Example:<br />
<br />
AT+MAC=SNDTXT?<br />
+MAC: SNDTXT,&lt;textpayload&gt;,&lt;nbrepeat&gt;,&lt;port&gt;,&lt;mode&gt;<br />
OK<br />
<br />
When command is unknown “command not found (‘try help’)” is returned.<br />
<br />
AT commands are not cancelable, thus AT client application must wait for AT response before sending a new command.<br />
<br />
<br><br />
<br />
== Generic Parameter description ==<br />
<br />
---- <br />
Following table describes mains parameters used with AT commands.<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Type'''<br />
<br />
|-<br />
| <br />
'''&lt;mod&gt;'''<br />
<br />
| <br />
Modulation to be use<br />
<br />
| <br />
LORA/FSK<br />
<br />
|-<br />
| <br />
'''&lt;freq&gt;'''<br />
<br />
| <br />
Carrier frequency<br />
<br />
| <br />
Expressed in Hertz *<br />
<br />
|-<br />
| <br />
'''&lt;pwr&gt;'''<br />
<br />
| <br />
Tx power (range depends on Module definition; e.g. MM001 -1dBm to 14dBm)<br />
<br />
| <br />
In dBm *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;bw&gt;'''<br />
<br />
| <br />
Bandwidth from 125kHz to 500 kHz<br />
<br />
| <br />
In Hertz *<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;dr&gt;'''<br />
<br />
| <br />
Spreading Factor in LoRa mode<br />
<br />
Data rate in FSK mode<br />
<br />
| <br />
6/7 to 12 *<br />
<br />
In kb/s<br />
<br />
|-<br />
| <br />
'''&lt;cr&gt;'''<br />
<br />
| <br />
Coding Rate (LoRa mode only)<br />
<br />
| <br />
1 to 4<br />
<br />
|-<br />
| <br />
'''&lt;min/maxdr&gt;'''<br />
<br />
| <br />
Data rate range<br />
<br />
| <br />
SF7BW125 to SF12BW125, SF7BW250 or FSK50KBPS<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxcrcon&gt;'''<br />
<br />
| <br />
Flag for CRC check activation in TX or RX<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;preamble&gt;'''<br />
<br />
| <br />
Length of the preamble<br />
<br />
| <br />
6 to 65535<br />
<br />
|-<br />
| <br />
'''&lt;f_dev&gt;'''<br />
<br />
| <br />
Frequency deviation (FSK mode only)<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;fixed_len&gt;'''<br />
<br />
| <br />
When true, PHY payload is constant (no header)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;tx/rxiqinv'''<br />
<br />
| <br />
Flag for IQ inversion in TX or RX (LoRa mode only)<br />
<br />
| <br />
True or false<br />
<br />
|-<br />
| <br />
'''&lt;rxw1&gt;'''<br />
<br />
| <br />
Delay before RX windows 1<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;rxw2&gt;'''<br />
<br />
| <br />
Delay before RX windows 2 ; NOTE: rx_w2 must be longer than rx_w1.<br />
<br />
| <br />
In ms<br />
<br />
|-<br />
| <br />
'''&lt;tstamp&gt;'''<br />
<br />
| <br />
Rx ot Tx timestamp<br />
<br />
| <br />
In ticks<br />
<br />
|-<br />
| <br />
'''&lt;symbtimeout&gt;'''<br />
<br />
| <br />
Number of symbols before RX timeout<br />
<br />
| <br />
5 to 1023<br />
<br />
|-<br />
| <br />
'''&lt;port&gt;'''<br />
<br />
| <br />
MAC port<br />
<br />
| <br />
0 to 10<br />
<br />
|-<br />
| <br />
'''&lt;textpayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in ASCII<br />
<br />
| <br />
ASCII string<br />
<br />
|-<br />
| <br />
'''&lt; binarypayload&gt;'''<br />
<br />
| <br />
Payload to send or received payload in hexadecimal coded in ASCII<br />
<br />
| <br />
ASCII string containing 0 to F characters<br />
<br />
|-<br />
| <br />
'''&lt;chan&gt;'''<br />
<br />
| <br />
Identifies one of the 8 MAC channels<br />
<br />
| <br />
0 to 7<br />
<br />
|-<br />
| <br />
'''&lt;enable&gt;'''<br />
| <br />
Indicates the status of a channel<br />
|<br />
True or false<br />
|-<br />
| <br />
'''&lt;nbrepeat&gt;'''<br />
| <br />
Number of repetitions when sending a payload.<br />
<br />
At MAC level this parameter indicates if data confirmed must be used or not (0 means unacked mode&gt;).<br />
<br />
| <br />
0 to N<br />
<br />
|-<br />
| <br />
'''&lt;interval&gt;'''<br />
| <br />
Time interval between repetitions<br />
| <br />
In ms<br />
|-<br />
| <br />
'''&lt;hexaddress&gt;'''<br />
| <br />
Address of a registry in hexadecimal<br />
| <br />
<br><br />
|-<br />
| <br />
'''&lt;nbbytes&gt;'''<br />
| <br />
<br><br />
| <br />
0 to 4<br />
|-<br />
| <br />
'''&lt;byteN&gt;'''<br />
| <br />
Byte to write<br />
| <br />
0x00 to 0xFF<br />
|-<br />
| <br />
'''&lt;margin&gt;'''<br />
| <br />
Link demodulation margin above the demodulation floor computed by the nearest gateway<br />
| <br />
0 to 254 in dB<br />
|-<br />
| <br />
'''&lt;gwcnt&gt;'''<br />
| <br />
Number of gateways which received the MAC message<br />
| <br />
1 to N<br />
|-<br />
| <br />
'''&lt;devuid&gt;'''<br />
| <br />
Device unique identifier<br />
| <br />
8 bytes<br />
|-<br />
| <br />
'''&lt;devaddr&gt;'''<br />
| <br />
Device address (4 LSB of &lt;devuid&gt;)<br />
| <br />
4 bytes<br />
|-<br />
| <br />
'''&lt;more&gt;'''<br />
| <br />
Indicates if more downlink data is pending<br />
| <br />
true or false<br />
|-<br />
| <br />
'''&lt;mode&gt;'''<br />
| <br />
LoRa MAC transmission mode<br />
| <br />
0 for confirmed data<br />
not 0 for unconfirmed data<br />
|-<br />
| <br />
'''&lt;rxw1freq&gt;'''<br />
| <br />
Channel frequency used for Rx window 1<br />
<br />
| <br />
In Hz, 0 means same as Tx frequency<br />
<br />
|-<br />
| <br />
'''&lt;eirp&gt;'''<br />
<br />
| <br />
Effective Isotropic Radiated Power received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
In dBm<br />
<br />
|-<br />
| <br />
'''&lt;updwell&gt;'''<br />
<br />
| <br />
Uplink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;dwdwell&gt;'''<br />
<br />
| <br />
Downlink dwell time received in TxParamSetupReq (Asian band only)<br />
<br />
| <br />
0 means no limit<br />
<br />
1 means 400 ms<br />
<br />
|-<br />
| <br />
'''&lt;backoff&gt;'''<br />
<br />
| <br />
Ack mode retransmission back-off procedure<br />
<br />
| <br />
false means disabled<br />
<br />
true means enabled<br />
<br />
|} <br />
<br><br />
<br />
* Depends on Module in use<br />
<br />
<br><br />
<br />
== Generic Response description ==<br />
<br />
---- <br />
<br><br />
<br />
Every AT command send a response of one of the following types:<br />
<br />
<br><br />
<br />
<br />
{| border="1"<br />
|-<br />
| <br />
'''Values'''<br />
<br />
| <br />
'''Description'''<br />
<br />
| <br />
'''Visible output'''<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
'''Generic'''<br />
<br />
| <br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;OK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
OK response<br />
<br />
<br><br />
<br />
| <br />
OK<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response<br />
<br />
<br><br />
<br />
| <br />
ERROR<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;ERROR NOACK&lt;CR&gt;&lt;LF&gt;'''<br />
<br />
| <br />
ERROR response due to a missing ACK<br />
<br />
| <br />
ERROR_NOACK<br />
<br />
<br><br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+MAC: '''<br />
<br />
| <br />
Response from MAC layer<br />
<br />
<br><br />
<br />
| <br />
+MAC:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFTX: '''<br />
<br />
| <br />
Response from RF layer (TX)<br />
<br />
<br><br />
<br />
| <br />
+RFTX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+RFRX: '''<br />
<br />
| <br />
Response from RF layer (RX)<br />
<br />
<br><br />
<br />
| <br />
+RFRX:<br />
<br />
|-<br />
| <br />
'''&lt;CR&gt;&lt;LF&gt;+DEBUG: '''<br />
<br />
| <br />
Response from debug layer<br />
<br />
| <br />
+DEBUG:<br />
<br />
|-<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
| <br />
<br><br />
<br />
|} <br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT Generic commands ==<br />
<br />
---- <br />
Intentionally left blank<br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT RF commands ==<br />
<br />
---- <br />
RF commands are dealing with the RF Layer. This layer should be started before using most of RF commands listed in this section (unless stated otherwise).<br />
<br />
3 groups of commands exist:<br />
<br />
* +RF group: commands common to TX and RX functions.<br />
* +RFTX group: commands dedicated to TX functions.<br />
* +RFRX group: commands dedicated to RX functions.<br />
<br><br />
----<br />
=== AT+RF=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RF=HELP<br />
+RF: &lt;cmd&gt;<br />
+RF: &lt;cmd&gt; are ON,OFF,?,RPER,SPER,RSW,SSW<br />
+RF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RF=ON ===<br />
<br />
This command is used to start RF layer (Radio driver) and is mandatory in order to use most of RF commands listed in this section (unless otherwise stated).<br />
<br />
==== Response ====<br />
<br />
ERROR is returned if either LoRa™WAN stack or SIGFOX™ stack is using the radio (Tx or Rx is ongoing).<br />
<br />
Else OK is returned.<br />
<br />
If LoRa™WAN stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
If SIGFOX™ stack was ON (but not using the radio), it is automatically set to OFF.<br />
<br />
<br><br />
----<br />
=== AT+RF=OFF ===<br />
<br />
This command is used to stop RF layer (Radio driver). After calling this command, most of RF commands listed in this section will return ERROR (unless stated otherwise).<br />
<br />
RF layer stop (Radio driver).<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+RF=? ===<br />
<br />
This command is used to read the current RF layer state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=?<br />
+RF: OFF<br />
OK<br />
<br><br />
----<br />
=== AT+RF=RPER ===<br />
<br />
This command is used to read the Packet Error Rate state.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RPER<br />
+RF: false<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SPER, === <br />
This command is used to set the Packet Error Rate state and the power offset<br />
<br />
The following formalism is used. It can be checked by the AT+RF=SPER?command:<br />
<br />
+RF=SPER,&lt;per_state&gt;,&lt;pwroffset&gt;,&lt;loracsoffset&gt;,&lt;fskcsoffset&gt;<br />
<br />
&lt;per_state&gt; PER state, unchanged when absent.<br />
<br />
&lt;pwroffset&gt; is the Power offset<br />
<br />
&lt;loracoffset&gt; is the Power offset in LoRa<br />
<br />
&lt;fskcoffset&gt; is the Power offset in Fsk<br />
<br />
<br />
When PER state is true, a counter is added at the beginning of Tx frames. This counter is used on Rx side to compute the Packet Error Rate.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;per_state&gt; is “true”, “false” or omitted.<br />
<br />
ERROR if &lt;per_state&gt; is syntactically incorrect.<br />
<br />
==== Example ====<br />
AT+RF=SPER,true<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RF=RSW ===<br />
<br />
This command is used to read the current LoRa and FSK synchro words. Synchro words are in hexadecimal format (see formalism on SSW command)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+RF=RSW<br />
+RF: 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RF=SSW, === <br />
This command is used to set the synchro words.<br />
<br />
AT+RF=SSW,&lt;LoRa_SyncWord&gt;,&lt;Fsk_SyncWord&gt;<br />
<br />
&lt;LoRa_SyncWord&gt; LoRa Synchro Word (one byte)<br />
<br />
&lt;Fsk_SyncWord&gt; FSK Synchro Word (up to six bytes)<br />
<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+RF=SSW, 12,69817E96<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=HELP ===<br />
<br />
This command is used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFTX=HELP<br />
+RFTX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFTX: &lt;cmd&gt; are ?,SET,SEND,SNDTXT,SNDBIN,START,STOP<br />
+RFTX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=? ===<br />
<br />
Read TX parameters. This command does not need the RF layer to be ON.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFTX: &lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;<br />
<br />
==== Example ====<br />
AT+RFTX=?<br />
+RFTX : LORA,868100000,14,125000,7,1,true,8,0,false,false,0,0,0,5,false,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SET, === <br />
Write Tx parameters. This command does not need the RF layer to be ON. Only modified parameters can be specified.<br />
<br />
The following formalism is used. It can be checked by the '''''AT+RFTX=SET?''''' command:<br />
<br />
+RFTX= SET,&lt;mod&gt;,&lt;freq&gt;,&lt;pwr&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;txcrcon&gt;,&lt;preamble&gt;,&lt;fdev&gt;,&lt;fixedlen&gt;,&lt;txiqinv&gt;,&lt;rxw1&gt;,&lt;rxw2&gt;,&lt;tstamp&gt;,&lt;symbtimeout&gt;,&lt;rxiqinv&gt;,&lt;rxcrcon&gt;,&lt;rxaftertx&gt;<br />
<br />
The parameters &lt;symbtimeout&gt;, &lt;rxiqinv&gt; and &lt;rxcrcon&gt; are used only when an Rx window is specified.<br />
<br />
&lt;tstamp&gt; is the absolute clock time of the module. If the time is over, the frame is immediately transmitted. Usually this timestamp is a delay added to an Rx timestamp (feature not fully implemented)<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To set the &lt;pwr&gt; to 12 and the &lt;txcrcon&gt; to false:<br />
<br />
AT+RFTX=SET,,,12,,,,false<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+RFTX=SEND, (for test purpose) === <br />
Transmit &lt;nb_frames&gt; numbered frames every &lt;interval&gt; ms.<br />
<br />
AT+RFTX= SEND,&lt;nb_frames&gt;,&lt;interval&gt;<br />
<br />
Default values : &lt;nb_frames&gt; = 1, &lt;interval&gt; = 500 (ms).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), transmitted frames contain a counter on 4 bytes followed by a 32 bytes fixed pattern.<br />
<br />
This command is used as a generator for Packet Error Rate (PER) computing.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nb_frames&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SEND,3,500<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=START (for test purpose) ===<br />
<br />
FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=START<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=STOP (for test purpose) ===<br />
<br />
Stop FSK continuous transmission.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
==== Example ====<br />
AT+RFTX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDTXT, === <br />
Repeat &lt;nbrepeat&gt; text frames every 500 ms.<br />
<br />
AT+RFTX= SNDTXT,&lt;txt&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat&gt; = 1.<br />
<br />
&lt;txt&gt; parameter is transmitted as received on serial link, the module doesn’t manage any character set.<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
AT+RFTX=SNDTXT,HELLO WORLD,3<br />
OK<br />
<br><br />
----<br />
=== AT+RFTX=SNDBIN, === <br />
Repeat &lt;nbrepeat&gt; binary frames every 500 ms.<br />
<br />
AT+RFTX= SNDBIN,&lt;bin&gt;,&lt;nbrepeat&gt;<br />
<br />
Default values : &lt;nbrepeat &gt; = 1<br />
<br />
&lt;bin&gt; parameter is hexadecimal coded in ASCII (2 ASCII characters for 1 binary byte).<br />
<br />
If &lt;per_state&gt; is true (see AT+RF=SPER command), a 4 bytes counter is added at the beginning of the frame.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;nbrepeat&gt; have been successfully sent.<br />
<br />
ERROR if RF layer is OFF or if one frame has not been successfully sent.<br />
<br />
==== Example ====<br />
<br />
To send 2 times the 3 bytes 1A 2B 3C:<br />
<br />
AT+RFTX=SNDBIN,1A2B3C,2<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+RFRX=HELP<br />
+RFRX: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+RFRX: &lt;cmd&gt; are ?,SET,RECV,START,STOP,CONTRX,LVL<br />
+RFRX: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=? ===<br />
<br />
Read RX parameters.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+RFRX: &lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Example ====<br />
AT+RFRX=?<br />
,true<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=SET, === <br />
Set Rx parameters. Only modified parameter can be specified.<br />
<br />
The following formalism is used. It can be check by the '''''AT+RFRX=SET?'''''command:&lt;mod&gt;,&lt;freq&gt;,&lt;bw&gt;,&lt;dr&gt;,&lt;cr&gt;,&lt;rxcrcon&gt;,&lt;fixedlen&gt;,&lt;rxiqinv&gt;,&lt;''timeout''&gt;,&lt;''symbtimeout''&gt;,&lt;lnaboost&gt;<br />
<br />
&lt;''timeout''&gt; and &lt;''symbtimeout''&gt; parameters are no more used by radio stack (they are still present for compatibility with previous module versions).<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
==== Example ====<br />
<br />
To set &lt;dr&gt; parameter to 7:<br />
<br />
AT+RFRX=SET,,,,7<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=RECV (for test purpose) ===<br />
<br />
Single frame reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer comes back to IDLE state after reception or after AT+RFRX=STOP command.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
+RFRX: &lt;per&gt;,&lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
Then, when a frame is received the unsolicited response below is sent:<br />
<br />
If &lt;per_state&gt; is true (see +RF=SPER command):<br />
<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA…<br />
<br />
Where 100% is the PER, -35.00 is the RSSI level, 7.00 is the SNR, 0 is “no CRC error”, 1521551302 is the Rx clock time in ms and 12000000CAFEDECA is the received payload, starting with the 4 bytes counter.<br />
<br />
If &lt;per_state&gt; is false:<br />
<br />
+RFRX: ,-35.00,7.00,0,1521551302,CAFEDECA…<br />
<br />
PER is not displayed and the 4 bytes counter is not present in the payload (it means that Tx device also has &lt;per_state&gt; set to false.<br />
<br />
After frame reception the Rx is automatically stopped.<br />
<br />
==== Example ====<br />
AT+RFRX=RECV<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
<br><br />
----<br />
=== AT+RFRX=START (for test purpose) ===<br />
<br />
Continuous reception with PER computation if &lt;per_state&gt; is true (see +RF=SPER command).<br />
<br />
RF layer stays in RX until Rx stop command is sent (see AT+RFRX=STOP)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
When a TX has been performed during Reception, An AT+RFRX=STOP command may be needed to avoid ERROR from this command<br />
<br />
After frame reception RF layer stays in RX (RX stop command must be used to leave RX mode).<br />
<br />
==== Example ====<br />
AT+RFRX=START<br />
OK<br />
+RFRX: 100%,-35.00,7.00,0,1521551302,12000000CAFEDECA<br />
+RFRX: 100%,-32.00,7.00,0,1521554506,13000000CAFEDECA<br />
…<br />
<br><br />
----<br />
=== AT+RFRX=STOP ===<br />
<br />
Stop single or continuous reception.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is in RX.<br />
<br />
ERROR if RF layer is not in RX.<br />
<br />
==== Example ====<br />
AT+RFRX=STOP<br />
OK<br />
<br><br />
----<br />
=== AT+RFRX=CONTRX ===<br />
<br />
Continuous reception without PER computation.<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON and not already receiving.<br />
<br />
ERROR if RF layer is OFF or is already receiving.<br />
<br />
Then, for each received frame, the unsolicited response below is sent:<br />
<br />
+RFRX: &lt;rssi&gt;,&lt;snr&gt;,&lt;crcerr&gt;,&lt;tstamp&gt;,&lt;binary payload&gt;<br />
<br />
<br><br />
----<br />
=== AT+RFRX=LVL (for test purpose) ===<br />
<br />
Last reception parameters read (RSSI, SNR)<br />
<br />
==== Response ====<br />
<br />
OK if RF layer is ON.<br />
<br />
ERROR if RF layer is OFF.<br />
<br />
Response information is as below:<br />
<br />
+RFRX: LVL,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+RFRX=LVL<br />
+RFRX: LVL,-77.00,8.00<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
<br />
==== LoRa Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency.<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,LORA,,125000,7 <br />
OK<br />
| <br />
:Set some RX parameters. Let the channel to default frequency<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,LORA,868100000,14,125000,7<br />
OK<br />
| <br />
:set Tx modulation LoRa, freq 868100000, Tx power 14dbm, bandwidth 125KHz, SF7<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
==== FSK Communication ====<br />
<br />
Below is an example where two Modules are configured to communicate on a specific frequency. For FSK some rules apply on selected "bandwith/datarate" in RX and "frequency deviation/datarate" in TX. This is described in ([[MM002-xx-EU datasheet#Reference|sx1272 datasheet]])<br />
<br />
First we setup the Module A and start a continuous RX, then we can setup the Module B.<br />
<br />
<br><br />
<br />
'''Module A'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFRX=SET,FSK,868100000,125000,1200 <br />
OK<br />
| <br />
:Set some RX parameters.freq 868100000,Bandwith 125 000, Datarate 1200<br />
|-<br />
| <br />
AT+RFRX=CONTRX<br />
OK<br />
| <br />
:Start a Continuous RX<br />
|-<br />
| <br />
…..<br />
| <br />
:Wait RX (set module B)<br />
|-<br />
| <br />
+RFRX: -78.00,3.00,0,152987007,CAFE <br />
| <br />
:receive 0xCAFE hexa frame, rssi -78, snr 3, at timestamp 152987007 ms<br />
|-<br />
| <br />
AT+RFRX=STOP<br />
| <br />
:Stop continuous Rx<br />
|} <br />
'''Module B'''<br />
<br />
{| border="0"<br />
|-<br />
| <br />
AT+RF=ON<br />
OK<br />
| <br />
:Set the RF ON<br />
|-<br />
| <br />
AT+RFTX=SET,FSK,868100000,14,,1200,,,,50000<br />
OK<br />
| <br />
:set Tx modulation FSK, freq 868100000, Tx power 14dbm, Datarate 1200, Deviation Frequency 50 000<br />
|-<br />
| <br />
AT+RFTX=SNDBIN,CAFE,1<br />
OK<br />
| <br />
:send 0xCAFE hexa frame 1 time<br />
|-<br />
| <br />
…..<br />
| <br />
:<br />
|} <br />
<br><br />
<br />
== AT LoRa™WAN (MAC) commands ==<br />
<br />
---- <br />
3 types of AT strings are specified:<br />
<br />
* MAC commands: AT+MAC=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* MAC solicited responses: +MAC: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to MAC commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the MAC command and the OK response.<br />
* MAC unsolicited responses: +MAC: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the MAC command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+MAC=? to know the current MAC mode (ABP or OTAA, Class A or C).<br />
* AT+MAC=OFF and AT+MAC=ON,… to change the MAC mode.<br />
* AT+MAC=DEVADRR and unsolicited +MAC: DEVADDR,… to know the current state of an OTAA device.<br />
* AT+MAC=SNDBIN,… to send uplink frame.<br />
* +MAC: RCVBIN,… when receiving downlink frames and to know Rx windows termination.<br />
<br />
All other commands are not really required, they are mainly used by NemeusATK Java application to manage the LoRa™WAN layer (for IOT purpose, device provisioning …).<br />
<br />
<br><br />
----<br />
=== AT+MAC=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+MAC= HELP<br />
+MAC: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+MAC: &lt;cmd&gt; are ON,OFF,?,SCH,RCH,SDR,RDR,STI,RTI,SRX2,RRX2,SNDTXT,SNDBIN,RCVTXT,RCVBIN,STOPRCV,SNDLCR,DEVUID,DEVADDR,APPUID,APPKEY,NSKEY,APPSKEY<br />
+MAC: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=ON, === <br />
This command is used to start LoRa™WAN layer and is mandatory in order to use most of MAC commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
&lt;minor_ver&gt; can be 1 or 3 (default is 3 for LoRa™WAN V1.0). V1 is no more maintained.<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;otaa&gt; is 0 for ABP and 1 for OTAA.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
Start LoRa™WAN layer in class A with OTAA:<br />
<br />
AT+MAC=ON,3,A,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=OFF ===<br />
<br />
Stop LoRa™WAN layer.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
<br><br />
----<br />
=== AT+MAC=? ===<br />
<br />
Read current LoRa™WAN layer status.<br />
<br />
To change LoRa™WAN layer status, AT+MAC=OFF and AT+MAC=ON,… must be performed.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;state&gt;,&lt;minor_ver&gt;,&lt;class&gt;,&lt;ch_pages&gt;,&lt;ism_band&gt;,&lt;otaa&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;minor_ver&gt; can be '''V'''1 or '''V'''3 (default is 3 for LoRa™WAN V1.0).<br />
<br />
&lt;class&gt; is A or C.<br />
<br />
&lt;page&gt; is the number of pages of 16 channels available at LoRa™WAN layer (in terms of memory space).<br />
<br />
&lt;ism_band&gt; is 4 for EU433MHz, 7 for China779-787MHz, 8 is EU863-870MHz and 9 for US902-928MHz. ISM band can’t be modified dynamically, it is set at compilation time.<br />
<br />
&lt;otaa&gt; is 0 or 2 for ABP and 1 for OTAA (2 means ABP, and OTAA is not supported by the module).<br />
<br />
<br><br />
<br />
==== Example ====<br />
<br />
A class A US902-928MHz device with 80 channels (5*16) which doesn’t support OTAA:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,5,9,2<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application).<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC=SNDBIN,1A2B3C,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVBIN, === <br />
Register for receiving downlink frames on specified port, payload is output as binary hexa string.<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVBIN,&lt;port&gt;,&lt;more&gt;,&lt;binarypayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
The RCVBIN unsolicited response is always sent after a Tx, even if no frame has been received. It indicates the end of Rx windows.<br />
<br />
For a class A device, it is sent when a downlink frame has been received or at the end of the Rx window 2 (if no downlink frame has been received).<br />
<br />
For a class C device, it is sent when a downlink frame has been received or at the end of the Rx window 1 (if no downlink frame has been received).<br />
<br />
If the Tx was in ack mode, the RCVBIN is sent before the OK (or ERROR NOACK) response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
If the Tx was in unack mode, the RCVBIN is sent after the OK response of the Tx (SNDBIN or SNDTXT command).<br />
<br />
==== Example ====<br />
AT+MAC= RCVBIN,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVBIN,2,true,1A2B3C4D,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC=SNDTXT, === <br />
It is the same command as AT+MAC=SNDBIN except that the payload is interpreted as text and is transmitted as received on serial link (no translation from hexa ASCII to hexa binary is performed).<br />
<br />
Text frame transmission.<br />
<br />
If &lt;mode&gt; value is 0 then the frame is sent in unacknowledged mode (default value when mode is omitted).<br />
<br />
If &lt;mode&gt; value is &gt; 0, then the frame is sent in acknowledged mode.<br />
<br />
&lt;nbrepeat&gt; specifies the number of repetitions in acknowledged mode (0 when omitted). In unacknowledged mode nbrep is used instead (see AT+MAC=RDR command).<br />
<br />
If &lt;port&gt; is omitted then port 2 is used by default (port 1 is reserved to embedded generic application)<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and frame has been successfully sent (and acked if acked mode was requested).<br />
<br />
ERROR if MAC is OFF or frame has not been successfully sent (or not acked after repetitions if acked mode was requested).<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
ERROR also when port is reserved regarding LoRa™WAN standard.<br />
<br />
==== Unsolicited responses ====<br />
<br />
The unsolicited responses below are sent when AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
This unsolicited response can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if no channel was free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
<br><br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
Sent for each enabled channel.<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+MAC= SNDTXT,HELLO WORLD,3,1,0<br />
+MAC: SND,4355<br />
+MAC: SND,0<br />
+MAC: RCH,0,,,,,4480,0<br />
+MAC: RCH,1,,,,,4480,0<br />
+MAC: RCH,2,,,,,4480,0<br />
OK<br />
On duty cycle expiry (4480 ms after the Tx), channels become available:<br />
+MAC: RCH,0,,,,,0,0<br />
+MAC: RCH,1,,,,,0,0<br />
+MAC: RCH,2,,,,,0,0<br />
<br><br />
----<br />
=== AT+MAC=RCVTXT, === <br />
Register for receiving downlink frames on specified port, payload is output as text string (translation to binary hexa string is not performed).<br />
<br />
'''This command is no more required because all downlink frames are routed on serial link except when the port is used by an embedded application.'''<br />
<br />
'''By default, downlink payload are processed as binary payload, thus if the AT client application needs to receive the payload as text (without any binary hexa string translation), it must uses this command.'''<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid and free.<br />
<br />
ERROR if MAC is OFF or port is invalid or port is already used by an embedded application.<br />
<br />
==== Unsolicited Response ====<br />
<br />
+MAC: RCVTXT,&lt;port&gt;,&lt;more&gt;,&lt;textpayload&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
When &lt;more&gt; is true, it means that more downlink frames are pending in MAC server. If piggyback setting is disabled and device class is A, LoRa™WAN layer will automatically poll the server to receive more downlink frames.<br />
<br />
==== Example ====<br />
AT+MAC= RCVTXT,2<br />
OK<br />
<br />
Then when a frame is received on port 2 and more downlink frames are pending:<br />
<br />
+MAC: RCVTXT,2,true,HELLO WORLD,-43.00,7.00<br />
<br><br />
----<br />
=== AT+MAC= STOPRCV, === <br />
Unregister for receiving downlink frames on specified port.<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and port is valid.<br />
<br />
ERROR if MAC is OFF or port is invalid.<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+MAC=SNDLCR, === <br />
Send a Link Check Request.<br />
<br />
&lt;nbrepeat&gt; = 0 means the LCR message is sent in unack mode on port 0.<br />
<br />
&lt;nbrepeat&gt; != 0 means the LCR message is sent in ack mode on port 0 with &lt;nbrepeat&gt; transmissions.<br />
<br />
==== Response ====<br />
<br />
OK if MAC is ON and Link Check Answer has been received.<br />
<br />
ERROR if MAC is OFF or Link Check Answer has not been received and Tx was in unack mode.<br />
<br />
ERROR NOACK if Link Check Answer has not been received and Tx was in ack mode.<br />
<br />
ERROR also if SIGFOX™ stack is using the radio.<br />
<br />
Received data is sent back as<br />
<br />
+MAC: &lt;margin&gt;,&lt;gwcnt&gt;,&lt;rssi&gt;,&lt;snr&gt;<br />
<br />
==== Example ====<br />
AT+MAC=SNDLCR<br />
+MAC: 20,3,-45.00,8.00<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RCH,,, === <br />
Read MAC channels command.<br />
<br />
&lt;chan&gt; specifies the channel to read (all channels of the page if omitted or if 16)<br />
<br />
&lt;page&gt; specifies the channel page (all pages if omitted or if number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;unsol_evt&gt; specifies if unsolicited events are required (0 when not required). The unsolicited events inform the AT client application when a MAC parameter has been changed by the LoRa™WAN layer.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
For each channel, the following information is output:<br />
<br />
+MAC: &lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;busytime&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
&lt;chan&gt;: the channel index in the page (0 to 15).<br />
<br />
&lt;frequency&gt;: the frequency in Hz (0 means channel is disabled).<br />
<br />
&lt;mindr&gt;: minimum datarate allowed on the channel.<br />
<br />
&lt;maxdr&gt;: maximum datarate allowed on the channel.<br />
<br />
&lt;dutycycle&gt;: restricted duty cycle assigned to the channel (applies only when more restricted than ISM regulation specification).<br />
<br />
&lt;busytime&gt;: time in ms before the channel can be used again for Tx (due to duty cycle restrictions).<br />
<br />
&lt;page&gt;: channel page (0 to number of available pages returned by AT+MAC=? response).<br />
<br />
&lt;rxw1freq&gt;: frequency used to open Rx window 1. 0 means same frequency as &lt;frequency&gt; parameter (available only from LoRaWAN V1.0.2, if the parameter is absent in the response, it means the firmware version is older).<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when &lt;busytime&gt; changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RCH,&lt;chan&gt;,,,,,&lt;busytime&gt;,&lt;page&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RCH<br />
+MAC: 0,868100000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 1,868300000,SF12BW125,SF7BW125,100,0,0,869525000<br />
+MAC: 2,868500000,SF12BW125,SF7BW125,100,0,0,0<br />
+MAC: 3,868850000,SF12BW125,SF7BW125,1000,0,0,0<br />
…<br />
+MAC: 15,000000000,SF12BW125,FSK50KBPS,1,0,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SCH, === <br />
Set MAC channel command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=SCH?'''''Command.<br />
<br />
&lt;dutycycle&gt; is applied only if it is more restricted than the ISM regulation specification. 1 means 100%, 10 means 10%, 100 means 1%, ...<br />
<br />
&lt;rxw1freq&gt; is available only from LoRaWAN V1.0.2<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when LoRa™WAN layer modifies a channel and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: SCH,&lt;chan&gt;,&lt;frequency&gt;,&lt;mindr&gt;,&lt;maxdr&gt;,&lt;dutycycle&gt;,&lt;page&gt;,&lt;rxw1freq&gt;<br />
<br />
==== Example ====<br />
<br />
To modify channel 0:<br />
<br />
AT+MAC=SCH,0,868100000,SF12BW125,SF7BW125,100,0,0<br />
OK<br />
<br><br />
----<br />
<br />
=== AT+MAC= RDR ===<br />
<br />
Read current MAC datarate command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band firmware<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current datarate changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RDR,&lt;dr&gt;,&lt;txpwr&gt;,&lt;chanmask&gt;,&lt;chanmaskctrl&gt;,&lt;nbrep&gt;,&lt;eirp&gt;,&lt;updwell&gt;,&lt;dwdwell&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RDR<br />
+MAC: SF12BW125,11,001F,0,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDR, === <br />
Set MAC data rate command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
Set the data rate, Tx power and number of repetitions for uplink transmission (applied to all channels compatible with the datarate). &lt;nbrep&gt; applies only to unconfirmed transmissions.<br />
<br />
&lt;chanmask&gt; and &lt;chanmaskctrl&gt; specify the channels usable for uplink access.<br />
<br />
The parameter list can be found by '''''AT+MAC=SDR?'''''Command.<br />
<br />
&lt;eirp&gt;, &lt;updwell&gt; and &lt;dwdwell&gt; parameters are present only in case of Asian band.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify current datarate:<br />
<br />
AT+MAC=SDR,SF12BW125,10,001F,0,0<br />
<br />
<br><br />
<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RTI ===<br />
<br />
Read MAC Time Information command.<br />
<br />
Read common channel time information.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current time info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RTI,&lt;rxw1&gt;,&lt;''rxw2''&gt;,&lt;symbtimeout&gt;<br />
<br />
==== Example ====<br />
AT+MAC= RTI<br />
+MAC: 1000,2000,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC= STI, === <br />
Set MAC time information command.<br />
<br />
Only modified parameter can be specified.<br />
<br />
Written parameters are not saved in file system, thus they are lost after a new MAC OFF/ON or a device reset.<br />
<br />
The parameter list can be found by '''''AT+MAC=STI?'''''Command.<br />
<br />
The parameters &lt;rxw1&gt; and &lt;symbtimeout&gt; are common to all channels.<br />
<br />
The &lt;''rxw2''&gt; parameter is no more used because &lt;''rxw2''&gt; value is set to &lt;rxw1&gt; value + 1000 ms. It is still present for compatibility with old devices.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To modify time info:<br />
<br />
AT+MAC=STI,1000,,6<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RRX ===<br />
<br />
Read MAC Rx information command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when current Rx info changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RRX,&lt;rx2frequency&gt;,&lt;rx2dr&gt;,&lt;rx1droffset&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RRX<br />
+MAC: 869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SRX, === <br />
Set MAC Rx information command.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SRX?'''''Command.<br />
<br />
The parameters are common to all channels.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are syntactically correct.<br />
<br />
==== Example ====<br />
<br />
To modify Rx parameters:<br />
<br />
AT+MAC=SRX,869525000,SF9BW125,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RSW ===<br />
<br />
This command is used to read the current LoRa™ and FSK synchro words used by LoRa™WAN layer. Synchro words are in hexadecimal format.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;LoRa™ sync_word&gt;,&lt;FSK sync_word&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RSW<br />
+MAC: 34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SSW, === <br />
This command is used to set the synchro words used by LoRa™WAN layer.<br />
<br />
Only modified parameters can be specified.<br />
<br />
A synchro word is unchanged when related parameter is absent.<br />
<br />
Synchro words are in hexadecimal.<br />
<br />
The parameter list can be found by '''''AT+MAC=SSW?'''''Command.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct or omitted.<br />
<br />
ERROR if FSK synchro word is too long (6 bytes/12 hexa digits max) or number of digits is not even.<br />
<br />
==== Example ====<br />
AT+MAC=SSW,34,C194C1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RVAR ===<br />
<br />
This command is used to read the miscellaneous LoRa™WAN variables.<br />
<br />
This variables are Tx/Rx counters, aggregated DC and data encryption.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;txcounter&gt;,&lt;rxcounter&gt;,&lt;aggregateddc&gt;,&lt;encryption&gt;<br />
<br />
&lt;aggregateddc&gt; values: 1 means 100%, 10 means 10%, 100 means 1%, …<br />
<br />
&lt;encryption&gt; values: 0 means no encryption, != 0 means encryption enabled.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent only when current aggregated DC changes and AT client application has registered to receive unsolicited events (see AT+MAC=RCH command).<br />
<br />
+MAC: RVAR,,,&lt;aggregateddc&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RVAR<br />
+MAC: 0,0,1,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SVAR, === <br />
This command is used to set some LoRa™WAN variables.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SVAR?'''''Command.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
<br />
To disable encryption:<br />
<br />
AT+MAC=SVAR,,,0<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RADR ===<br />
<br />
This command is used to read the current LoRa™WAN ADR, piggyback and back-off states.<br />
<br />
'''The ack mode retransmission back-off procedure was initially linked to ADR bit. When ADR bit was on/off, the back-off procedure was on/off. From now, the back-off procedure is linked to the back-off state, it allows to enable ADR bit without enabling the back-off procedure. If &lt;backoff&gt; parameter is absent in RADR response, it means that back-off procedure is still linked to ADR bit (older firmware version).'''<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+MAC: &lt;adr&gt;,&lt;piggyback&gt;,&lt;backoff&gt;<br />
<br />
&lt;adr&gt;, &lt;piggyback&gt; and &lt;backoff&gt; values: true or false.<br />
<br />
==== Example ====<br />
AT+MAC=RADR<br />
+MAC: true,false,false<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SADR, === <br />
This command is used to set some LoRa™WAN ADR and piggyback states.<br />
<br />
Only modified parameters can be specified.<br />
<br />
The parameter list can be found by '''''AT+MAC=SADR?'''''Command.<br />
<br />
When ADR state value is changed, ADR ack counter is reset.<br />
<br />
==== Response ====<br />
<br />
OK if parameters are correct.<br />
<br />
==== Example ====<br />
<br />
To enable piggyback:<br />
<br />
AT+MAC=SADR,,true<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVUID ===<br />
<br />
Read device unique identifier.<br />
<br />
Device UID is coded on 8 bytes.<br />
<br />
''This command obsoletes AT+MAC=DEVUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
UID is returned as<br />
<br />
+MAC: &lt;devuid&gt;,&lt;rand_seed&gt;,&lt;read_only&gt;<br />
<br />
When read_only value is 1, it means that the device unique identifier is built from Nemeus 36 bits OUI (70B3D5326xxxxxxx). In this case the device UID can’t be modified and the security keys are not readable.<br />
<br />
==== Example ====<br />
AT+MAC=RDEVUID<br />
0010203,306A0327,1<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SDEVUID, === <br />
This command is used to modify device UID.<br />
<br />
Device UID must be writable.<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devuid&gt; length is 16 characters and device UID is writable.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RDEVADDR ===<br />
<br />
Read device address.<br />
<br />
''This command obsoletes AT+MAC=DEVADDR command.''<br />
<br />
''Old command still works and returns the same solicited response.''<br />
<br />
''Warning: unsolicited response changed, old one is no more sent!!!''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Address is returned as<br />
<br />
+MAC: &lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
In ABP mode, the device address is the 4 LSB of the device unique identifier.<br />
<br />
In OTAA mode, the device address is assigned by the network.<br />
<br />
==== Unsolicited response ====<br />
<br />
The unsolicited response below is sent when device is in OTAA mode and at least one AT+MAC=? command has been sent.<br />
<br />
+MAC: RDEVADDR,&lt;devaddr&gt;,&lt;networkid&gt;<br />
<br />
==== Example ====<br />
<br />
Read device address of an OTAA device when not yet joint to network:<br />
<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
<br />
After receipt of valid join accept, unsolicited response is sent:<br />
<br />
DEVADDR,0870C367,010203 <br />
<br><br />
----<br />
=== AT+MAC=SDEVADDR, === <br />
This command is used to modify device address when ABP mode is used.<br />
<br />
If MAC layer is on in ABP mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;devaddr&gt; length is 8 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SDEVADDR,01020304<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPUID ===<br />
<br />
Read application Unique ID.<br />
<br />
Application UID is coded on 8 bytes.<br />
<br />
By default it is set to 0000000000000000.<br />
<br />
It can be modified by sending the following AT command:<br />
<br />
AT+GA=DIND,1,8301000008xxxxxxxxxxxxxxxx0000<br />
<br />
Where xxxxxxxxxxxxxxxx is the new application UID LSB first.<br />
<br />
MAC layer must be restarted to take into account new application UID (AT+MAC=OFF and AT+MAC=ON).<br />
<br />
Application UID can also be modified using AT+MAC=SAPPUID,&lt;app_uid&gt;.<br />
<br />
''This command obsoletes AT+MAC=APPUID command.''<br />
<br />
''Old command still works and returns the same response.''<br />
<br />
==== Response ====<br />
<br />
Always OK<br />
<br />
Application UID is returned as<br />
<br />
+MAC: &lt;appuid&gt;<br />
<br />
==== Example ====<br />
<br />
Read default application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: 0000000000000000<br />
OK<br />
<br />
Set application UID to FEDCBA9876543210:<br />
<br />
0000<br />
OK<br />
<br />
Restart MAC layer:<br />
<br />
AT+MAC=OFF<br />
OK<br />
AT+MAC=ON<br />
OK<br />
<br />
Read new application UID:<br />
<br />
AT+MAC=RAPPUID<br />
+MAC: FEDCBA9876543210<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=SAPPUID, === <br />
This command is used to modify application UID.<br />
<br />
If MAC layer is on in OTAA mode, a MAC off/on is automatically performed.<br />
<br />
==== Response ====<br />
<br />
OK if &lt;appuid&gt; length is 16 characters.<br />
<br />
==== Example ====<br />
AT+MAC=SAPPUID,0102030405060708<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPKEY ===<br />
<br />
Read application key.<br />
<br />
Application Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPKEY command.''<br />
<br />
''Old command still works and returns the &lt;appkey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application key is returned as<br />
<br />
+MAC: &lt;appkey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPKEY<br />
+MAC: A8FA642E2E3245BB9B8CAC7E2456EF3C<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPKEY<br />
+MAC: 3CEF56247EAC8C9BBB45322E2E64FAA8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RNSKEY ===<br />
<br />
Read Network Session Key.<br />
<br />
Network Session Key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=NSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=NSKEY command.''<br />
<br />
''Old command still works and returns the &lt;nskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Network session key is returned as<br />
<br />
+MAC: &lt;nskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RNSKEY<br />
+MAC: A8F1642E2E32453B9B8CAC7C2456EF72<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=NSKEY<br />
+MAC: 72EF56247CAC8C9B3B45322E2E64F1A8<br />
OK<br />
<br><br />
----<br />
=== AT+MAC=RAPPSKEY ===<br />
<br />
Read application session key.<br />
<br />
Application session key is coded on 16 bytes.<br />
<br />
The byte order is the one you can use when you to register the key at network side.<br />
<br />
It has been reversed compared to old AT+MAC=APPSKEY response.<br />
<br />
This command is available only when device unique identifier is not read only.<br />
<br />
''This command obsoletes AT+MAC=APPSKEY command.''<br />
<br />
''Old command still works and returns the &lt;appskey&gt; in reverse order.''<br />
<br />
==== Response ====<br />
<br />
OK when device UID is writable.<br />
<br />
ERROR when device UID is read only.<br />
<br />
Application session key is returned as<br />
<br />
+MAC: &lt;appskey&gt;<br />
<br />
==== Example ====<br />
AT+MAC=RAPPSKEY<br />
+MAC: A8FA672E2E4245BB9ECCCA7E64F54C38<br />
OK<br />
<br />
Old command still returns:<br />
<br />
AT+MAC=APPSKEY<br />
+MAC: 384CF5647ECACC9EBB45422E2E67FAA8<br />
OK<br />
<br><br />
----<br />
=== Informative examples ===<br />
==== Device start ====<br />
<br />
AT client application can detect a device start or restart when the unsolicited response +DEBUG: START,&lt;version&gt; is received. Depending on initialization timing, AT client application is not sure to receive this unsolicited response, that’s the reason why it is recommended that AT client application use AT+MAC=? command to synchronize with the device.<br />
<br />
<br><br />
<br />
<u>'''OTAA case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,1 <br />
OK<br />
AT+MAC=RDEVADDR<br />
+MAC: 00000000,000000 <br />
OK<br />
+MAC: RDEVADDR,0870C367,010203 <br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<u>'''ABP case:'''</u><br />
<br />
<br><br />
<br />
+DEBUG: START,Nemeus-mm002-MASTER_NEMEUS_15W39-data-manager<br />
AT+MAC=?<br />
+MAC: ON,V3,A,1,8,0 <br />
OK<br />
<br />
The device is ready to send uplink frames.<br />
<br />
<br><br />
<br />
<br><br />
<br />
==== Send unconfirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''No downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
AT+MAC=SNDBIN,,0,2,0 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
==== Send confirmed binary frame ====<br />
<br />
<br><br />
<br />
<u>'''Ack received, no downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,0,false,,-60.00,7.00 <br />
OK <br />
<br />
<u>'''Ack not received:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,,0.00,0.00 <br />
ERROR NOACK <br />
<br />
<u>'''One downlink frame:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,false,DECA,-85.00,7.00 <br />
OK <br />
<br />
<u>'''Two downlink frames and piggyback is not set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
<br />
<u>'''Two downlink frames and piggyback is set:'''</u><br />
<br />
AT+MAC=SNDBIN,CAFE,0,2,1 <br />
+MAC: RCVBIN,2,true,DECA,-55.00,10.00 <br />
OK <br />
AT+MAC=SNDBIN,,0,2,1 <br />
+MAC: RCVBIN,2,false,DEFC,-73.00,9.00 <br />
OK <br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
<br><br />
<br />
== AT SIGFOX™ commands ==<br />
<br />
---- <br />
These commands are available only on Nemeus modules embedding SIGFOX™ library. If the library is not embedded then ERROR is returned.<br />
<br />
3 type of AT strings are specified:<br />
<br />
* SF commands: AT+SF=&lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;.<br />
* SF solicited responses: +SF: &lt;param1&gt;,…,&lt;paramN&gt;. These responses are sent in response to SF commands, just before the OK response, that’s the reason why the &lt;cmd&gt; is not present in the solicited responses. Several solicited responses may be sent between the SF command and the OK response.<br />
* SF unsolicited responses: +SF: &lt;cmd&gt;,&lt;param1&gt;,…,&lt;paramN&gt;. These responses are not necessarily sent between the SF command and the OK response, that’s the reason why the &lt;cmd&gt; is present in the unsolicited responses.<br />
<br />
When an AT client application just need to send and receive frames, the following commands are used:<br />
<br />
* AT+SF=? to know the current SIGFOX™ layer state.<br />
* AT+SF=OFF and AT+SF=ON to stop and start SIGFOX™ layer.<br />
* AT+SF=SNDBIN,… to send uplink frame.<br />
* AT+SF=SNDBIT,… to send uplink bit.<br />
* AT+SF=SNDOOB to send uplink out of band message (keep alive messages).<br />
* +SF: RCVBIN,… when receiving downlink frames.<br />
<br />
All other commands are not really required, they are mainly used to configure SIGFOX™ layer and to perform SIGFOX™ qualification tests.<br />
<br />
SIGFOX™ proprietary AT command set is also supported but not described in this document.<br />
<br />
<br><br />
----<br />
=== AT+SF=HELP ===<br />
<br />
This commandis used to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+SF=HELP<br />
+SF: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+SF: &lt;cmd&gt; are ON,OFF,?,SNDBIN,SNDBIT,SNDOOB,SREP,RREP,STXF,RTXF,SRXF,RRXF,STXP,RTXP<br />
+SF: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+SF=ON ===<br />
<br />
This command is used to start SIGFOX™ layer and is mandatory in order to use most of SF commands listed in this section (unless otherwise stated).<br />
<br />
If Radio stack was ON, it is automatically set to OFF.<br />
<br />
==== Response ====<br />
<br />
If LoRa™WAN stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=ON<br />
OK<br />
<br><br />
----<br />
=== AT+SF=OFF ===<br />
<br />
Stop SIGFOX™ layer.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ stack is using the radio ERROR is returned.<br />
<br />
Else OK is returned.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=OFF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=? ===<br />
<br />
Read current SIGFOX™ layer status.<br />
<br />
==== Response ====<br />
<br />
If SIGFOX™ library is embedded OK is returned.<br />
<br />
Else ERROR is returned.<br />
<br />
+SF: &lt;state&gt;,&lt;NMS_lib_ver&gt;,&lt;SFX_lib_ver&gt;,&lt;dev_id&gt;,&lt;initial_pac&gt;<br />
<br />
&lt;state&gt; is ON, OFF or DUAL. DUAL means that LoRa™WAN and SIGFOX™ stacks are both ON.<br />
<br />
&lt;NMS_lib_ver&gt; is the version of Nemeus library used to communicate with SIGFOX™ network.<br />
<br />
&lt;SFX_lib_ver&gt; is the version of SIGFOX™ library.<br />
<br />
&lt;dev_id&gt; is the device unique identifier on SIGFOX™ network.<br />
<br />
&lt;initial_pac&gt; is the first Portability Access Code used to register the device on SIGFOX™ network. It is used one time for first registration.<br />
<br />
==== Example ====<br />
<br />
<br><br />
<br />
AT+SF=?<br />
+SF: ON,NMS-SFX-LIB-1.2,UDL1-1.6.0,000ABCDE,0123456789ABCDEF<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SNDBIN, === <br />
Binary frame transmission.<br />
<br />
If &lt;ack&gt; value is 0 then the frame is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the frame is sent in acknowledged mode.<br />
<br />
The frame is sent when channel becomes free regarding duty cycle limitations.<br />
<br />
<br><br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIN,CAFE,1<br />
+SF: SND,4576<br />
+SF: SND,0<br />
+SF: 6282<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDBIT, === <br />
Bit transmission.<br />
<br />
If &lt;ack&gt; value is 0 then the bit is sent in unacknowledged mode (default value when &lt;ack&gt; is omitted).<br />
<br />
If &lt;ack&gt; value is 1, then the bit is sent in acknowledged mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it is used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent (and acked if ack mode was requested).<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent (or not acked after repetitions if ack mode was requested).<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
The unsolicited response below is sent when ack mode was requested.<br />
<br />
+SF: RCVBIN,&lt;binpayload&gt;,&lt;rssi&gt;<br />
<br />
<br><br />
<br />
==== Example ====<br />
AT+SF=SNDBIT,0,1<br />
+SF: SND,6422<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
+SF: RCVBIN,0123456789ABCDEF,-85.00<br />
<br><br />
----<br />
=== AT+SF=SNDOOB ===<br />
<br />
Out Of Band message transmission.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;time_on_air&gt; is sent just before the solicited response OK. The time on air is in ms, it can be used by client application to manage duty cycle.<br />
<br />
OK if SIGFOX™ layer is ON and frame has been successfully sent.<br />
<br />
ERROR if SIGFOX™ layer is OFF or frame has not been successfully sent.<br />
<br />
==== Unsolicited responses ====<br />
<br />
An indication about Tx date:<br />
<br />
+SF: SND,&lt;busytime&gt;<br />
<br />
&lt;busytime&gt; is in ms.<br />
<br />
It can be sent 2 times:<br />
<br />
* One time with busytime &gt; 0 if Tx subband was not free due to duty cycle restriction<br />
* One time with busytime = 0 at Tx time.<br />
<br />
==== Example ====<br />
AT+SF=SNDOOB<br />
+SF: SND,3987<br />
+SF: SND,0<br />
+SF: 4589<br />
OK<br />
<br><br />
----<br />
=== AT+SF=RREP ===<br />
<br />
Read Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;repeat&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 2 repetitions.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RREP<br />
+SF: 2<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SREP, === <br />
Set Tx repetitions used in acked mode.<br />
<br />
==== Response ====<br />
<br />
Default value is 2 repetitions.<br />
<br />
OK if number of repetitions &lt;= 2.<br />
<br />
ERROR if number of repetitions &gt; 2.<br />
<br />
==== Example ====<br />
AT+SF=SREP,1<br />
OK<br />
AT+SF=SREP,3<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXF ===<br />
<br />
Read output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 868130000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXF<br />
+SF: 868130000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXF, === <br />
Set output carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= tx_frequency &lt;= 870000000.<br />
<br />
ERROR if tx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=STXF,868200000<br />
OK<br />
AT+SF=STXF,862200000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RRXF ===<br />
<br />
Read reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;rx_frequency&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 869525000 Hz.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RRXF<br />
+SF: 869525000<br />
OK<br />
<br><br />
----<br />
=== AT+SF=SRXF, === <br />
Set reception carrier macro channel.<br />
<br />
==== Response ====<br />
<br />
OK if 863000000 &lt;= rx_frequency &lt;= 870000000.<br />
<br />
ERROR if rx_frequency is not in valid range.<br />
<br />
==== Example ====<br />
AT+SF=SRXF,869525000<br />
OK<br />
AT+SF=SRXF,869525000<br />
ERROR<br />
<br><br />
----<br />
=== AT+SF=RTXP ===<br />
<br />
Read Tx power.<br />
<br />
==== Response ====<br />
<br />
+SF: &lt;tx_power&gt; is sent just before the solicited response OK.<br />
<br />
Default value is 14 dBm.<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+SF=RTXP<br />
+SF: 14<br />
OK<br />
<br><br />
----<br />
=== AT+SF=STXP, === <br />
Set Tx power.<br />
<br />
==== Response ====<br />
<br />
OK if tx_power &lt;= 14 dBm.<br />
<br />
ERROR if tx_power &gt; 14 dBm.<br />
<br />
==== Example ====<br />
AT+SF=STXP,10<br />
OK<br />
AT+SF=STXP,20<br />
ERROR<br />
<br />
<br><br />
== AT Generic command ==<br />
<br />
---- <br />
AT Generic command can be used to activate/deactivate some generic functionalities.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8801 ===<br />
<br />
This command is use to know the status of PowerSaving.<br />
<br />
==== Response ====<br />
<br />
+GA : DIND,1,0801&lt;pwr_state&gt;<br />
<br />
Always OK.<br />
<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,8801<br />
<br />
+GA : DIND,1,080100<br />
<br />
OK.<br />
<br />
<br><br />
----<br />
=== AT+GA= DIND,1,8802&lt;pwr_state&gt; ===<br />
<br><br />
'''WARNING: CONNECT CORRECTLY THE WAKEUP PIN BEFORE ACTIVATION OF POWERSAVING'''<br />
<br><br />
This command is use to set the PowerSaving.<br />
pwr_state 00 powersaving OFF<br />
pwr_state 01 powersaving ON<br />
<br />
PowerSaving can be activated once after boot-up, and from this point will go in stop mode as soon as possible and is wake-up by RTC or Wakeup pin.<br />
Please note that once power-saving is activated, user should toggle wake-up pin before sending an AT command.<br />
<br />
If the module is reset, the powersaving is set back to OFF. So User should ensure setting it to ON after any reset<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+GA= DIND,1,880201<br />
<br />
OK<br />
<br />
<br><br />
----<br />
<br />
== AT debug command ==<br />
<br />
---- <br />
AT debug command can be used to activate/deactivate some debug functionalities.<br />
<br />
<br><br />
----<br />
=== AT+DEBUG= HELP ===<br />
<br />
This commandis use to know the list of sub-commands.<br />
<br />
==== Response ====<br />
<br />
OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= HELP<br />
+DEBUG: &lt;cmd&gt;,&lt;param_1&gt;,…,&lt;param_N&gt;<br />
+DEBUG: &lt;cmd&gt; are MVER,MVOFF,MVON,MV?,MEOFF,MEON,ME?,MPOFF,MPON,MP?,RREAD,RWRITE<br />
+DEBUG: &lt;cmd&gt;? Lists parameters of &lt;cmd&gt; if any<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG=MVER ===<br />
<br />
Read Mcu software version.<br />
<br />
Furthermore, when the device boots the software version is sent as an unsolicited response:<br />
<br />
+DEBUG: START,&lt;version&gt;<br />
<br />
This unsolicited response can be used to detect a reset of the device.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: MVER,&lt;version&gt;<br />
<br />
==== Example ====<br />
<br />
AT boot:<br />
<br />
+DEBUG: START,Nemeus 1.x<br />
<br />
When requested:<br />
<br />
AT+DEBUG= MVER<br />
+DEBUG: MVER,Nemeus 1.x<br />
OK<br />
<br />
<br><br />
<br />
<br><br />
----<br />
=== AT+DEBUG= MVOFF ===<br />
<br />
Disable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MVON ===<br />
<br />
Enable Mcu Verbose print on the UART<br />
<br />
==== Response ====<br />
<br />
OK if software is compiled with debug traces.<br />
<br />
ERROR if software is compiled without debug traces.<br />
<br />
==== Example ====<br />
AT+DEBUG= MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MV? ===<br />
<br />
Read current verbose mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;verbose&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MV?<br />
+DEBUG: MVON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEOFF ===<br />
<br />
Disable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MEON ===<br />
<br />
Enable UART echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= ME? ===<br />
<br />
Read current echo mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;echo&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= ME?<br />
+DEBUG: MEON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPOFF ===<br />
<br />
Disable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPOFF<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MPON ===<br />
<br />
Enable the sending of shell prompt on UART.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
==== Example ====<br />
AT+DEBUG= MPON<br />
OK<br />
<br><br />
----<br />
=== AT+DEBUG= MP? ===<br />
<br />
Read current prompt mode.<br />
<br />
==== Response ====<br />
<br />
Always OK.<br />
<br />
+DEBUG: &lt;prompt&gt;<br />
<br />
==== Example ====<br />
AT+DEBUG= MP?<br />
+DEBUG: MPON<br />
OK</div>Lcshttps://wiki.nemeus.fr/index.php?title=NIS-UL_UltraSonic_Sensor&diff=197NIS-UL UltraSonic Sensor2017-11-24T09:14:35Z<p>Lcs: </p>
<hr />
<div>[[Category:Sensors]]<br />
[[File:MS006-overview.jpeg|thumb|400px|Ultrasonic sensor]]<br />
<br />
= General information =<br />
{{:NIS Overview}}<br />
<br />
= Mechanics =<br />
* Dimensions 60 x 95 x 85mm (109mm including fixing brackets)<br />
* 96mm spacing between brackets<br />
* IP 65<br />
* Solid ABS & PC material<br />
<br />
= WARNING =<br />
This sensor is not designed for critical purposes.<br />
It should never be used in an application where a malfunction of the device could cause personal injury. <br />
Due to ultrasonic physics, we can not guarantee 100% reliability at close distances.<br />
<br />
= Ultrasonic sensor properties =<br />
Default configuration allows target detection until 6 meters.<br />
<br />
Objects from 0cm to 20cm range are reported as 20cm.<br />
<br />
The acoustic detection pattern has an angle of 7°. <br />
The geometry of the detection pattern depends mainly on the size, orientation, and acoustic properties of the target, but also on the atmospheric pressure, temperature and humidity.<br />
<br />
Each sensor is factory calibrated to unify results between sensors.<br />
<br />
= Magnetic Switch Protocol description =<br />
{{:NIS Generic Magnetic Switch Protocol}}<br />
<br />
= Radio frames description =<br />
{{:NIS Generic Application Protocol}}<br />
<br />
== Uplink data Frame format ==<br />
<br />
<span style="color:#FF0000">'''Note :''' Frame format of sensors delivered before 1st of November 2017 can be found [[NIS-UL UltraSonic Sensor - Frame Format v0.x|here]] </span> <br />
<br><br><br />
The uplink payload contains multiple fields:<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Bit 7 is always to 1 because the mask is never extended on next byte. Least significant bit (bit 0) indicates the presence of <usonic_dist> field, bit 1 indicates the presence of <voltage>, bit 2 indicates the presence of <temp>. <br />
<br />
Whatever the <mask> value, the field <nb_meas> follows it and applies to all measures. Thus, the frame starts with <mask><nb_meas>.<br />
: <nb_meas>: 1 byte containing the number of measures which follow.<br />
if (mask.bit0 == 1) :<br />
: <usonic_dist>: 2*<nb_meas> bytes containing the distances measured by the ultrasonic sensor in centimeters (1 to 600 cm in big endian).<br />
if (mask.bit1 == 1) :<br />
: <voltage>: 2*<nb_meas> bytes containing the voltages measured by the sensor in millivolts (in big endian).<br />
if (mask.bit2 == 1) :<br />
: <temp>: 1*<nb_meas> bytes containing the measured temperatures (signed integer)<br />
Thus the uplink frame format is <mask><nb_meas><usonic_dist1>...<usonic_distN><voltage1>...<voltageN><temp1>...<tempN><br />
<br />
Default <mask> value is 0x85 which means that the default frame is <mask><nb_meas><usonic_dist1>...<usonic_distN><temp1>...<tempN> (the voltage is not present)<br />
<br />
Some examples (in hexadecimal):<br />
* “8502009700981f19”: the frame indicates two measurements of 151cm and 152cm followed by two temperatures of 31°C and 25°C.<br />
* “810100a0”: the frame indicates a single measurement of 160cm without temperature.<br />
* “84011e”: the frame indicates one temperature of 30°C.<br />
* “fd02009c009c1c19xxxxxxxxxxxx”: the frame indicates two measurements of 156cm and 156cm with two temperatures of 28°C and 25°C followed by private data (used for debug).<br />
<br />
== Downlink Frame format ==<br />
<br />
<span style="color:#FF0000">'''Note :''' Frame format of sensors delivered before 1st of November 2017 can be found [[NIS-UL UltraSonic Sensor - Frame Format v0.x|here]] </span> <br />
<br><br><br />
The sensor configuration contains the following fields:<br />
<br />
* <up_frame_mask>: the mask identifying the different fields present in uplink frames (possible values are described in “Uplink data Frame format” section)<br />
* <nb_meas_for_tx>: the number of measures required to trigger a transmission (possible values are [1..8]<br />
* <meas_period>: the period of the measures in <perdiod_unit> seconds(possible values are [600..65535]<br />
* <period_unit>: the unit of <meas_period> in seconds, the resulting period is <meas_perios>*<period_unit> seconds<br />
<br />
It is possible to change the sensor configuration using the Nemeus downlink protocol. The downlink frame must be sent on the MS006 LoRaWAN port (8).<br />
<br />
The downlink frame has the following format:<br />
<br />
<cmd>: 1 byte containing WRITE_CFG_CMD=0x02<br />
<br />
<mask>: bit field on 1 byte indicating the presence of other fields. Most significant bit (bit7) is always to 1 because the mask is never extended on next byte. Least significant bit (bit0) indicates the presence of <up_frame_mask> field, bit1 indicates the presence of <nb_meas_for_tx>, bit2 indicates the presence of <meas_period> and bit3 indicates the presence of <period_unit><br />
<br />
If (mask.bit0 == 1):<br />
: <up_frame_mask>: 1 byte containing the uplink frame mask<br />
If (mask.bit1 == 1):<br />
: <nb_meas_for_tx>: 1 byte containing the number of measures required to trigger a transmission<br />
If (mask.bit2 == 1):<br />
: <meas_period>: 2 bytes in little endian (LSB first) containing the period of measures in seconds<br />
If (mask.bit3 == 1):<br />
: <period_unit>: 1 byte containing the unit of <meas_period> in seconds (default value is 1 second)<br />
<br />
Thus the downlink frame format is <cmd><mask><up_frame_mask><nb_meas_for_tx><meas_period><period_unit>.<br />
<br />
Some examples in hexadecimal:<br />
* “028181”: set the <up_frame_mask> to 0x81 => the next uplink frames will include the <usonic_dist> field only (no <voltage> field and no <temp> field)<br />
* “028E04605401”: set <nb_meas_for_tx> to 4, <meas_period> to 21600*<period_unit> seconds and <period_unit> to 1 second => one measure every 6 hours and one transmission every 4 measures (every day). Each uplink frame will include 4 measures<br />
<br />
== Power consumption ==<br />
<br />
<br />
Please find below a tool to calculate power consumption vs number of measures and transmissions.<br />
<br />
<br />
{{#widget:Iframe|param=https://jscalc.io/calc/7Z9r3VnBuApcPSzj|width=100%|height=800}}</div>Lcs