RAK online compiler for you to compile your customized firmware based on RUI

Hi @fangfchen,

I’ve just sent an email to you, please check.

About “at+set_config=device:boot” in the new sample source code, it’s my fault. Actually, the source code on Github is already V3.0.12 now, and this version need the V3.0.2 bootloader, but we haven’t updated this new bootloader on our web site, i’m really sorry for that.
Now, you can download the V3.0.2 bootloader here:
https://downloads.rakwireless.com/en/LoRa/RAK811/Firmware/RUI_RAK811_BOOT_Version3_0_2.rar
And flash the bootloader into your RAK811 firstly according to our document:
https://doc.rakwireless.com/rak811-wisnode-lora-module/burning-the-bootloader-into-the-device
Then you can use the source code on Github which is V3.0.0.12 firmware of RAK811 freely.

Since yesterday I am not able to send down-link msg from Lorawan to RAK811, uplink still Ok.

see pic from sample app_RAK811, does not shows the payload msg.

What server are you sending data to?

From RakGateway in my lab.

image
It was ok to receive payload from gataway but does not reveive anymore after new bootloader and using new rui.h for generate bin file in online compiler. I thing there is a bug in the compiler.
Also I keep getting error message from function when received uplink msg, what is that mean of error? Attached function code:

It seems that your data type cannot be recognized and what you said before cannot be distributed. Have you set the node in your server to classC mode?

Hi,@fangfchen


“at+recv=A,B,C,D”:A -> port,B -> RSSI,C -> SNR,D -> datasize.
This message “at+recv=0,-40,30,0” instruction no downlink data(datasize=0).
So you need verify that the server whether send the data.

Hi,

I have followed example from app_5202.c in the RAK811 version app_RAK811.c to send data with auto sleep.
The issue is that after a successful send, the RAK811 is not entering sleep mode.
I am sending every 60 seconds, is this too short for the unit to sleep?

If I issue the AT command to make unit sleep, I get the response
“radio status is busy,can’t sleep.”

Any ideas how to make it sleep between data transmissions? What could I be missing?

Thanks,
John

Hi,@John_NZ
If lora moduel is working,for example joining or sending,the radio is busy.and can’t entry sleep.you must wait when it’s done.
app_RAK811.c currently does not support automatic send, need to do their own logic in yourself app.c.you can refer to :https://github.com/RAKWireless/Products_practice_based_on_RUI/blob/master/based%20on%20RAK811/app_5205/app_5205.c
You can compare app_5205.c and app_RAK811.c, and modify yourself app.c code.

Hi @leopold

I have already added in the logic the same way that app_5205.c is doing it.
When the message is sent, I receive the Lora call success call back and process the case, calling this code

    case RUI_AUTO_ENABLE_SLEEP:
        RUI_LOG_PRINTF("[LoRa]: Setting next event with Sleep\r\n");
        rui_lora_set_send_interval(RUI_AUTO_ENABLE_SLEEP,app_lora_status.lorasend_interval);  //start autosend_timer after send success
        rui_delay_ms(5);  
        break;

So I see,

[LoRa]: send out
[LoRa]: Confirm data send OK
[LoRa]: Setting next event with Sleep

Which means that the command
rui_lora_set_send_interval(RUI_AUTO_ENABLE_SLEEP,app_lora_status.lorasend_interval);
has been called, but the rui_lora_set_send_interval does not make unit sleep.

I don’t see what else is different with app_5205.c

Thanks,
John

Hi,@John_NZ
Can you send serial console detailed log to me?
Use the AT command “at+get_config=lora:status” to query current lora status.

Hi @leopold

OK.


==============LoRaWAN Status List================
Work Mode: LoRaWAN
Region: AS923
Send_interval: 60s
Auto send status: true.
Send_interval work at sleep
Join_mode: OTAA
DevEui: 60C5A8FFF9237205
AppEui: 60C5A8FFF9237205
AppKey: 65B994FAE3F8A68CB7A1F4A13FC70422
Class: C
Joined Network:true
IsConfirm: true
AdrEnable: true
EnableRepeaterSupport: false
RX2_CHANNEL_FREQUENCY: 923200000, RX2_CHANNEL_DR:2
RX_WINDOW_DURATION: 3000ms
RECEIVE_DELAY_1: 1000ms
RECEIVE_DELAY_2: 2000ms
JOIN_ACCEPT_DELAY_1: 5000ms
JOIN_ACCEPT_DELAY_2: 6000ms
Current Datarate: 5
Primeval Datarate: 5
ChannelsTxPower: 0
UpLinkCounter: 1
DownLinkCounter: 0
===================List End======================


Cheers,
John

HI @leopold

After the RAK has been running for about 2 hours, I start getting a Send Error of 91, which according to the documentation is RUI_LORA_STATUS_NO_CHANNEL_FOUND

Is this perhaps something to do with the unit not sleeping when it is sending ok because the radio is still busy? Maybe the radio is not finishing correctly after the send and it runs out of channels or something like that?

Cheers,
John

Hi,@John_NZ
AS923 don’t support lower DR2,so you must insure that no less than DR2.Server maybe modify it, you could query current DR by AT command “at+get_config=lora:status”.Query channel by AT command “at+get_config=lora:channel”.more AT commands could be query by AT command “at+help”.

Can you send completed test log to me?

Hi @leopold

Thank you. ADR was on and DR was down to 1. I changed DR to 2 and turned off ADR and it is now communicating to the server.
Below is the complete log of a cycle of communication, is what you wanted me to send you?

Reading 2 Temperature(s):
Temperature 1: 23
Temperature 2: 21
Done Reading Temperature(s)

[LoRa]: send out
[LoRa]: Confirm data send OK
[LoRa]: Setting next event with Sleep
at+recv=0,-61,31,0:

Hi,@John_NZ

Yes,you are right.I tested it in these two days,that subcontracting send does cause some logic problems.I have fixed it and update app_5205:https://github.com/RAKWireless/Products_practice_based_on_RUI/tree/master/based%20on%20RAK811/app_5205
Thanks for your test and feedback.

Hi @leopold

As per my above post, I set DR to 2 and turned off the ADR, however the DR still went back to 1
Is this a problem with the RAK, or is the DR ultimately controlled by the gateway/server?

Thanks,
John

Thanks, is there also an update for the app_RAK811 ?

@John_NZ,
app_RAK811 actually don’t support auto_send mode,because there is no data to send with app_RAK811.
Unless you add the data you want to send to the code and recompile it. Like as app_5205.c or app_7204.c.

@John_NZ
image
Use “at+get_config=lora:status” command to query current lora status to ensure ADR is disable.If AdrEnable is false, the DR will not be modified by the server.

“JY” + “[email protected]” + “RAK811”.