Arduino LMIC
6.0.1
Arduino LoRaWAN(r) MAC in C
Toggle main menu visibility
Loading...
Searching...
No Matches
lorabase_as923.h
1
/*
2
* Copyright (c) 2014-2016 IBM Corporation.
3
* All rights reserved.
4
*
5
* Copyright (c) 2017 MCCI Corporation
6
* All rights reserved.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions are met:
10
* * Redistributions of source code must retain the above copyright
11
* notice, this list of conditions and the following disclaimer.
12
* * Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in the
14
* documentation and/or other materials provided with the distribution.
15
* * Neither the name of the <organization> nor the
16
* names of its contributors may be used to endorse or promote products
17
* derived from this software without specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
* DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
23
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
31
#ifndef _lorabase_as923_h_
32
#define _lorabase_as923_h_
33
34
#ifndef _LMIC_CONFIG_PRECONDITIONS_H_
35
# include "lmic_config_preconditions.h"
36
#endif
37
38
/****************************************************************************\
39
|
40
| Basic definitions for AS923 (always in scope)
41
|
42
\****************************************************************************/
43
44
enum
_dr_as923_t {
45
AS923_DR_SF12 = 0,
46
AS923_DR_SF11,
47
AS923_DR_SF10,
48
AS923_DR_SF9,
49
AS923_DR_SF8,
50
AS923_DR_SF7,
51
AS923_DR_SF7B,
52
AS923_DR_FSK,
53
AS923_DR_NONE
54
};
55
56
// Bands:
57
// g1 : 1% 16dBm
58
// freq band datarates
59
enum
{
60
AS923_F1 = 923200000,
// g1 SF7-12
61
AS923_F2 = 923400000,
// g1 SF7-12
62
AS923_FDOWN = 923200000,
// (RX2 freq, DR2)
63
AS923_FBCN = 923400000,
// default BCN, DR3
64
AS923_FPING = 923400000,
// default ping, DR3
65
};
66
enum
{
67
AS923_FREQ_MIN = 915000000,
68
AS923_FREQ_MAX = 928000000
69
};
70
enum
{
71
AS923_JP_TX_EIRP_MAX_DBM = 13,
// 13 dBm = 19.95mW < 20mW
72
AS923_TX_EIRP_MAX_DBM = 16
// 16 dBm
73
};
74
enum
{ DR_PAGE_AS923 = 0x10 * (LMIC_REGION_as923 - 1) };
75
76
enum
{ AS923_LMIC_REGION_EIRP = 1 };
// region uses EIRP
77
78
enum
{ AS923JP_LBT_US = 5000 };
// microseconds of LBT time -- 5000 ==>
79
// 5 ms. We use us rather than ms for
80
// future 128us support, and just for
81
// backward compatibility -- there
82
// is code that uses the _US constant,
83
// and it's awkward to break it.
84
85
enum
{ AS923JP_LBT_DB_MAX = -80 };
// maximum channel strength in dB; if TX
86
// we measure more than this, we don't tx.
87
88
// AS923 v1.1, all channels face a 1% duty cycle. So this will have to change
89
// in the future via a config. But this code base needs major changes for
90
// v1.1 in any case.
91
enum
{ AS923_V102_TX_CAP = 100 };
// v1.0.2 allows 100%
92
93
#ifndef AS923_TX_CAP
94
# define AS923_TX_CAP AS923_V102_TX_CAP
95
#endif
96
97
// TxParam defaults
98
enum
{
99
// initial value of UplinkDwellTime before TxParamSetupReq received.
100
AS923_INITIAL_TxParam_UplinkDwellTime = 1,
101
// initial value of DownlinkDwellTime before TxParamSetupReq received.
102
AS923_INITIAL_TxParam_DownlinkDwellTime = 1,
103
AS923_UPLINK_DWELL_TIME_osticks = sec2osticks(20),
104
};
105
106
#endif
/* _lorabase_as923_h_ */
src
lmic
lorabase_as923.h
Generated on
for Arduino LMIC by
1.18.0