Arduino LMIC 6.0.1
Arduino LoRaWAN(r) MAC in C
Loading...
Searching...
No Matches
lorawan_spec_compliance.h
1/*
2
3Module: lorawan_spec_compliance.h
4
5Function:
6 Details from the LoRaWAN specification for compliance.
7
8Copyright notice and license info:
9 See LICENSE file accompanying this project.
10
11Author:
12 Terry Moore, MCCI Corporation March 2019
13
14*/
15
16#ifndef _lorawan_spec_COMPLIANCE_H_ /* prevent multiple includes */
17#define _lorawan_spec_COMPLIANCE_H_
18
19#ifdef __cplusplus
20extern "C"{
21#endif
22
23enum {
24 // the port for MAC commands
25 LORAWAN_PORT_MAC = 0u,
26 // the first port available for applications
27 LORAWAN_PORT_USER_MIN = 1u,
28 // the last port available for applications
29 LORAWAN_PORT_USER_MAX = 223u,
30 // the base of the reserved port numbers
31 LORAWAN_PORT_RESERVED = 224u,
32 // the port for the compliance protocol
33 LORAWAN_PORT_COMPLIANCE = LORAWAN_PORT_RESERVED + 0u,
34};
35
36enum lowawan_compliance_cmd_e {
37 LORAWAN_COMPLIANCE_CMD_DEACTIVATE = 0u,
38 LORAWAN_COMPLIANCE_CMD_ACTIVATE = 1u,
39 LORAWAN_COMPLIANCE_CMD_SET_CONFIRM = 2u,
40 LORAWAN_COMPLIANCE_CMD_SET_UNCONFIRM = 3u,
41 LORAWAN_COMPLIANCE_CMD_ECHO = 4u,
42 LORAWAN_COMPLIANCE_CMD_LINK = 5u,
43 LORAWAN_COMPLIANCE_CMD_JOIN = 6u,
44 LORAWAN_COMPLIANCE_CMD_CW = 7u,
45 LORAWAN_COMPLIANCE_CMD_MFG_BASE = 0x80u,
46};
47
48typedef unsigned char lorawan_compliance_cmd_t;
49
50// info on specific commands
51enum {
52 LORAWAN_COMPLIANCE_CMD_ACTIVATE_LEN = 4u,
53 LORAWAN_COMPLIANCE_CMD_ACTIVATE_MAGIC = 1u,
54
55 // Maximum crypto frame size; although the spec says 18, it
56 // is also used for testing max packet size.
57 LORAWAN_COMPLIANCE_CMD_ECHO_LEN_MAX = 242u,
58};
59
60#ifdef __cplusplus
61} // extern "C"
62#endif
63
64#endif /* _lorawan_spec_COMPLIANCE_H_ */