Error message RAK11300 Module

Hi Friends.

I was doing tests with RAK11300 module and I got that message:

++ MbedOS Error Info ++
Error Status: 0x80020126 Code: 294 Module: 2
Error Message: CMSIS-RTOS error: ISR Queue overflow
Location: 0x10015BF9
Error Value: 0x2
Current Thread: application_unnamed_thread Id: 0x2000C8B4 Entry: 0x1001A025 Stac
kSize: 0x1000 StackMem: 0x2000D4F0 SP: 0x2003FEB4
For more info, visit: mbedos-error
=0x410CC601&comp=2&ver=110200&tgt=RASPBERRY_PI…

– MbedOS Error Info –

What is the cause for this error to appear?

thanks in advance

Lenin Morejon

Hello @lmorejon

What code do you use?
What is the version of your BSP?

Hi BeeGee. I have that version:

Lenin Morejon

What code are you using.
Error Message: CMSIS-RTOS error: ISR Queue overflow is an error coming from the FreeRTOS part of mBed. We are not using FreeRTOS functions in our code examples.

Thank you BeeGee,

we are testing with your examples adding our code to read meter.

Lenin

BeeGee.

I am not using Free RTOS in the sketch either

Lenin Morejon

The examples are working without any problem.
How is your code to read the meter implemented? Does the code work if you just disable the reading?

BeeGee.

to read the meter I have to send downlink message (on demand), opposite case the RAK always is sending “Hello” to TTI.

Lenin

Are you reading the meter from the lorawan_rx_handler() callback?

If yes, you should just set a flag there and read the meter from the loop() and initiate the sending from there as well.

ready BeeGee.

Please why When I configure LORAWAN_ADR_OFF the module does not receive message downlink?, the module RAK11300 receives downlink messages when LORAWAN_ADR_ON.

static lmh_param_t g_lora_param_init = {LORAWAN_ADR_ON, LORAWAN_DATERATE, LORAWAN_PUBLIC_NETWORK, JOINREQ_NBTRIALS, LORAWAN_TX_POWER, LORAWAN_DUTYCYCLE_OFF};

I have another query: my module needs receive downlink message 77 01 00 to activate a relay, and 77 02 00 to deactivate the relay. Do you have some example to do that? to add that code in lorawan_rx_handler function.

thanks in advance

Lenin Morejon

Downlinks have nothing to do with ADR. More with the device class.

In Class A LoRaWAN nodes can only receive downlinks after they sent an uplink.
In Class C LoRaWAN nodes are in receive mode always.

But some LoRaWAN servers (like Chirpstack), allow an downlink only after the node has sent at least one uplink.

For the downlink decoding, I have an example that could be adapted to your application.
This code part checks the received packet and then parses the received data:

void lorawan_rx_handler(lmh_app_data_t *app_data)
{
	Serial.printf("LoRa Packet received on port %d, size:%d, rssi:%d, snr:%d, data:%s\n",
				  app_data->port, app_data->buffsize, app_data->rssi, app_data->snr, app_data->buffer);

	for (int idx = 0; idx < app_data->buffsize; idx++)
	{
		Serial.printf("%02X", app_data->buffer[idx]);
	}
	Serial.println("");

	// Check if uplink was a send frequency change command
	if ((app_data->port == 3) && (app_data->buffsize == 6))
	{
		if (app_data->buffer[0] == 0xAA)
		{
			if (app_data->buffer[1] == 0x55)
			{
				uint32_t new_send_frequency = 0;
				new_send_frequency |= (uint32_t)(app_data->buffer[2]) << 24;
				new_send_frequency |= (uint32_t)(app_data->buffer[3]) << 16;
				new_send_frequency |= (uint32_t)(app_data->buffer[4]) << 8;
				new_send_frequency |= (uint32_t)(app_data->buffer[5]);

				Serial.printf("Received new send frequency %ld s\n", new_send_frequency);
				// Save the new send frequency
				LORAWAN_APP_INTERVAL = new_send_frequency * 1000;

				// Set the timer to the new send frequency
				xTimerStop(appTimer, 0);

				if (LORAWAN_APP_INTERVAL != 0)
				{
					xTimerChangePeriod(appTimer, LORAWAN_APP_INTERVAL / portTICK_PERIOD_MS, 0);
				}
			}
		}
	}
}

Hi BeeGee.

please can you give some help, and send me xTimerStop and xTimerChangePeriod functions?

thanks in advance

Lenin Morejon

Sorry, I copied the code snippet from the wrong example. xTimer… functions are FreeRTOS functions and I use them on the RAK4631 and RAK11200, they are not available on the RAK11300/RAK11310. On the RAK11300 the mbed::Ticker class is used.

On The RAK11300 (when using the LoRaWAN_OTAA_ABP.ino example) it would be something like:

void lorawan_rx_handler(lmh_app_data_t *app_data)
{
	Serial.printf("LoRa Packet received on port %d, size:%d, rssi:%d, snr:%d, data:%s\n",
				  app_data->port, app_data->buffsize, app_data->rssi, app_data->snr, app_data->buffer);

	for (int idx = 0; idx < app_data->buffsize; idx++)
	{
		Serial.printf("%02X", app_data->buffer[idx]);
	}
	Serial.println("");

	// Check if uplink was a send frequency change command
	if ((app_data->port == 3) && (app_data->buffsize == 6))
	{
		if (app_data->buffer[0] == 0xAA)
		{
			if (app_data->buffer[1] == 0x55)
			{
				uint32_t new_send_frequency = 0;
				new_send_frequency |= (uint32_t)(app_data->buffer[2]) << 24;
				new_send_frequency |= (uint32_t)(app_data->buffer[3]) << 16;
				new_send_frequency |= (uint32_t)(app_data->buffer[4]) << 8;
				new_send_frequency |= (uint32_t)(app_data->buffer[5]);

				Serial.printf("Received new send frequency %ld s\n", new_send_frequency);
				// Save the new send frequency
				LORAWAN_APP_INTERVAL = new_send_frequency * 1000;

				// Set the timer to the new send frequency
				appTimer.detach();

				if (LORAWAN_APP_INTERVAL != 0)
				{
					appTimer(tx_lora_periodic_handler, (std::chrono::microseconds)(LORAWAN_APP_INTERVAL * 1000));
				}
			}
		}
	}
}

Hi BeeGee. thank you very much, don´t worry I can resolve the problem and now I can say the firmware is operating perfectly, I am sending a event when the cover is removed from the energy meter (alarm), sending Frame ONLINE status every 20 seconds, read the meter with demand, in the same way to send the command to cut electrical service and restore the electrical service.

I am sending to manufactures some PCB to place in production, all information is arriving to TTI, we are developing the application to integrate the data from TTI.

thank you very mucho for all support

Lenin Morejon