idnits 2.17.1
draft-ietf-lpwan-schc-over-lorawan-14.txt:
Checking boilerplate required by RFC 5378 and the IETF Trust (see
https://trustee.ietf.org/license-info):
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt:
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/checklist :
----------------------------------------------------------------------------
No issues found here.
Miscellaneous warnings:
----------------------------------------------------------------------------
== The copyright year in the IETF Trust and authors Copyright Line does not
match the current year
-- The document date (January 25, 2021) is 1187 days in the past. Is this
intentional?
Checking references for intended status: Proposed Standard
----------------------------------------------------------------------------
(See RFCs 3967 and 4897 for information about using normative references
to lower-maturity documents in RFCs)
-- Looks like a reference, but probably isn't: '1' on line 1048
** Downref: Normative reference to an Informational RFC: RFC 4493
Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--).
Run idnits with the --verbose option for more detailed information about
the items above.
--------------------------------------------------------------------------------
2 lpwan Working Group O. Gimenez, Ed.
3 Internet-Draft Semtech
4 Intended status: Standards Track I. Petrov, Ed.
5 Expires: July 29, 2021 Acklio
6 January 25, 2021
8 Static Context Header Compression (SCHC) over LoRaWAN
9 draft-ietf-lpwan-schc-over-lorawan-14
11 Abstract
13 The Static Context Header Compression (SCHC) specification describes
14 generic header compression and fragmentation techniques for Low Power
15 Wide Area Networks (LPWAN) technologies. SCHC is a generic mechanism
16 designed for great flexibility so that it can be adapted for any of
17 the LPWAN technologies.
19 This document specifies a profile of RFC8724 to use SCHC in
20 LoRaWAN(R) networks, and provides elements such as efficient
21 parameterization and modes of operation.
23 Status of This Memo
25 This Internet-Draft is submitted in full conformance with the
26 provisions of BCP 78 and BCP 79.
28 Internet-Drafts are working documents of the Internet Engineering
29 Task Force (IETF). Note that other groups may also distribute
30 working documents as Internet-Drafts. The list of current Internet-
31 Drafts is at https://datatracker.ietf.org/drafts/current/.
33 Internet-Drafts are draft documents valid for a maximum of six months
34 and may be updated, replaced, or obsoleted by other documents at any
35 time. It is inappropriate to use Internet-Drafts as reference
36 material or to cite them other than as "work in progress."
38 This Internet-Draft will expire on July 29, 2021.
40 Copyright Notice
42 Copyright (c) 2021 IETF Trust and the persons identified as the
43 document authors. All rights reserved.
45 This document is subject to BCP 78 and the IETF Trust's Legal
46 Provisions Relating to IETF Documents
47 (https://trustee.ietf.org/license-info) in effect on the date of
48 publication of this document. Please review these documents
49 carefully, as they describe your rights and restrictions with respect
50 to this document. Code Components extracted from this document must
51 include Simplified BSD License text as described in Section 4.e of
52 the Trust Legal Provisions and are provided without warranty as
53 described in the Simplified BSD License.
55 Table of Contents
57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
58 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
59 3. Static Context Header Compression Overview . . . . . . . . . 4
60 4. LoRaWAN Architecture . . . . . . . . . . . . . . . . . . . . 6
61 4.1. Device classes (A, B, C) and interactions . . . . . . . . 7
62 4.2. Device addressing . . . . . . . . . . . . . . . . . . . . 8
63 4.3. General Frame Types . . . . . . . . . . . . . . . . . . . 8
64 4.4. LoRaWAN MAC Frames . . . . . . . . . . . . . . . . . . . 9
65 4.5. LoRaWAN FPort . . . . . . . . . . . . . . . . . . . . . . 9
66 4.6. LoRaWAN empty frame . . . . . . . . . . . . . . . . . . . 9
67 4.7. Unicast and multicast technology . . . . . . . . . . . . 9
68 5. SCHC-over-LoRaWAN . . . . . . . . . . . . . . . . . . . . . . 10
69 5.1. LoRaWAN FPort and RuleID . . . . . . . . . . . . . . . . 10
70 5.2. Rule ID management . . . . . . . . . . . . . . . . . . . 10
71 5.3. Interface IDentifier (IID) computation . . . . . . . . . 11
72 5.4. Padding . . . . . . . . . . . . . . . . . . . . . . . . . 12
73 5.5. Decompression . . . . . . . . . . . . . . . . . . . . . . 12
74 5.6. Fragmentation . . . . . . . . . . . . . . . . . . . . . . 13
75 5.6.1. DTag . . . . . . . . . . . . . . . . . . . . . . . . 13
76 5.6.2. Uplink fragmentation: From device to SCHC gateway . . 13
77 5.6.3. Downlink fragmentation: From SCHC gateway to device . 17
78 5.7. SCHC Fragment Format . . . . . . . . . . . . . . . . . . 20
79 5.7.1. All-0 SCHC fragment . . . . . . . . . . . . . . . . . 20
80 5.7.2. All-1 SCHC fragment . . . . . . . . . . . . . . . . . 21
81 5.7.3. Delay after each LoRaWAN frame to respect local
82 regulation . . . . . . . . . . . . . . . . . . . . . 21
83 6. Security Considerations . . . . . . . . . . . . . . . . . . . 21
84 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21
85 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 21
86 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 21
87 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 22
88 10.1. Normative References . . . . . . . . . . . . . . . . . . 22
89 10.2. Informative References . . . . . . . . . . . . . . . . . 23
90 10.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 23
91 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 23
92 A.1. Uplink - Compression example - No fragmentation . . . . . 23
93 A.2. Uplink - Compression and fragmentation example . . . . . 24
94 A.3. Downlink . . . . . . . . . . . . . . . . . . . . . . . . 26
95 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28
97 1. Introduction
99 SCHC specification [RFC8724] describes generic header compression and
100 fragmentation techniques that can be used on all Low Power Wide Area
101 Networks (LPWAN) technologies defined in [RFC8376]. Even though
102 those technologies share a great number of common features like star-
103 oriented topologies, network architecture, devices with mostly quite
104 predictable communications, etc; they do have some slight differences
105 with respect to payload sizes, reactiveness, etc.
107 SCHC provides a generic framework that enables those devices to
108 communicate on IP networks. However, for efficient performance, some
109 parameters and modes of operation need to be set appropriately for
110 each of the LPWAN technologies.
112 This document describes the parameters and modes of operation when
113 SCHC is used over LoRaWAN networks. LoRaWAN protocol is specified by
114 the LoRa Alliance(R) in [lora-alliance-spec]
116 2. Terminology
118 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
119 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
120 "OPTIONAL" in this document are to be interpreted as described in BCP
121 14 [RFC2119] [RFC8174] when, and only when, they appear in all
122 capitals, as shown here.
124 This section defines the terminology and acronyms used in this
125 document. For all other definitions, please look up the SCHC
126 specification [RFC8724].
128 o DevEUI: Device Extended Unique Identifier, an IEEE EUI-64
129 identifier used to identify the device during the procedure while
130 joining the network (Join Procedure). It is assigned by the
131 manufacturer or the device owner and provisioned on the Network
132 Gateway.
134 o DevAddr: a 32-bit non-unique identifier assigned to a device
135 either:
137 * Statically: by the device manufacturer in _Activation by
138 Personalization_ mode.
140 * Dynamically: after a Join Procedure by the Network Gateway in
141 _Over The Air Activation_ mode.
143 o Downlink: LoRaWAN term for a frame transmitted by the network and
144 received by the device.
146 o EUI: Extended Unique Identifier
148 o LoRaWAN: LoRaWAN is a wireless technology based on Industrial,
149 Scientific, and Medical (ISM) radio bands that is used for long-
150 range, low-power, low-data-rate applications developed by the LoRa
151 Alliance, a membership consortium: https://www.lora-alliance.org
152 [1].
154 o FRMPayload: Application data in a LoRaWAN frame.
156 o MSB: Most Significant Byte
158 o OUI: Organisation Unique Identifier. IEEE assigned prefix for
159 EUI.
161 o RCS: Reassembly Check Sequence. Used to verify the integrity of
162 the fragmentation-reassembly process.
164 o RX: Device's reception window.
166 o RX1/RX2: LoRaWAN class A devices open two RX windows following an
167 uplink, called RX1 and RX2.
169 o SCHC gateway: The LoRaWAN Application Server that manages
170 translation between IPv6 network and the Network Gateway (LoRaWAN
171 Network Server).
173 o Tile: Piece of a fragmented packet as described in [RFC8724]
174 section 8.2.2.1
176 o Uplink: LoRaWAN term for a frame transmitted by the device and
177 received by the network.
179 3. Static Context Header Compression Overview
181 This section contains a short overview of SCHC. For a detailed
182 description, refer to the full specification [RFC8724].
184 It defines:
186 1. Compression mechanisms to avoid transporting information known by
187 both sender and receiver over the air. Known information is part
188 of the "context". This component is called SCHC Compressor/
189 Decompressor (SCHC C/D).
191 2. Fragmentation mechanisms to allow SCHC Packet transportation on
192 small, and potentially variable, MTU. This component is called
193 SCHC Fragmentation/Reassembly (SCHC F/R).
195 Context exchange or pre-provisioning is out of scope of this
196 document.
198 Device App
199 +----------------+ +----+ +----+ +----+
200 | App1 App2 App3 | |App1| |App2| |App3|
201 | | | | | | | |
202 | UDP | |UDP | |UDP | |UDP |
203 | IPv6 | |IPv6| |IPv6| |IPv6|
204 | | | | | | | |
205 |SCHC C/D and F/R| | | | | | |
206 +--------+-------+ +----+ +----+ +----+
207 | +---+ +----+ +----+ +----+ . . .
208 +~ |RGW| === |NGW | == |SCHC| == |SCHC|...... Internet ....
209 +---+ +----+ |F/R | |C/D |
210 +----+ +----+
211 |<- - - - LoRaWAN - - ->|
213 Figure 1: Architecture
215 Figure 1 represents the architecture for compression/decompression,
216 it is based on [RFC8376] terminology. The device is sending
217 applications flows using IPv6 or IPv6/UDP protocols. These flows
218 might be compressed by a Static Context Header Compression
219 Compressor/Decompressor (SCHC C/D) to reduce headers size and
220 fragmented by the SCHC Fragmentation/Reassembly (SCHC F/R). The
221 resulting information is sent on a layer two (L2) frame to an LPWAN
222 Radio Gateway (RGW) that forwards the frame to a Network Gateway
223 (NGW). The NGW sends the data to a SCHC F/R for reassembly, if
224 required, then to SCHC C/D for decompression. The SCHC C/D shares
225 the same rules with the device. The SCHC C/D and F/R can be located
226 on the Network Gateway (NGW) or in another place as long as a
227 communication is established between the NGW and the SCHC F/R, then
228 SCHC F/R and C/D. The SCHC C/D and F/R in the device and the SCHC
229 gateway MUST share the same set of rules. After decompression, the
230 packet can be sent on the Internet to one or several LPWAN
231 Application Servers (App).
233 The SCHC C/D and F/R process is bidirectional, so the same principles
234 can be applied to the other direction.
236 In a LoRaWAN network, the RGW is called a Gateway, the NGW is Network
237 Server, and the SCHC C/D and F/R are an Application Server. It can
238 be provided by the Network Gateway or any third party software.
239 Figure 1 can be mapped in LoRaWAN terminology to:
241 End Device App
242 +--------------+ +----+ +----+ +----+
243 |App1 App2 App3| |App1| |App2| |App3|
244 | | | | | | | |
245 | UDP | |UDP | |UDP | |UDP |
246 | IPv6 | |IPv6| |IPv6| |IPv6|
247 | | | | | | | |
248 |SCHC C/D & F/R| | | | | | |
249 +-------+------+ +----+ +----+ +----+
250 | +-------+ +-------+ +-----------+ . . .
251 +~ |Gateway| === |Network| == |Application|..... Internet ....
252 +-------+ |server | |server |
253 +-------+ | F/R - C/D |
254 +-----------+
255 |<- - - - - LoRaWAN - - - ->|
257 Figure 2: SCHC Architecture mapped to LoRaWAN
259 4. LoRaWAN Architecture
261 An overview of LoRaWAN [lora-alliance-spec] protocol and architecture
262 is described in [RFC8376]. The mapping between the LPWAN
263 architecture entities as described in [RFC8724] and the ones in
264 [lora-alliance-spec] is as follows:
266 o Devices are LoRaWAN End Devices (e.g. sensors, actuators, etc.).
267 There can be a very high density of devices per radio gateway
268 (LoRaWAN gateway). This entity maps to the LoRaWAN end-device.
270 o The Radio Gateway (RGW), which is the endpoint of the constrained
271 link. This entity maps to the LoRaWAN Gateway.
273 o The Network Gateway (NGW) is the interconnection node between the
274 Radio Gateway and the SCHC gateway (LoRaWAN Application server).
275 This entity maps to the LoRaWAN Network Server.
277 o SCHC C/D and F/R are handled by LoRaWAN Application Server; ie the
278 LoRaWAN application server will do the SCHC C/D and F/R.
280 o The LPWAN-AAA Server is the LoRaWAN Join Server. Its role is to
281 manage and deliver security keys in a secure way, so that the devices
282 root key is never exposed.
284 (LPWAN-AAA Server)
285 () () () | +------+
286 () () () () / \ +---------+ | Join |
287 () () () () () / \======| ^ |===|Server| +-----------+
288 () () () | | <--|--> | +------+ |Application|
289 () () () () / \==========| v |=============| Server |
290 () () () / \ +---------+ +-----------+
291 End-devices Gateways Network Server (SCHC C/D and F/R)
292 (devices) (RGW) (NGW)
294 Figure 3: LPWAN Architecture
296 _Note_: Figure 3 terms are from LoRaWAN, with [RFC8376] terminology
297 in brackets.
299 SCHC Compressor/Decompressor (SCHC C/D) and SCHC Fragmentation/
300 Reassembly (SCHC F/R) are performed on the LoRaWAN end-device and the
301 Application Server (called SCHC gateway). While the point-to-point
302 link between the device and the Application Server constitutes a
303 single IP hop, the ultimate end-point of the IP communication may be
304 an Internet node beyond the Application Server. In other words, the
305 LoRaWAN Application Server (SCHC gateway) acts as the first hop IP
306 router for the device. The Application Server and Network Server may
307 be co-located, which effectively turns the Network/Application Server
308 into the first hop IP router.
310 4.1. Device classes (A, B, C) and interactions
312 The LoRaWAN MAC layer supports 3 classes of devices named A, B and C.
313 All devices implement the Class A, some devices may implement Class B
314 or Class C. Class B and Class C are mutually exclusive.
316 o Class A: The Class A is the simplest class of devices. The device
317 is allowed to transmit at any time, randomly selecting a
318 communication channel. The Network Gateway may reply with a
319 downlink in one of the 2 receive windows immediately following the
320 uplinks. Therefore, the Network Gateway cannot initiate a
321 downlink, it has to wait for the next uplink from the device to
322 get a downlink opportunity. The Class A is the lowest power
323 consumption class.
325 o Class B: Class B devices implement all the functionalities of
326 Class A devices, but also schedule periodic listen windows.
327 Therefore, opposed to the Class A devices, Class B devices can
328 receive downlinks that are initiated by the Network Gateway and
329 not following an uplink. There is a trade-off between the
330 periodicity of those scheduled Class B listen windows and the
331 power consumption of the device: if the periodicity is high
332 downlinks from the NGW will be sent faster, but the device wakes
333 up more often: it will have higher power consumption.
335 o Class C: Class C devices implement all the functionalities of
336 Class A devices, but keep their receiver open whenever they are
337 not transmitting. Class C devices can receive downlinks at any
338 time at the expense of a higher power consumption. Battery-
339 powered devices can only operate in Class C for a limited amount
340 of time (for example for a firmware upgrade over-the-air). Most
341 of the Class C devices are grid powered (for example Smart Plugs).
343 4.2. Device addressing
345 LoRaWAN end-devices use a 32-bit network address (devAddr) to
346 communicate with the Network Gateway over-the-air, this address might
347 not be unique in a LoRaWAN network. Devices using the same devAddr
348 are distinguished by the Network Gateway based on the cryptographic
349 signature appended to every LoRaWAN frame.
351 To communicate with the SCHC gateway, the Network Gateway MUST
352 identify the devices by a unique 64-bit device identifier called the
353 DevEUI.
355 The DevEUI is assigned to the device during the manufacturing process
356 by the device's manufacturer. It is built like an Ethernet MAC
357 address by concatenating the manufacturer's IEEE OUI field with a
358 vendor unique number. e.g.: 24-bit OUI is concatenated with a 40-bit
359 serial number. The Network Gateway translates the devAddr into a
360 DevEUI in the uplink direction and reciprocally on the downlink
361 direction.
363 +--------+ +---------+ +---------+ +----------+
364 | Device | <=====> | Network | <====> | SCHC | <======> | Internet |
365 | | devAddr | Gateway | DevEUI | Gateway | IPv6/UDP | |
366 +--------+ +---------+ +---------+ +----------+
368 Figure 4: LoRaWAN addresses
370 4.3. General Frame Types
372 LoRaWAN implements the possibility to send confirmed or unconfirmed
373 frames:
375 o Confirmed frame: The sender asks the receiver to acknowledge the
376 frame.
378 o Unconfirmed frame: The sender does not ask the receiver to
379 acknowledge the frame.
381 As SCHC defines its own acknowledgment mechanisms, SCHC does not
382 require the use of LoRaWAN Confirmed frames (MType=0b100 as per
383 [lora-alliance-spec])
385 4.4. LoRaWAN MAC Frames
387 In addition to regular data frames, LoRaWAN implements JoinRequest
388 and JoinAccept frame types, which are used by a device to join a
389 network:
391 o JoinRequest: This frame is used by a device to join a network. It
392 contains the device's unique identifier DevEUI and a random nonce
393 that will be used for session key derivation.
395 o JoinAccept: To on-board a device, the Network Gateway responds to
396 the JoinRequest issued by a device with a JoinAccept frame. That
397 frame is encrypted with the device's AppKey and contains (amongst
398 other fields) the network's major settings and a random nonce used
399 to derive the session keys.
401 o Data: MAC and application data. Application data are protected
402 with AES-128 encryption. MAC related data are AES-128 encrypted
403 with another key.
405 4.5. LoRaWAN FPort
407 The LoRaWAN MAC layer features a frame port field in all frames.
408 This field (FPort) is 8 bits long and the values from 1 to 223 can be
409 used. It allows LoRaWAN networks and applications to identify data.
411 4.6. LoRaWAN empty frame
413 A LoRaWAN empty frame is a LoRaWAN frame without FPort (cf
414 Section 5.1) and FRMPayload.
416 4.7. Unicast and multicast technology
418 LoRaWAN technology supports unicast downlinks, but also multicast: a
419 packet sent over LoRaWAN radio link can be received by several
420 devices. It is useful to address many devices with same content,
421 either a large binary file (firmware upgrade), or same command (e.g:
422 lighting control). As IPv6 is also a multicast technology this
423 feature can be used to address a group of devices.
425 _Note 1_: IPv6 multicast addresses must be defined as per [RFC4291].
426 LoRaWAN multicast group definition in a Network Gateway and the
427 relation between those groups and IPv6 groupID are out of scope of
428 this document.
430 _Note 2_: LoRa Alliance defined [lora-alliance-remote-multicast-set]
431 as the RECOMMENDED way to setup multicast groups on devices and
432 create a synchronized reception window.
434 5. SCHC-over-LoRaWAN
436 5.1. LoRaWAN FPort and RuleID
438 The FPort field is part of the SCHC Message, as shown in Figure 5.
439 The SCHC C/D and the SCHC F/R SHALL concatenate the FPort field with
440 the LoRaWAN payload to recompose the SCHC Message.
442 | FPort | LoRaWAN payload |
443 + ------------------------ +
444 | SCHC Message |
446 Figure 5: SCHC Message in LoRaWAN
448 Note: SCHC Message is any datagram sent by SCHC C/D or F/R layers.
450 A fragmented datagram with application payload transferred from
451 device to Network Gateway, is called an uplink fragmented datagram.
452 It uses an FPort for data uplink and its associated SCHC control
453 downlinks, named FPortUp in this document. The other way, a
454 fragmented datagram with application payload transferred from Network
455 Gateway to device, is called downlink fragmented datagram. It uses
456 another FPort for data downlink and its associated SCHC control
457 uplinks, named FPortDown in this document.
459 All RuleID can use arbitrary values inside the FPort range allowed by
460 LoRaWAN specification and MUST be shared by the device and SCHC
461 gateway prior to the communication with the selected rule. The
462 uplink and downlink fragmentation FPorts MUST be different.
464 5.2. Rule ID management
466 RuleID MUST be 8 bits, encoded in the LoRaWAN FPort as described in
467 Section 5.1. LoRaWAN supports up to 223 application FPorts in the
468 range [1;223] as defined in section 4.3.2 of [lora-alliance-spec], it
469 implies that RuleID MSB SHOULD be inside this range. An application
470 can send non SCHC traffic by using FPort values different from the
471 ones used for SCHC.
473 In order to improve interoperability, RECOMMENDED fragmentation
474 RuleID values are:
476 o RuleID = 20 (8-bit) for uplink fragmentation, named FPortUp.
478 o RuleID = 21 (8-bit) for downlink fragmentation, named FPortDown.
480 o RuleID = 22 (8-bit) for which SCHC compression was not possible
481 (i.e., no matching compression Rule was found), as described in
482 [RFC8724] section 6.
484 FPortUp value MUST be different from FPortDown. The remaining
485 RuleIDs are available for compression. RuleIDs are shared between
486 uplink and downlink sessions. A RuleID not in the set(s) of FPortUp
487 or FPortDown means that the fragmentation is not used, thus, on
488 reception, the SCHC Message MUST be sent to the SCHC C/D layer.
490 The only uplink frames using the FPortDown port are the fragmentation
491 SCHC control messages of a downlink fragmented datagram (for example,
492 SCHC ACKs). Similarly, the only downlink frames using the FPortUp
493 port are the fragmentation SCHC control messages of an uplink
494 fragmented datagram.
496 An application can have multiple fragmented datagrams between a
497 device and one or several SCHC gateways. A set of FPort values is
498 REQUIRED for each SCHC gateway instance the device is required to
499 communicate with. The application can use additional uplinks or
500 downlink fragmented parameters but SHALL implement at least the
501 parameters defined in this document.
503 The mechanism for context distribution across devices and gateways is
504 outside the scope of this document.
506 5.3. Interface IDentifier (IID) computation
508 In order to mitigate the risks described in [RFC8064] and [RFC8065],
509 implementation MUST implement the following algorithm and SHOULD use
510 it.
512 1. key = LoRaWAN AppSKey
514 2. cmac = aes128_cmac(key, DevEUI)
516 3. IID = cmac[0..7]
518 aes128_cmac algorithm is described in [RFC4493]. It has been chosen
519 as it is already used by devices for LoRaWAN protocol.
521 As AppSKey is renewed each time a device joins or rejoins a LoRaWAN
522 network, the IID will change over time; this mitigates privacy,
523 location tracking and correlation over time risks. Join periodicity
524 is defined at the application level.
526 Address scan risk is mitigated thanks to AES-128, which provides
527 enough entropy bits of the IID.
529 Using this algorithm will also ensure that there is no correlation
530 between the hardware identifier (IEEE-64 DevEUI) and the IID, so an
531 attacker cannot use manufacturer OUI to target devices.
533 Example with:
535 o DevEUI: 0x1122334455667788
537 o appSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB
539 1. key: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB
540 2. cmac: 0xBA59F4B196C6C3432D9383C145AD412A
541 3. IID: 0xBA59F4B196C6C343
543 Figure 6: Example of IID computation.
545 There is a small probability of IID collision in a LoRaWAN network.
546 If this occurs, the IID can be changed by rekeying the device at L2
547 level (ie: trigger a LoRaWAN join). The way the device is rekeyed is
548 out of scope of this document and left to the implementation.
550 Note: Implementation also using another IID source MUST ensure that
551 the same IID is shared between the device and the SCHC gateway in the
552 compression and decompression of the IPv6 address of the device.
554 5.4. Padding
556 All padding bits MUST be 0.
558 5.5. Decompression
560 SCHC C/D MUST concatenate FPort and LoRaWAN payload to retrieve the
561 SCHC Packet as per Section 5.1.
563 RuleIDs matching FPortUp and FPortDown are reserved for SCHC
564 Fragmentation.
566 5.6. Fragmentation
568 The L2 Word Size used by LoRaWAN is 1 byte (8 bits). The SCHC
569 fragmentation over LoRaWAN uses the ACK-on-Error mode for uplink
570 fragmentation and Ack-Always mode for downlink fragmentation. A
571 LoRaWAN device cannot support simultaneous interleaved fragmented
572 datagrams in the same direction (uplink or downlink).
574 The fragmentation parameters are different for uplink and downlink
575 fragmented datagrams and are successively described in the next
576 sections.
578 5.6.1. DTag
580 [RFC8724] section 8.2.4 describes the possibility to interleave
581 several fragmented SCHC datagrams for the same RuleID. This is not
582 used in SCHC over LoRaWAN profile. A device cannot interleave
583 several fragmented SCHC datagrams on the same FPort. This field is
584 not used and its size is 0.
586 Note: The device can still have several parallel fragmented datagrams
587 with more than one SCHC gateway thanks to distinct sets of FPorts, cf
588 Section 5.2.
590 5.6.2. Uplink fragmentation: From device to SCHC gateway
592 In this case, the device is the fragment transmitter, and the SCHC
593 gateway the fragment receiver. A single fragmentation rule is
594 defined. SCHC F/R MUST concatenate FPort and LoRaWAN payload to
595 retrieve the SCHC Packet, as per Section 5.1.
597 o SCHC fragmentation reliability mode: "ACK-on-Error".
599 o SCHC header size is two bytes (the FPort byte + 1 additional
600 byte).
602 o RuleID: 8 bits stored in LoRaWAN FPort. cf Section 5.2
604 o DTag: Size T=0 bit, not used. cf Section 5.6.1
606 o Window index: 4 windows are used, encoded on M = 2 bits
608 o FCN: The FCN field is encoded on N = 6 bits, so WINDOW_SIZE = 63
609 tiles are allowed in a window.
611 o Last tile: it can be carried in a Regular SCHC Fragment, alone in
612 an All-1 SCHC Fragment or with any of these two methods.
613 Implementation must ensure that:
615 * The sender MUST ascertain that the receiver will not receive
616 the last tile through both a Regular SCHC Fragment and an All-1
617 SCHC Fragment during the same session.
619 * If the last tile is in All-1 SCHC message: current L2 MTU MUST
620 be big enough to fit the All-1 header and the last tile.
622 o Penultimate tile MUST be equal to the regular size.
624 o RCS: Use recommended calculation algorithm in [RFC8724] (S.8.2.3.
625 Integrity Checking).
627 o Tile: size is 10 bytes.
629 o Retransmission timer: Set by the implementation depending on the
630 application requirements. The default RECOMMENDED duration of
631 this timer is 12 hours; this value is mainly driven by application
632 requirements and MAY be changed by the application.
634 o Inactivity timer: The SCHC gateway implements an "inactivity
635 timer". The default RECOMMENDED duration of this timer is 12
636 hours; this value is mainly driven by application requirements and
637 MAY be changed by the application.
639 o MAX_ACK_REQUESTS: 8. With this set of parameters, the SCHC
640 fragment header is 16 bits, including FPort; payload overhead will
641 be 8 bits as FPort is already a part of LoRaWAN payload. MTU is:
642 _4 windows * 63 tiles * 10 bytes per tile = 2520 bytes_
644 In addition to the per-rule context parameters specified in
645 [RFC8724], for uplink rules, an additional context parameter is
646 added: whether or not to ack after each window.
647 For battery powered devices, it is RECOMMENDED to use the ACK
648 mechanism at the end of each window instead of waiting until the end
649 of all windows:
651 o The SCHC receiver SHOULD send a SCHC ACK after every window even
652 if there is no missing tile.
654 o The SCHC sender SHOULD wait for the SCHC ACK from the SCHC
655 receiver before sending tiles from the next window. If the SCHC
656 ACK is not received, it SHOULD send a SCHC ACK REQ up to
657 MAX_ACK_REQUESTS times, as described previously.
659 This will avoid useless uplinks if the device has lost network
660 coverage.
662 For non-battery powered devices, the SCHC receiver MAY also choose to
663 send a SCHC ACK only at the end of all windows. This will reduce
664 downlink load on the LoRaWAN network, by reducing the number of
665 downlinks.
667 SCHC implementations MUST be compatible with both behaviors, and this
668 selection is part of the rule context.
670 5.6.2.1. Regular fragments
672 | FPort | LoRaWAN payload |
673 + ------ + ------------------------- +
674 | RuleID | W | FCN | Payload |
675 + ------ + ------ + ------ + ------- +
676 | 8 bits | 2 bits | 6 bits | |
678 Figure 7: All fragments except the last one. SCHC header size is 16
679 bits, including LoRaWAN FPort.
681 5.6.2.2. Last fragment (All-1)
683 | FPort | LoRaWAN payload |
684 + ------ + ---------------------------- +
685 | RuleID | W | FCN=All-1 | RCS |
686 + ------ + ------ + --------- + ------- +
687 | 8 bits | 2 bits | 6 bits | 32 bits |
689 Figure 8: All-1 SCHC Message: the last fragment without last tile.
691 | FPort | LoRaWAN payload |
692 + ------ + ---------------------------------------------------------- +
693 | RuleID | W | FCN=All-1 | RCS | Last tile | Opt. padding |
694 + ------ + ------ + --------- + ------- + ------------ + ------------ +
695 | 8 bits | 2 bits | 6 bits | 32 bits | 1 to 80 bits | 0 to 7 bits |
697 Figure 9: All-1 SCHC Message: the last fragment with last tile.
699 5.6.2.3. SCHC ACK
700 | FPort | LoRaWAN payload |
701 + ------ + --------------------------+
702 | RuleID | W | C = 1 | padding |
703 | | | | (b'00000) |
704 + ------ + ----- + ----- + --------- +
705 | 8 bits | 2 bit | 1 bit | 5 bits |
707 Figure 10: SCHC ACK format, correct RCS check.
709 | FPort | LoRaWAN payload |
710 + ------ + --------------------------------- + ---------------- +
711 | RuleID | W | C = 0 | Compressed bitmap | Optional padding |
712 | | | | (C = 0) | (b'0...0) |
713 + ------ + ----- + ----- + ----------------- + ---------------- +
714 | 8 bits | 2 bit | 1 bit | 5 to 63 bits | 0, 6 or 7 bits |
716 Figure 11: SCHC ACK format, failed RCS check.
718 Note: Because of the bitmap compression mechanism and L2 byte
719 alignment, only the following discrete values are possible for the
720 compressed bitmap size: 5, 13, 21, 29, 37, 45, 53, 61, 62 and 63.
721 Bitmaps of 63 bits will require 6 bits of padding.
723 5.6.2.4. Receiver-Abort
725 | FPort | LoRaWAN payload |
726 + ------ + -------------------------------------------- +
727 | RuleID | W = b'11 | C = 1 | b'11111 | 0xFF (all 1's) |
728 + ------ + -------- + ------+-------- + ----------------+
729 | 8 bits | 2 bits | 1 bit | 5 bits | 8 bits |
730 next L2 Word boundary ->| <-- L2 Word --> |
732 Figure 12: Receiver-Abort format.
734 5.6.2.5. SCHC acknowledge request
736 | FPort | LoRaWAN payload |
737 +------- +------------------------- +
738 | RuleID | W | FCN = b'000000 |
739 + ------ + ------ + --------------- +
740 | 8 bits | 2 bits | 6 bits |
742 Figure 13: SCHC ACK REQ format.
744 5.6.3. Downlink fragmentation: From SCHC gateway to device
746 In this case, the device is the fragmentation receiver, and the SCHC
747 gateway the fragmentation transmitter. The following fields are
748 common to all devices. SCHC F/R MUST concatenate FPort and LoRaWAN
749 payload to retrieve the SCHC Packet as described in Section 5.1.
751 o SCHC fragmentation reliability mode:
753 * Unicast downlinks: ACK-Always.
755 * Multicast downlinks: No-ACK, reliability has to be ensured by
756 the upper layer. This feature is OPTIONAL and may not be
757 implemented by SCHC gateway.
759 o RuleID: 8 bits stored in LoRaWAN FPort. cf Section 5.2
761 o DTag: Size T=0 bit, not used. cf Section 5.6.1
763 o FCN: The FCN field is encoded on N=1 bit, so WINDOW_SIZE = 1 tile.
765 o RCS: Use recommended calculation algorithm in [RFC8724] (S.8.2.3.
766 Integrity Checking).
768 o Inactivity timer: The default RECOMMENDED duration of this timer
769 is 12 hours; this value is mainly driven by application
770 requirements and MAY be changed by the application.
772 The following parameters apply to ACK-Always (Unicast) only:
774 o Retransmission timer: See Section 5.6.3.5.
776 o MAX_ACK_REQUESTS: 8.
778 o Window index (unicast only): encoded on M=1 bit, as per [RFC8724].
780 As only 1 tile is used, its size can change for each downlink, and
781 will be the currently available MTU.
783 Class A devices can only receive during an RX slot, following the
784 transmission of an uplink. Therefore the SCHC gateway cannot
785 initiate communication (e.g., start a new SCHC session). In order to
786 create a downlink opportunity it is RECOMMENDED for Class A devices
787 to send an uplink every 24 hours when no SCHC session is started,
788 this is application specific and can be disabled. The RECOMMENDED
789 uplink is a LoRaWAN empty frame as defined Section 4.6. As this
790 uplink is to open an RX window, any LoRaWAN uplink frame from the
791 device MAY reset this counter.
793 _Note_: The Fpending bit included in LoRaWAN protocol SHOULD NOT be
794 used for SCHC-over-LoRaWAN protocol. It might be set by the Network
795 Gateway for other purposes but not SCHC needs.
797 5.6.3.1. Regular fragments
799 | FPort | LoRaWAN payload |
800 + ------ + ------------------------------------ +
801 | RuleID | W | FCN = b'0 | Payload |
802 + ------ + ----- + --------- + ---------------- +
803 | 8 bits | 1 bit | 1 bit | X bytes + 6 bits |
805 Figure 14: All fragments but the last one. Header size 10 bits,
806 including LoRaWAN FPort.
808 5.6.3.2. Last fragment (All-1)
810 | FPort | LoRaWAN payload |
811 + ------ + --------------------------- + ------------------------- +
812 | RuleID | W | FCN = b'1 | RCS | Payload | Opt padding |
813 + ------ + ----- + --------- + ------- + ----------- + ----------- +
814 | 8 bits | 1 bit | 1 bit | 32 bits | 6 to X bits | 0 to 7 bits |
816 Figure 15: All-1 SCHC Message: the last fragment.
818 5.6.3.3. SCHC ACK
820 | FPort | LoRaWAN payload |
821 + ------ + ---------------------------------- +
822 | RuleID | W | C = b'1 | Padding b'000000 |
823 + ------ + ----- + ------- + ---------------- +
824 | 8 bits | 1 bit | 1 bit | 6 bits |
826 Figure 16: SCHC ACK format, RCS is correct.
828 | FPort | LoRaWAN payload |
829 + ------ + ------------------------------------------------- +
830 | RuleID | W | C = b'0 | Bitmap = b'1 | Padding b'000000 |
831 + ------ + ----- + ------- + ------------ + ---------------- +
832 | 8 bits | 1 bit | 1 bit | 1 bit | 5 bits |
834 Figure 17: SCHC ACK format, RCS is incorrect.
836 5.6.3.4. Receiver-Abort
838 | FPort | LoRaWAN payload |
839 + ------ + ---------------------------------------------- +
840 | RuleID | W = b'1 | C = b'1 | b'111111 | 0xFF (all 1's) |
841 + ------ + ------- + ------- + -------- + --------------- +
842 | 8 bits | 1 bit | 1 bits | 6 bits | 8 bits |
843 next L2 Word boundary ->| <-- L2 Word --> |
845 Figure 18: Receiver-Abort packet (following an All-1 SCHC Fragment
846 with incorrect RCS).
848 5.6.3.5. Downlink retransmission timer
850 Class A and Class B or Class C devices do not manage retransmissions
851 and timers the same way.
853 5.6.3.5.1. Class A devices
855 Class A devices can only receive in an RX slot following the
856 transmission of an uplink.
858 The SCHC gateway implements an inactivity timer with a RECOMMENDED
859 duration of 36 hours. For devices with very low transmission rates
860 (example 1 packet a day in normal operation), that duration may be
861 extended: it is application specific.
863 RETRANSMISSION_TIMER is application specific and its RECOMMENDED
864 value is INACTIVITY_TIMER/(MAX_ACK_REQUESTS + 1).
866 *SCHC All-0 (FCN=0)*
868 All fragments but the last have an FCN=0 (because window size is 1).
869 Following an All-0 SCHC Fragment, the device MUST transmit the SCHC
870 ACK message. It MUST transmit up to MAX_ACK_REQUESTS SCHC ACK
871 messages before aborting. In order to progress the fragmented
872 datagram, the SCHC layer should immediately queue for transmission
873 those SCHC ACK if no SCHC downlink have been received during RX1 and
874 RX2 window. LoRaWAN layer will respect the applicable local spectrum
875 regulation.
877 _Note_: The ACK bitmap is 1 bit long and is always 1.
879 *SCHC All-1 (FCN=1)*
880 SCHC All-1 is the last fragment of a datagram, the corresponding SCHC
881 ACK message might be lost; therefore the SCHC gateway MUST request a
882 retransmission of this ACK when the retransmission timer expires. To
883 open a downlink opportunity the device MUST transmit an uplink every
884 RETRANSMISSION_TIMER/(MAX_ACK_REQUESTS *
885 SCHC_ACK_REQ_DN_OPPORTUNITY). The format of this uplink is
886 application specific. It is RECOMMENDED for a device to send an
887 empty frame (see Section 4.6) but it is application specific and will
888 be used by the NGW to transmit a potential SCHC ACK REQ.
889 SCHC_ACK_REQ_DN_OPPORTUNITY is application specific and its
890 recommended value is 2. It MUST be greater than 1. This allows to
891 open a downlink opportunity to any downlink with higher priority than
892 the SCHC ACK REQ message.
894 _Note_: The device MUST keep this SCHC ACK message in memory until it
895 receives a downlink SCHC Fragmentation Message (with FPort ==
896 FPortDown) that is not a SCHC ACK REQ: it indicates that the SCHC
897 gateway has received the SCHC ACK message.
899 5.6.3.6. Class B or Class C devices
901 Class B devices can receive in scheduled RX slots or in RX slots
902 following the transmission of an uplink. Class C devices are almost
903 in constant reception.
905 RECOMMENDED retransmission timer value:
907 o Class B: 3 times the ping slot periodicity.
909 o Class C: 30 seconds.
911 The RECOMMENDED inactivity timer value is 12 hours for both Class B
912 and Class C devices.
914 5.7. SCHC Fragment Format
916 5.7.1. All-0 SCHC fragment
918 *Uplink fragmentation (Ack-On-Error)*:
920 All-0 is distinguishable from a SCHC ACK REQ as [RFC8724] states
921 _This condition is also met if the SCHC Fragment Header is a multiple
922 of L2 Words_; this condition met: SCHC header is 2 bytes.
924 *Downlink fragmentation (Ack-always)*:
926 As per [RFC8724] the SCHC All-1 MUST contain the last tile,
927 implementation must ensure that SCHC All-0 message Payload will be at
928 least the size of an L2 Word.
930 5.7.2. All-1 SCHC fragment
932 All-1 is distinguishable from a SCHC Sender-Abort as [RFC8724] states
933 _This condition is met if the RCS is present and is at least the size
934 of an L2 Word_; this condition met: RCS is 4 bytes.
936 5.7.3. Delay after each LoRaWAN frame to respect local regulation
938 This profile does not define a delay to be added after each LoRaWAN
939 frame, local regulation compliance is expected to be enforced by
940 LoRaWAN stack.
942 6. Security Considerations
944 This document is only providing parameters that are expected to be
945 best suited for LoRaWAN networks for [RFC8724]. IID security is
946 discussed in Section 5.3. As such, this document does not contribute
947 to any new security issues beyond those already identified in
948 [RFC8724]. Moreover, SCHC data (LoRaWAN payload) are protected at
949 the LoRaWAN level by an AES-128 encryption with a session key shared
950 by the device and the SCHC gateway. These session keys are renewed
951 at each LoRaWAN session (ie: each join or rejoin to the LoRaWAN
952 network)
954 7. IANA Considerations
956 This document has no IANA actions.
958 Acknowledgements
960 Thanks to all those listed in the Contributors section for the
961 excellent text, insightful discussions, reviews and suggestions, and
962 also to (in alphabetical order) Dominique Barthel, Arunprabhu
963 Kandasamy, Rodrigo Munoz, Alexander Pelov, Pascal Thubert, Laurent
964 Toutain for useful design considerations, reviews and comments.
966 Contributors
968 Contributors ordered by family name.
970 Vincent Audebert
971 EDF R&D
972 Email: vincent.audebert@edf.fr
973 Julien Catalano
974 Kerlink
975 Email: j.catalano@kerlink.fr
977 Michael Coracin
978 Semtech
979 Email: mcoracin@semtech.com
981 Marc Le Gourrierec
982 Sagemcom
983 Email: marc.legourrierec@sagemcom.com
985 Nicolas Sornin
986 Semtech
987 Email: nsornin@semtech.com
989 Alper Yegin
990 Actility
991 Email: alper.yegin@actility.com
993 10. References
995 10.1. Normative References
997 [lora-alliance-spec]
998 Alliance, L., "LoRaWAN Specification Version V1.0.4",
999 .
1002 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
1003 Requirement Levels", BCP 14, RFC 2119,
1004 DOI 10.17487/RFC2119, March 1997,
1005 .
1007 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing
1008 Architecture", RFC 4291, DOI 10.17487/RFC4291, February
1009 2006, .
1011 [RFC4493] Song, JH., Poovendran, R., Lee, J., and T. Iwata, "The
1012 AES-CMAC Algorithm", RFC 4493, DOI 10.17487/RFC4493, June
1013 2006, .
1015 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
1016 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
1017 May 2017, .
1019 [RFC8724] Minaburo, A., Toutain, L., Gomez, C., Barthel, D., and JC.
1020 Zuniga, "SCHC: Generic Framework for Static Context Header
1021 Compression and Fragmentation", RFC 8724,
1022 DOI 10.17487/RFC8724, April 2020,
1023 .
1025 10.2. Informative References
1027 [lora-alliance-remote-multicast-set]
1028 Alliance, L., "LoRaWAN Remote Multicast Setup
1029 Specification Version 1.0.0", .
1033 [RFC8064] Gont, F., Cooper, A., Thaler, D., and W. Liu,
1034 "Recommendation on Stable IPv6 Interface Identifiers",
1035 RFC 8064, DOI 10.17487/RFC8064, February 2017,
1036 .
1038 [RFC8065] Thaler, D., "Privacy Considerations for IPv6 Adaptation-
1039 Layer Mechanisms", RFC 8065, DOI 10.17487/RFC8065,
1040 February 2017, .
1042 [RFC8376] Farrell, S., Ed., "Low-Power Wide Area Network (LPWAN)
1043 Overview", RFC 8376, DOI 10.17487/RFC8376, May 2018,
1044 .
1046 10.3. URIs
1048 [1] https://www.lora-alliance.org
1050 Appendix A. Examples
1052 In following examples "applicative data" refers to the IPv6 payload
1053 sent by the application to the SCHC layer.
1055 A.1. Uplink - Compression example - No fragmentation
1057 This example represents an applicative data going through SCHC over
1058 LoRaWAN, no fragmentation required
1060 An applicative data of 78 bytes is passed to SCHC compression layer.
1061 Rule 1 is used by SCHC C/D layer, allowing to compress it to 40 bytes
1062 and 5 bits: 1 byte RuleID, 21 bits residue + 37 bytes payload.
1064 | RuleID | Compression residue | Payload | Padding=b'000 |
1065 + ------ + ------------------- + --------- + ------------- +
1066 | 1 | 21 bits | 37 bytes | 3 bits |
1068 Figure 19: Uplink example: SCHC Message
1070 The current LoRaWAN MTU is 51 bytes, although 2 bytes FOpts are used
1071 by LoRaWAN protocol: 49 bytes are available for SCHC payload; no need
1072 for fragmentation. The payload will be transmitted through FPort =
1073 1.
1075 | LoRaWAN Header | LoRaWAN payload (40 bytes) |
1076 + ------------------------- + --------------------------------------- +
1077 | | FOpts | RuleID=1 | Compression | Payload | Padding=b'000 |
1078 | | | | residue | | |
1079 + ---- + ------- + -------- + ----------- + --------- + ------------- +
1080 | XXXX | 2 bytes | 1 byte | 21 bits | 37 bytes | 3 bits |
1082 Figure 20: Uplink example: LoRaWAN packet
1084 A.2. Uplink - Compression and fragmentation example
1086 This example represents an applicative data going through SCHC, with
1087 fragmentation.
1089 An applicative data of 300 bytes is passed to SCHC compression layer.
1090 Rule 1 is used by SCHC C/D layer, allowing to compress it to 282
1091 bytes and 5 bits: 1 byte RuleID, 21 bits residue + 279 bytes payload.
1093 | RuleID | Compression residue | Payload |
1094 + ------ + ------------------- + --------- +
1095 | 1 | 21 bits | 279 bytes |
1097 Figure 21: Uplink example: SCHC Message
1099 The current LoRaWAN MTU is 11 bytes, 0 bytes FOpts are used by
1100 LoRaWAN protocol: 11 bytes are available for SCHC payload + 1 byte
1101 FPort field. SCHC header is 2 bytes (including FPort) so 1 tile is
1102 sent in first fragment.
1104 | LoRaWAN Header | LoRaWAN payload (11 bytes) |
1105 + -------------------------- + -------------------------- +
1106 | | RuleID=20 | W | FCN | 1 tile |
1107 + -------------- + --------- + ----- + ------ + --------- +
1108 | XXXX | 1 byte | 0 0 | 62 | 10 bytes |
1110 Figure 22: Uplink example: LoRaWAN packet 1
1112 Content of the tile is:
1113 | RuleID | Compression residue | Payload |
1114 + ------ + ------------------- + ----------------- +
1115 | 1 | 21 bits | 6 bytes + 3 bits |
1117 Figure 23: Uplink example: LoRaWAN packet 1 - Tile content
1119 Next transmission MTU is 11 bytes, although 2 bytes FOpts are used by
1120 LoRaWAN protocol: 9 bytes are available for SCHC payload + 1 byte
1121 FPort field, a tile does not fit inside so LoRaWAN stack will send
1122 only FOpts.
1124 Next transmission MTU is 242 bytes, 4 bytes FOpts. 23 tiles are
1125 transmitted:
1127 | LoRaWAN Header | LoRaWAN payload (231 bytes) |
1128 + --------------------------------------+ --------------------------- +
1129 | | FOpts | RuleID=20 | W | FCN | 23 tiles |
1130 + -------------- + ------- + ---------- + ----- + ----- + ----------- +
1131 | XXXX | 4 bytes | 1 byte | 0 0 | 61 | 230 bytes |
1133 Figure 24: Uplink example: LoRaWAN packet 2
1135 Next transmission MTU is 242 bytes, no FOpts. All 5 remaining tiles
1136 are transmitted, the last tile is only 2 bytes + 5 bits. Padding is
1137 added for the remaining 3 bits.
1139 | LoRaWAN Header | LoRaWAN payload (44 bytes) |
1140 + ---- + ---------- + ----------------------------------------------- +
1141 | | RuleID=20 | W | FCN | 5 tiles | Padding=b'000 |
1142 + ---- + ---------- + ----- + ----- + --------------- + ------------- +
1143 | XXXX | 1 byte | 0 0 | 38 | 42 bytes+5 bits | 3 bits |
1145 Figure 25: Uplink example: LoRaWAN packet 3
1147 Then All-1 message can be transmitted:
1149 | LoRaWAN Header | LoRaWAN payload (44 bytes) |
1150 + ---- + -----------+ -------------------------- +
1151 | | RuleID=20 | W | FCN | RCS |
1152 + ---- + ---------- + ----- + ----- + ---------- +
1153 | XXXX | 1 byte | 0 0 | 63 | 4 bytes |
1155 Figure 26: Uplink example: LoRaWAN packet 4 - All-1 SCHC message
1157 All packets have been received by the SCHC gateway, computed RCS is
1158 correct so the following ACK is sent to the device by the SCHC
1159 receiver:
1161 | LoRaWAN Header | LoRaWAN payload |
1162 + -------------- + --------- + ------------------- +
1163 | | RuleID=20 | W | C | Padding |
1164 + -------------- + --------- + ----- + - + ------- +
1165 | XXXX | 1 byte | 0 0 | 1 | 5 bits |
1167 Figure 27: Uplink example: LoRaWAN packet 5 - SCHC ACK
1169 A.3. Downlink
1171 An applicative data of 155 bytes is passed to SCHC compression layer.
1172 Rule 1 is used by SCHC C/D layer, allowing to compress it to 130
1173 bytes and 5 bits: 1 byte RuleID, 21 bits residue + 127 bytes payload.
1175 | RuleID | Compression residue | Payload |
1176 + ------ + ------------------- + --------- +
1177 | 1 | 21 bits | 127 bytes |
1179 Figure 28: Downlink example: SCHC Message
1181 The current LoRaWAN MTU is 51 bytes, no FOpts are used by LoRaWAN
1182 protocol: 51 bytes are available for SCHC payload + FPort field => it
1183 has to be fragmented.
1185 | LoRaWAN Header | LoRaWAN payload (51 bytes) |
1186 + ---- + ---------- + -------------------------------------- +
1187 | | RuleID=21 | W = 0 | FCN = 0 | 1 tile |
1188 + ---- + ---------- + ------ + ------- + ------------------- +
1189 | XXXX | 1 byte | 1 bit | 1 bit | 50 bytes and 6 bits |
1191 Figure 29: Downlink example: LoRaWAN packet 1 - SCHC Fragment 1
1193 Content of the tile is:
1195 | RuleID | Compression residue | Payload |
1196 + ------ + ------------------- + ------------------ +
1197 | 1 | 21 bits | 48 bytes and 1 bit |
1199 Figure 30: Downlink example: LoRaWAN packet 1: Tile content
1201 The receiver answers with a SCHC ACK:
1203 | LoRaWAN Header | LoRaWAN payload |
1204 + ---- + --------- + -------------------------------- +
1205 | | RuleID=21 | W = 0 | C = 1 | Padding=b'000000 |
1206 + ---- + --------- + ----- + ----- + ---------------- +
1207 | XXXX | 1 byte | 1 bit | 1 bit | 6 bits |
1209 Figure 31: Downlink example: LoRaWAN packet 2 - SCHC ACK
1211 The second downlink is sent, two FOpts:
1213 | LoRaWAN Header | LoRaWAN payload (49 bytes) |
1214 + --------------------------- + ------------------------------------- +
1215 | | FOpts | RuleID=21 | W = 1 | FCN = 0 | 1 tile |
1216 + ---- + ------- + ---------- + ----- + ------- + ------------------- +
1217 | XXXX | 2 bytes | 1 byte | 1 bit | 1 bit | 48 bytes and 6 bits |
1219 Figure 32: Downlink example: LoRaWAN packet 3 - SCHC Fragment 2
1221 The receiver answers with an SCHC ACK:
1223 | LoRaWAN Header | LoRaWAN payload |
1224 + ---- + --------- + -------------------------------- +
1225 | | RuleID=21 | W = 1 | C = 1 | Padding=b'000000 |
1226 + ---- + --------- + ----- + ----- + ---------------- +
1227 | XXXX | 1 byte | 1 bit | 1 bit | 6 bits |
1229 Figure 33: Downlink example: LoRaWAN packet 4 - SCHC ACK
1231 The last downlink is sent, no FOpts:
1233 | LoRaWAN Header | LoRaWAN payload (37 bytes) |
1234 + ---- + ------- + --------------------------------------------------- +
1235 | | RuleID | W | FCN | RCS | 1 tile | Padding |
1236 | | 21 | 0 | 1 | | | b'00000 |
1237 + ---- + ------- + ----- + ----- + ------- + --------------- + ------- +
1238 | XXXX | 1 byte | 1 bit | 1 bit | 4 bytes | 31 bytes+1 bits | 5 bits |
1240 Figure 34: Downlink example: LoRaWAN packet 5 - All-1 SCHC message
1242 The receiver answers to the sender with an SCHC ACK:
1244 | LoRaWAN Header | LoRaWAN payload |
1245 + ---- + --------- + -------------------------------- +
1246 | | RuleID=21 | W = 0 | C = 1 | Padding=b'000000 |
1247 + ---- + --------- + ----- + ----- + ---------------- +
1248 | XXXX | 1 byte | 1 bit | 1 bit | 6 bits |
1250 Figure 35: Downlink example: LoRaWAN packet 6 - SCHC ACK
1252 Authors' Addresses
1254 Olivier Gimenez (editor)
1255 Semtech
1256 14 Chemin des Clos
1257 Meylan
1258 France
1260 Email: ogimenez@semtech.com
1262 Ivaylo Petrov (editor)
1263 Acklio
1264 1137A Avenue des Champs Blancs
1265 35510 Cesson-Sevigne Cedex
1266 France
1268 Email: ivaylo@ackl.io