ElectronicCats / Beelan-LoRaWAN

A LoRaWAN library for compatible arduino board
https://www.beelan.mx
MIT License
195 stars 83 forks source link

Downlink problem #199

Closed cyberumut closed 2 months ago

cyberumut commented 2 months ago

im using example class A otaa and class C otaa but i didnt get any downlink message

network connection is workin and uplink is working but downlink not working. If I send 20 messages, it only receives 1.

Eric286 commented 2 months ago

Hello @cyberumut,

Ensure that your device is correctly set up for the class you are using (Class A or Class C). Class A can only receive downlinks immediately after an uplink, while Class C keeps a receive window open all the time.

Sometimes, downlinks fail due to mismatched frequencies or synchronization issues. Please make sure that the uplink and downlink frequencies match those set in your gateway and LoRaWAN network settings.

Also, Incorrect data rate settings or issues with the duty cycle can interfere with receiving downlink messages.

In the config.h file please enable debug options.

Have a nice day!

cyberumut commented 2 months ago

Hello @cyberumut,

Ensure that your device is correctly set up for the class you are using (Class A or Class C). Class A can only receive downlinks immediately after an uplink, while Class C keeps a receive window open all the time.

Sometimes, downlinks fail due to mismatched frequencies or synchronization issues. Please make sure that the uplink and downlink frequencies match those set in your gateway and LoRaWAN network settings.

Also, Incorrect data rate settings or issues with the duty cycle can interfere with receiving downlink messages.

In the config.h file please enable debug options.

Have a nice day!

image

` if(!lora.init()){ printf("RFM95 not detected \n"); delay(10000); return; }

lora.setDeviceClass(CLASS_C); // Set Data Rate lora.setDataRate(SF12BW500);

// set channel to random lora.setChannel(MULTI); // Put OTAA Key and DevAddress here lora.setDevEUI(devEui); lora.setAppEUI(appEui); lora.setAppKey(appKey);

// Set Callback function lora.onMessage(message);

// Join procedure bool isJoined; do { printf("Joining... \n"); isJoined = lora.join();

//wait for 10s to try again
delay(7000);

}while(!isJoined); printf("Joined to network \n");

delay(1000);

sprintf(myStr, "First Message"); 

printf("Sending: %s \n",myStr);

lora.sendUplink(myStr, strlen(myStr), 0, 1);
counter++;`

is setting true ?

cyberumut commented 2 months ago
image
Eric286 commented 2 months ago

Hello @cyberumut

Please test other data rates close to the recommended settings to find the most stable configuration.

https://github.com/ElectronicCats/Beelan-LoRaWAN/wiki/3.-Understanding-LoRaWan#set-data-rate

Tell me if this changes the behavior or if it remains the same.

Have a nice day!

Eric286 commented 2 months ago

Hello @cyberumut

Due to lack of response we will close the issue.

If you encounter any further difficulties or wish to share any feedback, please feel free to reach out to us again. We are here to assist you.

I wish you a fantastic day ahead!

Kind regards,