Document

TR013-1.0.0 CSMA

Issue link: https://read.uberflip.com/i/1507762

Contents of this Issue

Navigation

Page 9 of 17

Enabling CSMA for LoRaWAN TR013-1.0.0 ©2023 LoRa Alliance ® Page 10 of 18 The authors reserve the right to change specifications without notice. because repeatedly performing DIFS on a fixed channel that was reported as busy is less 269 likely to result a clear channel. Therefore, the end-device would have a better chance of finding 270 a clear channel by hopping to a different one. 271 272 A key concern, however, is how many times the end-device should hop across channels in 273 the unlikely case where many consecutive channels are found to be busy. At such times of 274 high network demand, the end-device would spend too much time hopping across too many 275 channels. This overhead can be high, especially when the number of available channels is 276 also high. Therefore, a stop condition is provided to control this behavior. The user- 277 configurable parameter MaxChanges sets a limit on the number of times an end-device can 278 hop to a different channel upon finding a busy channel. MaxChanges is reset to its initial 279 value upon each transmission. Accordingly, prior to hopping to a random channel, the end- 280 device checks if MaxChanges>0, i.e., to see if further channel changes are allowed. If so, 281 the end-device can hop randomly to one of the AvailableCh, one that has not been 282 transmitted on yet. Each hop decrements MaxChanges by one. When MaxChanges=0, or 283 when all AvailableCh have been tried, no further channel changes are allowed. In that 284 case, the end-device shall simply transmit the frame under ALOHA. 285 286 Recommended values for key CSMA parameters are provided in Section 4.3. 287 4.2.2 State Transitions of an End-Device Adopting DIFS with BO 288 289 This section describes state transitions when an end-device adopts both DIFS and BO 290 phases. To enable BO phase, BACKOFF_MAX is set to a non-zero integer, e.g., 6 or as 291 recommended in Section 4.3. When an end-device enters the CSMA process, it assigns a 292 random value from {1,2,3,4,5,BACKOFF_MAX } to NumBackoff. 293 294 Again, the simplest scenario is when the selected CH/SF combination by the end-device is 295 not contended by another. The end-device first enters the DIFS state and completes a 296 successful DIFS phase. After the successful DIFS phase, the end-device checks if the 297 existing NumBackoff value is greater than 0. NumBackoffs>0 implies the end-device has 298 not completed its BO phase during this transmission effort and the end-device will start or 299 resume the BO phase. As such, the end-device immediately moves to BO state and waits 300 until NumBackoff is decremented to 0 per each CAD returning a clear channel. When 301 NumBackoff=0, the end-device then transitions to transmission state. When the frame is 302 transmitted, the end-device decrements NumAvailableCh by one. At the same time, the 303 end-device marks the channel as used in AvailableCh. 304 305 In cases where the end-device identifies a busy channel during the DIFS state or the BO 306 state, the end-device shall immediately transition to the DIFS state. Following the channel 307 hopping criteria explained in Section 4.2.1, the end-device then configures the radio to a 308 different random channel from the list of AvailableCh and transitions to the DIFS phase 309 again. Note that NumBackoff for a frame is not set to a new random initial value until that 310 frame is transmitted. The use of the MaxChanges and NumAvailableCh parameters 311 apply, as described in Section 4.2.1. 312 313 For further clarity, Figure 2 illustrates the importance of Back-Off under a typical use case, 314 where two end-devices, device A and device B, follow CSMA with both DIFS and BO phases. 315 The behavior of device A is described first. Device A initially generates a random value of 2 316

Articles in this issue

view archives of Document - TR013-1.0.0 CSMA