Issue link: https://read.uberflip.com/i/1428377
LoRaWAN Specification ©2015 LoRa™ Alliance Page 27 of 82 The authors reserve the right to change specifications without notice. 5.5 End-Device Status (DevStatusReq, DevStatusAns) 1 With the DevStatusReq command a network server may request status information from an 2 end-device. The command has no payload. If a DevStatusReq is received by an end- 3 device, it responds with a DevStatusAns command. 4 Size (bytes) 1 1 DevStatusAns Payload Battery Margin The battery level (Battery) reported is encoded as follows: 5 Battery Description 0 The end-device is connected to an external power source. 1..254 The battery level, 1 being at minimum and 254 being at maximum 255 The end-device was not able to measure the battery level. Table 8: Battery level decoding 6 The margin (Margin) is the demodulation signal-to-noise ratio in dB rounded to the nearest 7 integer value for the last successfully received DevStatusReq command. It is a signed 8 integer of 6 bits with a minimum value of -32 and a maximum value of 31. 9 Bits 7:6 5:0 Status RFU Margin 5.6 Creation / Modification of a Channel (NewChannelReq, 10 NewChannelAns) 11 12 The NewChannelReq command can be used to either modify the parameters of an existing 13 channel or to create a new one. The command sets the center frequency of the new channel 14 and the range of data rates usable on this channel: 15 Size (bytes) 1 3 1 NewChannelReq Payload ChIndex Freq DrRange 16 The channel index (ChIndex) is the index of the channel being created or modified. 17 Depending on the region and frequency band used, the LoRaWAN specification imposes 18 default channels which must be common to all devices and cannot be modified by the 19 NewChannelReq command (cf. Chapter 6). If the number of default channels is N, the 20 default channels go from 0 to N-1, and the acceptable range for ChIndex is N to 15. A 21 device must be able to handle at least 16 different channel definitions. In certain region the 22 device may have to store more than 16 channel definitions. 23 24 The frequency (Freq) field is a 24 bits unsigned integer. The actual channel frequency in Hz 25 is 100 x Freq whereby values representing frequencies below 100 MHz are reserved for 26 future use. This allows setting the frequency of a channel anywhere between 100 MHz to 27 1.67 GHz in 100 Hz steps. A Freq value of 0 disables the channel. The end-device has to 28 check that the frequency is actually allowed by its radio hardware and return an error 29 otherwise. 30 31 The data-rate range (DrRange) field specifies the data-rate range allowed for this channel. 32 The field is split in two 4-bit indexes: 33 Bits 7:4 3:0 DrRange MaxDR MinDR
