Issue link: https://read.uberflip.com/i/1428386
LoRaWAN Specification ©2016 LoRa™ Alliance Page 62 of 91 The authors reserve the right to change specifications without notice. 10 Principle of synchronous network initiated downlink (Class-B 1 option) 2 For a network to support end-devices of Class B, all gateways must synchronously 3 broadcast a beacon providing a timing reference to the end-devices. Based on this timing 4 reference the end-devices can periodically open receive windows, hereafter called "ping 5 slots", which can be used by the network infrastructure to initiate a downlink communication. 6 A network initiated downlink using one of these ping slots is called a "ping". The gateway 7 chosen to initiate this downlink communication is selected by the network server based on 8 the signal quality indicators of the last uplink of the end-device. For this reason, if an end- 9 device moves and detects a change in the identity advertised in the received beacon, it must 10 send an uplink to the network server so that the server can update the downlink routing path 11 database. 12 All end-devices start and join the network as end-devices of Class A. The end-device 13 application can then decide to switch to Class B. This is done through the following process: 14 The end-device application requests the LoRaWAN layer to switch to Class B mode. 15 The LoRaWAN layer in the end-device searches for a beacon and returns either a 16 BEACON_LOCKED service primitive to the application if a network beacon was 17 found and locked or a BEACON_NOT_FOUND service primitive. To accelerate the 18 beacon discovery the LoRaWAN layer may use the "BeaconTimingReq" message 19 described later. 20 Based on the beacon strength and the battery life constraints, the end-device 21 application selects a ping slot data rate and periodicity, this is then requested them 22 from the end-device LoRaWAN layer. 23 Once in Class B mode, the MAC layer sets to 1 the Class B bit of the FCTRL field of 24 every uplink frame transmitted. This bit signals to the server that the device has 25 switched to Class B. The MAC layer will autonomously schedule a reception slot for 26 each beacon and each ping slot. When the beacon reception is successful the end- 27 device LoRaWAN layer forwards the beacon content to the application together with 28 the measured radio signal strength. The end-device LoRaWAN layer takes into 29 account the maximum possible clock drift in the scheduling of the beacon reception 30 slot and ping slots. When a downlink is successfully demodulated during a ping slot, 31 it is processed similarly to a downlink as described in the LoRaWAN Class A 32 specification. 33 A mobile end-device must periodically inform the network server of its location to 34 update the downlink route. This is done by transmitting a normal (possibly empty) 35 "unconfirmed" or "confirmed" uplink. The end-device LoRaWAN layer will 36 appropriately set the Class B bit to 1. Optimally this can be done more efficiently if 37 the application detects that the node is moving by analyzing the beacon content. In 38 that case the end-device must apply a random delay (as defined in Section 16.5 39 between the beacon reception and the uplink transmission to avoid systematic uplink 40 collisions. 41 If no beacon has been received for a given period (as defined in Section 13.2), the 42 synchronization with the network is lost. The MAC layer must inform the application 43 layer that it has switched back to Class A. As a consequence the end-device 44 LoRaWAN layer stops setting the Class B bit in all uplinks and this informs the 45 network server that the end-device is no longer in Class B mode. The end-device 46 application can try to switch back to Class B periodically. This will restart this process 47 starting with a beacon search. 48
