Problem with rak3172

Hi community,

so i have rak3172 and gateway RAK7289and i have about 5 months doing some test and learning and now lately, for some reason, it start to respond badly what i mean the code i’m using in rak3172 for the serial monitor looks fine but when i chek the log of the gateway, he isn’t responding. i thought maybe I modified something or did something wrong in the code of rak3172 so i used in the example the code of Lora_OTAA and still isnot responding, as you can see from these screenshots.



it krpt going like this , and when i press reset button in the wisblock now it sometimes show this message in the serial monitor

09:41:47.123 -> 
09:41:47.155 -> Current Work Mode: LoRaWAN.
09:42:07.151 -> Data Packet:
09:42:07.151 -> 0x74 0x65 0x73 0x74 
09:42:07.151 -> Sending is requested
09:42:10.814 -> Successfully sent
09:42:10.814 -> +EVT:SEND_CONFIRMED_OK
09:42:30.998 -> Data Packet:
09:42:30.998 -> 0x74 0x65 0x73 0x74 
09:42:31.034 -> Sending is requested
09:42:36.080 -> Sending failed
09:42:36.080 -> +EVT:SEND_CONFIRMED_FAILED(4)
09:42:56.183 -> Data Packet:
09:42:56.183 -> 0x74 0x65 0x73 0x74 
09:42:56.183 -> Sending is requested
09:43:01.012 -> Sending failed
09:43:01.012 -> +EVT:SEND_CONFIRMED_FAILED(4

The weird thing I did to work normally now isn’t working, so what could be the problem and how do I fix this problem?

Please, any help will be appreciated

Hi @skan ,

What is the FW version of your RAK3172? When you said doing some test for about 5 months, is the RAK3172 constantly transmitting?

The module suddenly switched from Unconfirmed Uplinks to Confirmed Uplinks. It should not happen like that. I need to learn more and get info on that. In addition, it appears to me that you modify the LoRaWAN_OTAA example because by default, it should transmit a confirmed uplink.

If you register the RAK3172 as a new device, will the issue you see persist? The 1st uplink appears to be sent. When you are joining, does it join immediately or there are mutiple join attempt first?

Hi @carlrowan

Thanks for the answer.

so i have RAK3172 Evolution board, and for my current situation now, i did a reset for the gateway RAK7289


Why, you may ask? Because I want first to eliminate any cause of error, and second, I did modify the WiFi connection just in order to make the gateway connect to a VM. Anyway, we have a factory reset gateway, and I did the same for RAK3172 by entering the AT command ATZ. So, to my knowledge, I eliminate any cause of error that I could have caused previously. now i did take the code of Lorawan OTAA (this time i didn’t modify it)as it is, i configured an app in the gateway

And I configured the code for the RAK3172, and now it works fine.

Thank you for your help. I realize my approach was a bit rushed—I was so desperate to get it working that I didn’t properly investigate the root cause of the issue. However, I suspect the code I used for the RAK3172 might be the problem. I did make some minor modifications in the gateway platform like this


but I’m fairly confident that wasn’t the issue since it worked fine before. The problem only appeared with the sensor devices I was using.

Just in case I encounter the same errors again, do you have any advice? Even a full reset (ATZ) didn’t resolve it last time.

Hi @skan ,

There can be different reasons why RAK3172 can behave in an strange way. It can be either hw or sw related or both.

Maybe what I can suggest right now is use the latest FW to cover most of the bugs that we have before. I wasn’t able to get the FW version you have but probably we can start on that.

hi @carlrowan

yes and now after some testing what i found that when i connected the device to the gateway I initially created two apps


one to save devices that will be linked to sensors and ones that will be linked to motors, etc…
so the problem that i was having the devices linked to pumps worked and send and received downlinks and uplinks but the devices linked to the app watersensor didn’t work properly and only joined and sent one uplink so when i removed and kept one app to test the sensor, they worked fine. Then I added the app for pumps and the other devices start malfunctioning

Now, in my final test, as shown in the picture above, I have two apps, but all devices (linked to sensors and to pumps) are connected to only one app, and everything worked fine .

so the question is why they didn’t work and is there some configuration to do or how to get it to work so the reason i’m using two apps is for organization and also it serve another purpose because i like the sensors application name different from pumps so i could manipulate them later easily

1 Like

Hi @skan ,

If you are using same credentials, it might be best to use different OTAA activation parameters on the testing application. I haven’t tested myself but if the credentials are exactly the same, it can cause conflict on the backend of the the built-in LNS.

So right now, as long as you maintain the actual app without any testing apps, it works fine right?

Hi @carlrowan
Yes, maintaining the actual app; everything works .
But I need to have two apps (sensors and pumps). I mean, the built-in LNS must be able to handle it, as it is a feature in it so regardless of testing app or not, having multiple apps with different credentials must work


and I couldn’t figure if there is some config i’m missing in the gateway platform. I mean, there must be someone who tried this and worked so i feel troubleshooting the problem is easy i just lack experience and the documentation doesn’t contain enough info to understand why

Hi @skan ,

Yes. Multiple app must work. However are these app sharing the same DEVEUI? I only see APPEUI and APPKEY setting. If ever they share same DEVEUI, that might cause the issue.

1 Like

Hi @carlrowan
No, each one has it’s device linked to it. So I told you i use the devices rak3172 either as sensor or to activate a pump. So DEVEUI of device is either saved in app sensors or app pumps

and what proves the device join and do one uplink than stop in the gateway but in serial monitor it keeps sending and saying it is successful

So just to clarify the situation and simplify it, I have three rak3172 two works as pumps and as water sensor .
My objective was to create two apps in the built-in LNS in order to first organize and second, I need it for my work .
to eliminate any cause of me causing the issue, i did factory reset of the gateway and at command ATZ for the three devices and created the two app in the gateway platform and used the OTAA_lorawan in the three devices one of the devices connect to the app WaterSensor joined successfully and sent one uplink and stopped while the two others worked fine no issue. This is shown in the gateway platform, but when I check the Arduino serial monitor for the three devices, everything looks normal and works successfully.

Works just fine for me.
2 applications, 2 devices, one device in each application:

How exactly do you create the applications and how do you add the devices?

How I did it:
a) Application setup
Add application, select Type 2 : Separate Application Key

b) Add device
Add device, enter DeviceEUI

Enter device name and AppKey

Then I reboot the devices and they join and send data.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.