Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class C examples #25

Closed
LasaleFamine opened this issue Feb 21, 2020 · 31 comments
Closed

Class C examples #25

LasaleFamine opened this issue Feb 21, 2020 · 31 comments
Assignees
Labels
Question a/Board Further information about a board is requested

Comments

@LasaleFamine
Copy link

Hi and thanks for the library, I really like the APIs and I'm going to try it for my project.

I'm wondering, is there some specific example for working with Class C devices (EU frequency)?

@sabas1080 sabas1080 added the Question a/Board Further information about a board is requested label Feb 21, 2020
@wero1414
Copy link
Member

Hi right know is kind of hard to me to make time to keep developing this library but the Class C example is the first thing on the TODO list

@novvere
Copy link
Contributor

novvere commented Feb 24, 2020

We are also testing Class C for EU_868, as TTN doesn't support class c we are preparing a ChirpStack server to test. I will update with the results.

@sabas1080
Copy link
Member

We are working on that #28 , welcome your feedback

@LasaleFamine
Copy link
Author

For Class C support I'm using The Things Stack V3, if that can help.

Is worth noting that I'm currently not able to receive any downlink using The Things Stack V3 and this library (on Arduino Uno + Dragino Shield), also Class A downlinks are not received. Instead, I can send uplinks correctly.

For completeness, I have tested the stack with my device with LMIC library and I was able to uplink/downlink in Class A without problems.

@halukmy
Copy link

halukmy commented Feb 25, 2020

@LasaleFamine can you inform us how can we use v3 and class C on arduino and esp32

@halukmy
Copy link

halukmy commented Feb 25, 2020

@mr3188 any update about chipstrack?

@LasaleFamine
Copy link
Author

@halukmy are you saying I can't receive the Class C downlink with my device? Be aware that I'm newbie here and I'm trying to learn too.

@sabas1080
Copy link
Member

sabas1080 commented Feb 25, 2020

@halukmy welcome your pullrequest ;) or your donation for the support this library

@novvere
Copy link
Contributor

novvere commented Feb 26, 2020

With ChirpStack and class A I'm able to use join/uplink/downlink but with Class C I have problems with join using OTAA, no problems with ABP in uplinks.
But some things are still confusing, I get a downlink for every unconfirmed uplink. I still need to do more tests.
The version of the library I'm using has some changes from the Beelan repo, mainly adding names to constants to be able to trace the code easier. but other a re important.
I will try to clean debug code and pull just useful tested changes to the original repo.

@halukmy
Copy link

halukmy commented Feb 26, 2020

@mr3188 can you share youtube videos how to use class c on esp32 maybe installation

@novvere
Copy link
Contributor

novvere commented Feb 26, 2020

@halukmy I'm using a board designed by TTN Comunity of Madrid base on MattairTech SAMD21E core.
Have you been able to use it with class A?

@novvere
Copy link
Contributor

novvere commented Feb 26, 2020

@LasaleFamine I have to check if all my changes are merged into master branch but I remember there where something wrong with rx1 and rx2 windows delay and have in mind TTN uses a non standard DR but I have not used ttn stack v3.

@novvere
Copy link
Contributor

novvere commented Feb 27, 2020

I can't send Class C down links ( don't even arrived to the gateway) because I have configuration problems with my chirpStack server, it will take some time to fix it.

@novvere
Copy link
Contributor

novvere commented Mar 4, 2020

Now my server configuration is ok and I see the downlink in the gateway but not in the node.
One of the problems I have seen is class C nodes must open a small RX2 window just between the end of the uplink and the RX1 window.
What I understand from LoRaWAN 1.03 specs for class c is:

  • send uplink in the same way as CLASS A
  • open small RX2 window for a second (RX1 DELAY)
  • open RX1 window in the same way as CLASS A
  • open RX2 window in the same way as CLASS A but leave it open (RFM in continuous receive) until next uplink.
    Basically class C is the same as class A but must be listening RX2 except when transmiting and listening RX1

@sabas1080
Copy link
Member

there is an example of class C apparently working #32

@LasaleFamine
Copy link
Author

I have tested the new example with the The Things Stack V3, but still no luck unfortunately... I can see that the stack won't send down the downlink when in ABP, instead in OTAA the stack will send the downlink but the device can't receive it (I'm using an Arduino UNO with the Dragino Shield).

@mr3188 did you test also OTAA connection with this lib and class c device, right?

Chirpstark seems too much complex for me, I can't even correctly configure it, so I can't try actually with it.

@novvere
Copy link
Contributor

novvere commented Mar 18, 2020

Yes, I made tests with ABP and OTAA using ChirpStack and it worked as expected.
I'm not sure but I think ABP need at least one uplink before sending downlinks.
Which DR and frequency values do you seen in gateway log for the downlink?

I haven't tested class C with TTN V3, V2 doesn't support Class C but I know TTN uses non standard frequencies for RX2. RX2 config is the default for Class C so first take a look at the data sent to the rfm module just before entering continuous receive

look for the lines shown in debug just before the following ones to check wich SF and BW is configured.

RFM_Switch_Mode 101
SPI Write ADDR: 1 DATA: 85 --> Switch mode to LoRa and continuous receive

I will take a look at Stack V3 but I will need some time.

.

@halukmy
Copy link

halukmy commented Apr 2, 2020

@mr3188 can you help me how to downlink message via chirpstack to node?

@mattjbailey
Copy link

mattjbailey commented Dec 21, 2021

It's been some time since the post above and I haven't seen anything further... Any progress?? I also have the same issue. I'm using Chirpstack, I've used other repositories and have got my devices working... I was looking for class C support so I tried using this one. Again, uploads work fine, but downlinks do not. I have tried both class C and class A - no downlink messages are received. I can see the gateway is sending. I've also tried many different frequencies with no luck. I am using an Arduino Mega and a Dragino shield. I should mention that I am using US915.

@sabas1080 sabas1080 reopened this Dec 21, 2021
@wero1414
Copy link
Member

The example is already working in Class C i personally have tested it on US915 on chirpstack and also on TTN V3 also @mr3188 have tested it

@mattjbailey
Copy link

mattjbailey commented Dec 21, 2021

Can you post a direct link to what you tested? I would like to test it.
This is what I see:
image
image

@wero1414
Copy link
Member

Shure this example

Seeing your screnshoot you are already receiving data cause in the main code is printed those lines, you're not seeing the data cause the way is received and the data type but the library is telling you somenthing was received.

if(recvStatus) { Serial.print("====>> "); Serial.println(outStr); }

@mattjbailey
Copy link

mattjbailey commented Dec 21, 2021

I see the arrows but I get those even if no data is being sent... The link you provided is exactly what I'm using.

@wero1414
Copy link
Member

Well you should see the data type your sending cause if your sending somenthing thats not a char the serial print wont print it

@mattjbailey
Copy link

mattjbailey commented Dec 21, 2021

Im sending this Base64 within Chirpstack on port 2:
SGVsbG8gV29ybGQ=
That is the string "Hello World"

Also, should the confirm messages be sent? Even if the device was getting the data and I cant see it, shouldn't it respond to a confirm downlink message?

@mattjbailey
Copy link

Are the arrows results of it sending back a downlink message with each uplink? I'm not sure why I am seeing this? Further, the arrows show up randomly.
image

@wero1414
Copy link
Member

Are you using the last version of the library?

@mattjbailey
Copy link

mattjbailey commented Dec 21, 2021

Yes, in fact I've even checked the code changes to see they were merged in to what I'm using. Do you know what frequency the device should be listening on for downlink messages when settings this lora.setDataRate(2) ?
Here is my device profile settings:

image

I've also tried modifying the rx1 delay to 1 / Tried another gateway / tried OTA - all with the same results - not working

@mattjbailey
Copy link

Hopefully this helps someone. It turns out I just had to set the Rx2 datarate to 8 and things started to work. I am using Class C ABP. Thank you for your help!
image

@stale
Copy link

stale bot commented Feb 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added wontfix and removed wontfix labels Feb 20, 2022
@stale
Copy link

stale bot commented Apr 25, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 25, 2022
@stale stale bot closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question a/Board Further information about a board is requested
Projects
None yet
Development

No branches or pull requests

6 participants