5 - Class B

This book explores in depth how to use Class B in end devices implementing LoRaWAN® 1.0.4. Class B mode enables the end device to receive downlinks at regular intervals. We teach you how to configure your end device to receive Class B downlinks using beacons and ping slots and best practices to follow to increase the chance of receiving downlinks while maintaining reasonable battery life.

Continuing in Class B Mode

After the first beacon period of 128 seconds, the end device must continue to open subsequent beacon reception windows, as described in the earlier section Listen for Beacons.

If a beacon is detected during the reception window, the end device must continue to update its internal timing reference with the Time value supplied in the beacon, as described in Processing and Using the Beacon, to avoid clock drift. If the end device will use gateway information to determine when to send an uplink, as described in Use of GwSpecific (Optional), then this gateway specific data must be updated in memory whenever a beacon is received. The end device must also continue to open the ping slot windows, as described in Listening for Class B Downlinks.

If no beacon is received, the end device must continue to open the ping slot windows at the expected times following the guidance in Listening for Class B Downlinks and must also work through the measures described in Handling Absence of Beacons.

The end device does not need to repeat detection and processing of the beacon again until Class B mode is disabled. The network server will remember that Class B mode is enabled on this device until a Class A uplink is received with the ClassB bit set to 0.

Warning

All Class A uplinks must have the ClassB bit set to 1 during Class B operations, otherwise the network will stop sending Class B downlinks.

All subsequent downlinks received must be processed, as described in Processing Class B Downlinks.

If the end device needs to close Class B mode, it must send an uplink with the ClassB bit set to 0.

Note

To enable and disable Class B mode remotely, program the end device to close Class B mode on receipt of a custom application downlink. You could use an otherwise unused Frame Port (FPort) value between 1 and 223 with an empty Frame Payload (FRMPayload) to achieve this with minimal data. Learn how to send messages in the Sending Messages Book.