LoRaWAN: Class B or C? #905
Replies: 3 comments 5 replies
-
I think I just learned something (naturally, right after starting this conversation): The message I was sending in my MQTT client was something like this: {
"downlinks": [
{
"frm_payload": "eyJzb21lS2V5Ijoic29tZVZhbHVlIn0=",
"f_port": 1,
"priority": "NORMAL",
"confirmed": false
}
]
} ...but I just learned that a message for a Class B/C device is different, and so should look like this (notice the new {
"downlinks": [
{
"frm_payload": "eyJzb21lS2V5Ijoic29tZVZhbHVlIn0=",
"f_port": 1,
"class_b_c": {
"gateways": [
{
"gateway_ids": {
"gateway_id": "eui-3235313227005500"
}
}
],
"absolute_time": "2023-12-18T22:29:00Z"
},
"priority": "NORMAL",
"confirmed": false
}
]
} So, obviously, my troubles have nothing to do with this library. I'll tinker with this some more to see if I can make some progress... |
Beta Was this translation helpful? Give feedback.
-
The current LoRaWAN support is for class A only. I'm not the LoRaWAN export here (that would be @StevenCellist), so I don't know how much stuff would need to be changed in order to support Class B and C operation. |
Beta Was this translation helpful? Give feedback.
-
@MaffooClock Hi MaffooClock, Have you found a better way to support class B class C so far? |
Beta Was this translation helpful? Give feedback.
-
I understand that LoRaWAN is currently a beta feature. So far, I've been able to use this library with a Heltec LoRa 32 v3 to send data to The Things Stack through my MikroTik R11e-LR9 gateway, as well as receive.
One thing I was hoping to achieve is for my node to be a Class C (or at least Class B) device, but nothing I try has allowed the device to receive a downlink without first transmitting an uplink, so pretty much all that I can get my device to do is behave only like a Class A node (which works, by the way!).
Yes, I've configured the node on The Things Stack to have the "Supports Class B" and "Supports Class C" options enabled.
Essentially, what I've tried is adding
radio.startReceive()
in mysetup()
and using myloop()
to repeatedly callnode.downlink()
without any delays, then I use my MQTT client to send a message to The Things Stack, expecting it to appear on my device within a second or two. But nothing ever comes in; the message stays queued and is never actually sent to my gateway (there is an MQTT topic that also shows that it is queued and not yet sent).As a test, in my
loop()
I added in a 60-second timer that, when it expires, will callnode.uplink()
to send a message, and whenloop()
goes back to only callingnode.downlink()
, the queued message quickly appears in my gateway log, and then on my device.Since the message stays queued and is never sent to my gateway (without an uplink), that tells me The Things Stack somehow "knows" my device is in Class A mode, which leads me to believe that my strategy of continually checking for a downlink might be correct, but there must be some other step that should have taken place so that The Things Stack knows that it's okay to send a downlink without an uplink (even if this library doesn't currently have that step built in).
I've poured through the numerous issues relating to the development of the beta feature, and I've learned a lot, but I'm not quite sure what's missing from the implementation to make this work. I feel like RadioLib is so close, though!
Any LoRaWAN exports have any tips?
Beta Was this translation helpful? Give feedback.
All reactions