# Open class C for some seconds

**URL:** <https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004>\
**Category:** End Devices (Nodes)\
**Created:** [July 14, 2022, 3:38pm UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004 "2022-07-14T15:38:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dovov](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/dovov/32/35697_2.png) [@dovov](https://www.thethingsnetwork.org/forum/u/dovov)\
**Post date:** [July 14, 2022, 3:38pm UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/1 "2022-07-14T15:38:33Z")

</div>

Hello,

Issue:  
script performs and parse lorawan Data received by MQTT Integration, and do downlink if require. As Device is in Class A, need to send downlink command to chirpstack as soon as get uplink,  
But issue is when script fetch data to downlink from a remote sql Server it takes some times, and then script perform send downlink by MQTT to chirpstack, but downlink doesn’t performed due to delay in sending downlink message, and so it will remains in queue of chirpstack, and will be send on next uplink. there is nothing can be done in script side to send downlink faster to chirpstack for now.  
Downlink is needed to reached to device when request made, not in next uplink.

So, I though use device in class C when doing uplink and and wait for command for 6 seconds and switch back to class A, for power saving.

Is this legal according to Lorawan Protocol?

Thank You

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [July 14, 2022, 6:36pm UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/2 "2022-07-14T18:36:13Z")

</div>

> [@dovov](#):
>
> Device is in Class A, need to send downlink command to chirpstack

Is chirpstack used with TTN ?

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [July 14, 2022, 7:34pm UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/3 "2022-07-14T19:34:33Z")

</div>

> [@dovov](#):
>
> send downlink command to **chirpstack** as soon as get uplink,  
> But issue is when script fetch data to downlink from a remote sql Server it takes some times, and then script perform send downlink by MQTT to **chirpstack** , but downlink doesn’t performed due to delay in sending downlink message, and so it will remains in queue of **chirpstack** , and will be send on next uplink. there is nothing can be done in script side to send downlink faster to **chirpstack**

Wrong forum…this one is for **TTN** not **Chirpstack**!

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [July 14, 2022, 7:58pm UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/4 "2022-07-14T19:58:04Z")

</div>

> [@dovov](#):
>
> So, I though use device in class C when doing uplink and and wait for command for 6 seconds and switch back to class A, for power saving.

TTN does not allow you to switch a device to a different node at runtime. It requires you specify the device class when adding it to the stack. So even if it would be legal, it is not an option in TTN.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [July 14, 2022, 8:27pm UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/5 "2022-07-14T20:27:13Z")

</div>

Apart from the “wrong forum” issue, you are trying to fix the problem by breaking something else rather than fixing the actual issue of the slow database / processing script.

Although with a good understanding of LoRaWAN protocols, there is an obvious solution for users on TTN …

---

<div class="post-metadata">

**Author:** ![dovov](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/dovov/32/35697_2.png) [@dovov](https://www.thethingsnetwork.org/forum/u/dovov)\
**Post date:** [July 15, 2022, 5:06am UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/6 "2022-07-15T05:06:08Z")

</div>

Sorry for wrong forum mistake. I mean to find solution asap. I am testing TTN and Chirpstack both, to find compare both. nd this issue is also related to TTN.

I mean that Set Device in Class C in TTN, and on device side use Class C for 6 seconds when uplink done.

---

<div class="post-metadata">

**Author:** ![Johan\_Scheepers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/johan_scheepers/32/46550_2.png) [@Johan\_Scheepers](https://www.thethingsnetwork.org/forum/u/Johan_Scheepers)\
**Post date:** [July 15, 2022, 5:53am UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/7 "2022-07-15T05:53:18Z")

</div>

Fix your slow database response to the NS, then you your issue will disappeared.

Or the the issue could be latency between your DB and the NS or NS and gateway, lots of post on that forum.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [July 15, 2022, 7:37am UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/8 "2022-07-15T07:37:15Z")

</div>

> [@dovov](#):
>
> I am testing TTN and Chirpstack both, to find compare both. nd this issue is also related to TTN.

Testing two LNS’s to step around the compliance to resolve an entirely different problem is only likely to make the situation worse.

And you’ve been told there is no mechanism to change the class of a device on demand - it’s set when you create it. So there is no solution in this regard

Why can’t you resolve the slow database / script issue?

Is this the 1,000 nodes transmitting at the same time with the really poor SNR from the only antenna you’ve tried project?

---

<div class="post-metadata">

**Author:** ![dovov](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/dovov/32/35697_2.png) [@dovov](https://www.thethingsnetwork.org/forum/u/dovov)\
**Post date:** [July 15, 2022, 9:14am UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/9 "2022-07-15T09:14:08Z")

</div>

Testing two LNS’s is to make best choice, to perform all functionality needed in product.  
database side can be made faster, but want to make solution for worst case scenario.

Yes 1000 node with poor SNR is my current status of project.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [July 15, 2022, 10:04am UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/10 "2022-07-15T10:04:02Z")

</div>

> [@dovov](#):
>
> to perform all functionality needed in product.

Functionality of your product does not depend on LNS. All LoRaWAN compliant LNSes have the same limitations when talking to nodes. The major difference between offerings is how your application connects to the LNS but that is a minor part of the chain.  
Your node firmware and your backend application determine functionality of the product.

Your hardware and deployment determine the RF quality. If not good enough for certain nodes, assuming the nodes have descend antennas and RF circuit, you need to either move a gateway or add one.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [July 15, 2022, 11:32am UTC](https://www.thethingsnetwork.org/forum/t/open-class-c-for-some-seconds/58004/11 "2022-07-15T11:32:08Z")

</div>

> [@dovov](#):
>
> Testing two LNS’s is to make best choice, to perform all functionality needed in product.

Consequently you are adding extra work & variables in to the mix when, as there is a blindly obvious solution, there is more of the basics for you to get to.

And you are evaluating two stacks to see how they can be bent to make your solution work when the actual problem is with your database script. Plus the concurrent tx challenge and the pitiful SNR.

You’ve been told clearly that there is no functionality to switch class of device on the fly, so this thread is getting a bit pointless.

If you are going to evaluate things, I’d evaluate antenna’s to sort out the SNR, I’d look at my database script and I’d scroll to the top to hit up the Learn menu item and really get to know the LoRaWAN transmission cycle.
