Beelan-LoRaWAN icon indicating copy to clipboard operation
Beelan-LoRaWAN copied to clipboard

Can not send/receive data using OTAA Class-C

Open PadmaIoT opened this issue 1 year ago • 35 comments

Hello, I intend to send and receive data using Class C but except for join request acceptance nothing is happening. No payload is sent and received. serial monitor says only "joining", nothing else. My all configs & details are given Below:

LoRa Config: Network Server: Chirpstack Frequency Plan: AS923 (edited in .h file to enable desired frequency plan) Mac Version: LoRaWAN 1.0.2 Revision: RP002-1.0.3 OTAA: yes Class: C

Hardware Config: MCU: Arduino Nano LoRa Chip: RA-01H (SX1276) (Hardware is ok, also tested by Class B operation using LMIC)

Code config: lora.setDeviceClass(CLASS_C); lora.setDataRate(SF9BW125); lora.setChannel(MULTI);

Pin Config: const sRFM_pins RFM_pins = { .CS = 10, .RST = 9, .DIO0 = 2, .DIO1 = 3, .DIO2 = 4, .DIO5 = 8, };

Serial monitor: Joining...

Chirpstack LoraWan frame:

image

In this situation What I can do? Can anyone guide me?

PadmaIoT avatar May 31 '23 06:05 PadmaIoT

Dear @PadmaIoT

Thank you very much for contacting us.

With the information you gave me, I will do some tests to verify that everything is correct, and in the same way, I will report anything to you.

Could you just give me more information please, for example, did you configure any gateway for your application? Did you move something else in the code? Has it worked for you before?

Have a nice day!

AndreaZGuz avatar Jun 02 '23 22:06 AndreaZGuz

Hello @AndreaZGuz

Thanks for your kind response. Here are your answers:

  1. I am using the Tektelic Kona Macro gateway where no separate settings for class C are configured, which means I changed nothing.
  2. No. I didn't move anything. Not even the payload
  3. This is the 1st time I am implementing class c. I had never used it before.

I am waiting for any breakthrough. Thanks

PadmaIoT avatar Jun 03 '23 02:06 PadmaIoT

Hi @PadmaIoT

We are now trying to replicate your issue in order to give you the best advice for you to make it work! As soon as we have any news, we will be informing you.

Thank you in advance for your patience. Have a nice weekend!

AndreaZGuz avatar Jun 09 '23 22:06 AndreaZGuz

Thanks, I am waiting for your update.

PadmaIoT avatar Jun 15 '23 04:06 PadmaIoT

Hi @PadmaIoT

My apologies for the delay in my response.

I ran some tests with the US915_0, EU868, AS923_1, and AS923_2 frequency bands and found all of them except AS923_1 (AS923) are working properly for me on ChirpStack, I just got the same performance as you. I would like to empahtize that in the dashboard, all the time the device were shown as "Active", even when the board were still "Joining" according to my Serial Monitor. I will attach a ZIP file containing screenshots of the configurations I did for every one of them, including the status of the packages sent/received, so you can see my outcomes (OTAA Evidences.zip).

You told me before that Class B worked fine. I would like to ask if there is any possibility you can try any of the tests I ran, in order to confirm maybe an issue specifically with AS923 band. Would you be able to do it?

Thanks in advance for your patience. We are keeping in touch!

AndreaZGuz avatar Jun 15 '23 19:06 AndreaZGuz

Thank you so much for the help. I was thinking to give you some debugging data of the Beelan library Class C node. See below:

SPI Write ADDR: 1E DATA: 94
SPI Write ADDR: 1D DATA: 72
SPI Write ADDR: 26 DATA: 4
SPI Write ADDR: 6 DATA: E7
SPI Write ADDR: 7 DATA: 33
SPI Write ADDR: 8 DATA: 5A
SPI Write ADDR: 1 DATA: 86
Joining...
SPI Write ADDR: 1 DATA: 81
SPI Write ADDR: 1E DATA: 94
SPI Write ADDR: 1D DATA: 72
SPI Write ADDR: 26 DATA: 4
SPI Write ADDR: 6 DATA: E7
SPI Write ADDR: 7 DATA: 0
SPI Write ADDR: 8 DATA: 27
SPI Write ADDR: 40 DATA: 40
SPI Write ADDR: 33 DATA: 27
SPI Write ADDR: 3B DATA: 1D
SPI Write ADDR: 22 DATA: 17
SPI Read ADDR: E DATA: 80
SPI Write ADDR: D DATA: 80
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 37
SPI Write ADDR: 0 DATA: 88
SPI Write ADDR: 0 DATA: 23
SPI Write ADDR: 0 DATA: 43
SPI Write ADDR: 0 DATA: 50
SPI Write ADDR: 0 DATA: D8
SPI Write ADDR: 0 DATA: 33
SPI Write ADDR: 0 DATA: 4E
SPI Write ADDR: 0 DATA: 13
SPI Write ADDR: 0 DATA: E0
SPI Write ADDR: 0 DATA: C0
SPI Write ADDR: 0 DATA: 0
SPI Write ADDR: 0 DATA: 3E
SPI Write ADDR: 0 DATA: C5
SPI Write ADDR: 1 DATA: 83
SPI Write ADDR: 12 DATA: 8
SPI Write ADDR: 40 DATA: 0
SPI Write ADDR: 33 DATA: 67
SPI Write ADDR: 3B DATA: 19
SPI Write ADDR: 1E DATA: 94
SPI Write ADDR: 1D DATA: 72
SPI Write ADDR: 26 DATA: 4
SPI Write ADDR: 6 DATA: E7
SPI Write ADDR: 7 DATA: 33
SPI Write ADDR: 8 DATA: 5A
SPI Write ADDR: 1 DATA: 86

And I am pretty sure that if my device can understand the join acceptance then it should work as it should be.

Previously for class B device I used the LMIC library which is still online and sending data. see the photos below, these are pictures for my class B devices: The device logs are: image The device profile is: image I have only one gateway which supports As923-1 only. My class B device is running through it. The device is working for a long time.

I will run tests and let you know.
one more ques...how to check my Rx1 & Rx2 for my Class -C device using the Beelan library? @AndreaZGuz

PadmaIoT avatar Jun 18 '23 04:06 PadmaIoT

Hello again @PadmaIoT

If you use our library, RX1 and RX2 windows are fixed to 1 sec.

Of course! Thanks for trying. We will be waiting for your outcomes.

We are keeping in touch!

AndreaZGuz avatar Jun 21 '23 22:06 AndreaZGuz

Hello @AndreaZGuz , Will you please let me know that on the time of building this library which version of LoRaWAN documentation was followed? As an example latest documentation of Lora-alliance is for LoRaWAN (not sure) I believe is 1.0.4 and the regional parameter version is RP-002 1.0.3. Let me know, please. I believe something lacking in the library is making this problem. I hope you guys will also try to fix the issue from your side. Happy sharing.

PadmaIoT avatar Jun 22 '23 04:06 PadmaIoT

Hello @PadmaIoT,

This library is based on version 1.0.3, it has been tested with version 1.0.4 and worked well, but some features may not be compatible or supported. I have already reported the issue. Our team will be working on it to improve the performance of the library. In the meantime, if you share your results with us once you have run the tests, it would be very helpful to us to identify quickly if the issue is only related to AS923 frequency.

Thank you for your patience and collaboration.

AndreaZGuz avatar Jun 23 '23 22:06 AndreaZGuz

Hello @AndreaZGuz ,

Thanks for your continuous support. I have a lack of gateways for different bands. I will run the test with our developer community. I already found a gateway of EU868 from one of my developer friends. Will let you know about the result. My request is not to close the issue unless it is solved

PadmaIoT avatar Jun 25 '23 04:06 PadmaIoT

Hi @PadmaIoT

Sure! We are attentive to your outcomes and comments.

AndreaZGuz avatar Jun 27 '23 21:06 AndreaZGuz

Hi, I could use only 2 frequency plans. It works fine with EU868. AS923 default (AS923-1) does not work...shows the same problem. The problem is my region only supports AS923.

PadmaIoT avatar Jul 02 '23 04:07 PadmaIoT

Hi @PadmaIoT !

Thank you very much for trying. It seems that we both faced issues with the same frequency. This issue is already reported to our colleagues. Now they will work to solve it. I cannot assure a specific frame of time to resolve this issue. As soon as we have any updates, we will let you know. Thanks in advance for your patience and collaboration with the tests.

AndreaZGuz avatar Jul 03 '23 18:07 AndreaZGuz

Thanks, @AndreaZGuz . I will be waiting for your solution.

PadmaIoT avatar Jul 09 '23 04:07 PadmaIoT

Hello there, How are you all? Did you find the bug?

PadmaIoT avatar Sep 07 '23 02:09 PadmaIoT

Hello we updated with a pull request the way that OTAA class works, can you try again?

wero1414 avatar Sep 07 '23 03:09 wero1414

Hello @PadmaIoT Were you able to test the updates? Did you face any issues?

AndreaZGuz avatar Sep 28 '23 17:09 AndreaZGuz

Hello @AndreaZGuz

Thanks for your update. I appreciate your help. Right now I am far away from my lab. I hope very soon I will be able to run and test and let you know about the update.

Good work guys.

PadmaIoT avatar Sep 28 '23 18:09 PadmaIoT

Hi @PadmaIoT Thank you for informing this. We are attentive to your findings.

AndreaZGuz avatar Sep 28 '23 20:09 AndreaZGuz

i can not recieve too anyone fix ?

halukmy avatar Oct 15 '23 17:10 halukmy

Hi @AndreaZGuz ; I did not tested it directly, but someone else (one of my fellow developer friends) reported me the problem still persistent. Can you please check again?

PadmaIoT avatar Jan 12 '24 02:01 PadmaIoT

Hello @PadmaIoT!

Many thanks for the updates. Currently, our dev team is working on some updates that will improve the functions from the library, including those related to the AS923 frequency. The time that these modifications will take is not accurate to tell at this moment, but as soon as they are completed, we will let you know.

Thank you for all the collaboration and your patience. We are keeping in touch.

AndreaZGuz avatar Jan 12 '24 20:01 AndreaZGuz

Hi, I had a similar problem. The uplink was working fine so far, but downlinks where not handled at all. After trying a few other options I decided to take a look into the implementation and found a flag _CLASS_C_ that was disabled / not defined. After enabling it the downlink worked as expected. I took the freedom to add a comment about this in the example file for OTAA + Class C and started a pull request.

damattl avatar Mar 13 '24 18:03 damattl

@damattl so you mean you solved it somehow?

PadmaIoT avatar Mar 13 '24 19:03 PadmaIoT

@PadmaIoT Yes, at least for my project and configuration. I found this inside the implementation files, and decided to define the _CLASS_C_ flag via the build flags in the platformio.ini file. Screenshot 2024-03-13 at 20 34 08 Screenshot 2024-03-13 at 20 41 10

As I'm not using Arduino IDE I don't know how to set build flags in Arduino IDE

damattl avatar Mar 13 '24 19:03 damattl

What you are using? Platform io? @damattl

PadmaIoT avatar Mar 13 '24 22:03 PadmaIoT

Yes, I'm using PlatformIO @PadmaIoT

damattl avatar Mar 15 '24 20:03 damattl

@damattl so you can do uplink and downlink by class C right? Please give me more insight about your configuration of the C class device in LoRa server. I want to know which LoRA server you are using, and when you register your device in the server, what was the configuration you applied. I will be thankful.

PadmaIoT avatar Mar 16 '24 07:03 PadmaIoT

I also have an issue, i attempted to use this library and have imported the new, *fixed library. I setup the end node with the example of Class C OTAA on platform IO and have set all the build flags. I have managed to config my end device on 2 different servers that being TTN and Datacake and managed to make a join connection from my end device to my gateway and also send uplinks and receive them on TTN and Datacake, but for some reason downlinks never work on both of them. I am using ttgo-lora32-v1 with SX1276 lora module.

ryandiapsl avatar Mar 22 '24 14:03 ryandiapsl

Hello!

Thank you for following up on this issue and helping us with your feedback and comments. At the moment, some changes have been implemented to enhance the efficiency of this library. The last update we can point you to is pull-request 181. Due to other priorities, our team will resume work in the next half of the year.

We appreciate your patience and any collaboration. Remember, if you want to contribute to this library, you can always open a pull request with your changes/suggestions.

AndreaZGuz avatar Mar 22 '24 20:03 AndreaZGuz