see dragino.toml file below
# dragino.toml
#
# The [TTN] section here contains only default starting values/keys for which are used to create cache.json, if it doesn't exist,
# when the code first runs.
#
# After joining TTN, cache.json is updated with the TTN supplied devaddr and keys etc.
#
#
# if auth_mode="OTAA":-
# If cache.json does not exist the code will try to send a JOIN_REQUEST only if devaddr = [0x00, 0x00,x00,x00]
# However, if cache.json exists the code will use the values therein and not try to send a JOIN_REQUEST
#
# if auth_mode="ABP":-
# you must provide all the TTN keys etc in the [TTN.ABP] section
[GPSD]
threaded=true # non-blocking operation get_gps() will return last cached valid reading
threadLoopDelay=0.5 # number of seconds to check GPS for a valid reading
[TTN]
# uplink frequency is randomly selected
# warning MOST values may be modified by downlink MAC commands
# from the server and will be cached
mac_cache="cache.json"
device_class="A" # class B & C not yet supported
frequency_plan = "EU_863_870_TTN"
# radio settings
max_power = 0x0F # can be changed by MAC command linkADR
output_power = 0x0E # current level
sync_word = 0x34
rx_crc = true
# if the device does not recieve a msg in RX1 or RX2 then
# send the same message again
# TTN ignores repeated messages
join_retries = 3
join_timeout = 10 # time to wait after tx before next retry
# initial data rate setting
# MAC commands may change this
data_rate = 3
# RX1 is normally the same as the uplink settings
# but can be changed by MAC commands
rx1_delay=5
rx1_DR=3
# In EU RX2 is normally a fixed frequency & datarate
# but can be modified by MAC commands
rx2_DR=3
rx2_frequency=869.525
rx2_delay=1 # follows from end of rx1_delay
rx_window=1 # duration of receive windows
# these are updated on each transaction and cached by MAChandler
fCntUp=0 # initial uplink message frame counters
fCntDn=0 # set by TTN server
auth_mode = "OTAA"
# if not using ABP or OTAA you can omit the unused section
# keys are MSB first order
[TTN.OTAA]
# received session key values are stored by MAChandler
# enter your OTAA keys here
deveui = [0xe4,0x5f,0x01,0xff,0xff,0x86,0x7c,0x40]
appeui = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
appkey = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01]
devaddr= [0x00, 0x00, 0x00, 0x00] # not joined
[TTN.ABP]
# enter your device ABP key values below
devaddr = [0x00,0x00,0x00,0x00]
nwskey = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
appskey = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
appkey = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
appeui = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
deveui = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
# frequency plans
# max of 16 channels supported in some regions.
# read the LoRaWAN Regional Parameters Specification if you want to create
# your own frequency plan - provided it works in a similar way
# the US902-928 plan uses 71 uplink channels but only 8 downlink channels
[EU_863_870_TTN]
max_channels=8
max_dr_offset=5 # see rx1_DR_offset_table
max_dr_index=7 # see data_rates list
# ref LoRa Alliance specification Physical Layer para 7.1
#
# In UK join frequencies are a restricted selection of lora_tx_freqs
lora_join_freqs=[868.1,868.3,868.5]
lora_tx_freqs = [868.1,868.3,868.5,867.1,867.3,867.5,868.7,867.9]
# in UK the RX1 frequency is the same as the TX freq but that
# may not be the case in your frequency plan
lora_rx1_freqs=[868.1,868.3,868.5,867.1,867.3,867.5,868.7,867.9]
TXPower=[20,14,11,8,5,2] # 6->15 are RFU
# all the possible bandwidths however only 125 & 250 are used. See data_rates
# the radio method set_bw(index) uses the position of the value (0..9)
# TOML doesn't like mixed int and float
bandwidths=[7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125.0, 250.0, 500.0] # kHz
# DR0 to DR6 (sf,bw) where bw is 0-9 (see bandwidths above)
data_rates=[[12,7],[11,7],[10,7],[9,7],[8,7],[7,7],[7,8]]
sf_range=[7,12]
duty_cycle_range=[0.1,1.0] # min/max all floats
# ETSI sub bands
# These sub bands have different maxEIRP and Duty Cycles though TTN only uses
# the first entry
# (minFreq,maxFreq,maxDC)
duty_cycle_table=[[863.0,868.0,1.0],[868.0,868.6,1.0],[868.7,869.2,0.1],[869.4,869.65,10.0],[869.7,870.0,1.0]]
# rows range DR0 to DR7
# columns are offsets 0..5
DR_offset_table=[
[0,0,0,0,0,0],
[1,0,0,0,0,0],
[2,1,0,0,0,0],
[3,2,1,0,0,0],
[4,3,2,1,0,0],
[5,4,3,2,1,0],
[6,5,4,3,2,1],
[7,6,5,4,3,2]
]
# EIRP db settings
maxEIRP=[8,10,12,13,14,16,18,20,21,24,26,27,29,30,33,36]
[AU_915_928_FSB_2]
max_channels=8
max_dr_offset=5 # see rx1_DR_offset_table
max_dr_index=14 # see data_rates list
# ref LoRa Alliance specification Physical Layer para 7.1
#
# In UK join frequencies are a restricted selection of lora_tx_freqs
lora_join_freqs = [916.8,917.0,917.2,917.4,917.6,917.8,918.0,918.2]
lora_tx_freqs = [916.8,917.0,917.2,917.4,917.6,917.8,918.0,918.2]
# in UK the RX1 frequency is the same as the TX freq but that
# may not be the case in your frequency plan
lora_rx1_freqs=[923.3,923.9,924.5,925.1,925.7,926.3,926.9,927.5]
TXPower=[20,14,11,8,5,2] # 6->15 are RFU
# all the possible bandwidths however only 125 & 250 are used. See data_rates
# the radio method set_bw(index) uses the position of the value (0..9)
# TOML doesn't like mixed int and float
bandwidths=[7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125.0, 250.0, 500.0] # kHz
# DR0 to DR6 (sf,bw) where bw is 0-9 (see bandwidths above)
data_rates=[
[12,7], # ch 0
[11,7],
[10,7],
[9,7],
[8,7],
[7,7],
[8,9],
[8,9,], #rfu
[12,9],
[11,9],
[10,9],
[9,9], # ch11 RX2/RX1
[8,9],
[7,9],
[7,9], #rfu
[7,9], #rfu
]
sf_range=[7,12]
# no limit in Australia
duty_cycle_range=[0.0,100.0] # min/max all floats, the code does not enforce
# ETSI sub bands
# These sub bands have different maxEIRP and Duty Cycles though TTN only uses
# the first entry
# in AUSTRALIA there is no duty cycle limit
# (minFreq,maxFreq,maxDC)
duty_cycle_table=[[916.8,918.2,100.0]] # the code checks but does not enforce
# rows range DR0 to DR7
# columns are offsets 0..5
DR_offset_table=[
[8,8,8,8,8,8],
[9,8,8,8,8,8],
[10,9,8,8,8,8],
[11,10,9,8,8,8],
[12,11,10,9,8,8],
[13,12,11,10,9,8],
[13,13,12,11,10,9],
[9,8,8,8,8,8]
]
# EIRP db settings
maxEIRP=[8,10,12,13,14,16,18,20,21,24,26,27,29,30,33,36]