Issue link: https://read.uberflip.com/i/1464686
LoRaWAN ® Multi-Package Access Protocol Specification TS007-1.0.0 ©2022 LoRa Alliance ® Page 7 of 15 The authors reserve the right to change specifications without notice. 182 183 Bits 7 6:0 PackageID Fields 1 PackageIdentifier Table 3: PackageID field format 184 The Most Significant bit (bit 7) set to 1 differentiates a PackageID field from a 185 CommandID field. This means that the CommandID SHALL be less than 128 to be used on 186 FPort 225. A CommandID greater or equal to 128 will be interpreted as a PackageID and 187 SHALL NOT be used on FPort 225. 188 189 The PackageIdentifier of the multi-package access package is 0. The 190 PackageVersion of this package is version 1. The Multi-Package Access Protocol 191 implements the commands described in section 4 of this document. 192 193 The PackageIdentifier field is defined in the specification document of each package. 194 This method introduces overhead but allows several commands belonging to different 195 packages to be grouped inside a single downlink. For example, commands to set up a 196 temporary Class C slot and a FUOTA fragmentation session can be grouped in a single 197 downlink. 198 199 When a set of commands is received on FPort 225, the end-device SHALL process all 200 package commands in the order they are received (pkg1/cmd1, pkg2/cmd2…). The answer 201 for each command is appended to a buffer (the ANS buffer) using the following format: 202 203 PackageID 1 (opt) CommandID 1 Command1 answer payload PackageID 2 (opt) CommandID 2 Command2 answer payload … Command Token Table 4: ANS buffer format 204 Whenever a command is prefixed with a PackageID field in the request, the PackageID 205 field SHALL also be copied in the ANS buffer. 206 207 The size of the ANS buffer SHALL NOT exceed 128 bytes. 208 Note: Each command is processed as if there was no limitation on the 209 maximum answer payload size. In general, the maximum size of 128 210 bytes of the ANS buffer is sufficient for firmware management 211 purposes. In case the concatenation of all the answers will exceed 128 212 bytes, only the first 128 bytes are copied into the ANS buffer; the rest 213 are discarded. 214 215 Once all commands have been processed and all answers have been gathered in the ANS 216 buffer, the end-device transmits the buffer on FPort 225 using one of the two following 217 methods: 218 • If (ANS buffer length + 1) is smaller or equal to the maximum payload length 219 authorized for the currently used data rate (DR), the complete buffer is transmitted on 220 FPort 225 without any modification. 221 • If the ANS buffer length is greater than the maximum payload length authorized, the 222 buffer is fragmented over several uplinks and each fragment is sent using the 223 MultiPackBufferFrag command. 224 225
