File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,19 @@ void STM32LoRaWAN::maintainUntilIdle()
124
124
} while (busy ());
125
125
}
126
126
127
+ bool STM32LoRaWAN::continuousWave (uint32_t frequency, int8_t power, uint16_t timeout) {
128
+ MlmeReq_t mlmeReq;
129
+ mlmeReq.Type = MLME_TXCW_1;
130
+ mlmeReq.Req .TxCw .Frequency = frequency;
131
+ mlmeReq.Req .TxCw .Power = power;
132
+ mlmeReq.Req .TxCw .Timeout = timeout;
133
+ LoRaMacStatus_t res = LoRaMacMlmeRequest (&mlmeReq);
134
+ if (res != LORAMAC_STATUS_OK)
135
+ return failure (" Failed to enable CW mode: %s\r\n " , toString (res));
136
+
137
+ return true ;
138
+ }
139
+
127
140
bool STM32LoRaWAN::joinOTAAAsync ()
128
141
{
129
142
clear_rx ();
Original file line number Diff line number Diff line change @@ -791,6 +791,19 @@ class STM32LoRaWAN : public Stream {
791
791
792
792
// / @}
793
793
794
+ /* *
795
+ * Set the radion into continuous wave (CW) mode. In this mode radio outputs
796
+ * a signal at the specified frequency and power for the specified duration.
797
+ *
798
+ * Used only for compliance testing and antenna testing.
799
+ *
800
+ * \param frequency Frequency in Hz.
801
+ * \param power TX power level [0-15].
802
+ * \param timeout Duration in seconds.
803
+ * \returns True if CW mode was activated successfully.
804
+ */
805
+
806
+ bool continuousWave (uint32_t frequency, int8_t power, uint16_t timeout);
794
807
795
808
/* *
796
809
* @name Dummy implementations
You can’t perform that action at this time.
0 commit comments