Configuration for the Troverlo Mobile Tag Reader for a customer (TTR-MHr1) (Internal)
Article on configuring the Troverlo Mobile Tag Reader for Customers (Internal)
Firmware can be found in this folder on dropbox
~\Troverlo Dropbox\Troverlo Server\Product\reader\Reader_1.7.0
Config.py
The config.py file is used to set all the configurations for the Tag Reader
Please check to ensure all these fields are set to these values before it is programming and sending a Tag Reader to a customer.
I highlighted the ones I change at times for testing and prototyping in
#Hardware version
HW_VERSION = '1.0.0'
#Protocol Version
PROTO_VERSION = '1.0.0'
#MAC filter 1 for filtering
#MAC filter 0 for no filtering
# changed the default from 0 to 1 on 20 May 2022 to save volume over LTE (performance and cost) and volume for the server to handle
#min amount of space to leave on the file system
RETRANSMISSION_MIN_SPACE = 512000
#check intervals (in secs)
OTA_FW_CHECK_INTERVAL = 3600 #60 minutes
WATCHDOG_INTERVAL = 1200000 #20 minutes (20*60*1000)
HWWATCHDOG_INTERVAL = 1200 #20 minutes (20*60)
THREAD_CHECK_INTERVAL = 600 #10 minutes
HEALTH_CHECK_INTERVAL = 60 #10 minutes
POST_TIMEOUT_INTERVAL = 300 #5 min
GPS_TIMEOUT = 15 # secs
#number of combined reader reports in a post
#must be 1 -12
#data transmission rate in seconds, speed in kph
#less than VERY_SLOW_speed
VERY_SLOW_speed = 8 #in kph
VERY_SLOW_data_speed = 20 #secs
VERY_SLOW_obs_per_post = 3 #of observations in each post
#inbetween VERY_SLOW_speed and SLOW_speed
SLOW_speed = 48 #in kph
SLOW_data_speed = 15 #secs
SLOW_obs_per_post = 4
#inbetween SLOW_speed and FAST_speed
FAST_speed = 97 #kph
FAST_data_speed = 10 #secs
FAST_obs_per_post = 6
#greater than FAST_speed
VERY_FAST_data_speed = 10 #secs
VERY_FAST_obs_per_post = 6
#OTA FW Update address
OTA_SERVER = 'update.troverlo.com'
#OTA FW Update port, if not set to 8000, this device will not be updated over the air when we post improvements and bug fixes to the OTA server
# 8000 is used for the Mobile Tag Reader, 8001 is used for Static Tag Reader
post_auth = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjMwMyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL25hbWUiOiI2QUhZVzZNIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoiOCRhNGczMUVAbm9yZXBseS5jb20iLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IkU3R1czR09CNlpMRlpXTExIRVlCVlBTWU5NTVZNWURQIiwiaHR0cDovL3d3dy5hc3BuZXRib2lsZXJwbGF0ZS5jb20vaWRlbnRpdHkvY2xhaW1zL3RlbmFudElkIjoiMTY5Iiwic3ViIjoiMzAzIiwianRpIjoiNzM4YjQ4MzktMjQyMy00ZmM2LThiNzAtZDUwZjcwMTUwZWFlIiwiaWF0IjoxNjMzOTY1Mzk3LCJ0b2tlbl92YWxpZGl0eV9rZXkiOiJmYmZmYjFjMC1kMTMyLTQxMjktYmQxNS04OWI4OTEyOTFkMmMiLCJ1c2VyX2lkZW50aWZpZXIiOiIzMDNAMTY5IiwidG9rZW5fdHlwZSI6IjAiLCJJc0FwaUtleSI6InRydWUiLCJuYmYiOjE2MzM5NjUzOTcsImV4cCI6MTYzNDA1MTc5NywiaXNzIjoiQ2xvdWQiLCJhdWQiOiJDbG91ZCJ9.kR-SJuiPLEAo0XTB_BDYgpebjxM9QqvXERqLqqsxPdI"
post_cookie = "ARRAffinity=20de824e485c9e1aaf5b3018adbb5968246202da9110e02ee2338d510fbf2583; ARRAffinitySameSite=20de824e485c9e1aaf5b3018adbb5968246202da9110e02ee2338d510fbf2583"
#This prints to the console the JSON that is posted to the Troverlo Cloud Platform via LTE-m, if set to True
#This prints to the console a list of AP the reader detects, if set to True
RETRANS_DIR="/flash/retransmit_buffer"
RETRANS_FAIL_THRESH = 10
# RETRANS_PRINT_COUNT sets the number of retransmissions to print to the screen. The prints get very large sometimes which bogs down the processor, so this limits the print to 10.
# If RETRANS_PERSISTENCE_ENABLE is set to False, it will delete the flash data on boot. So, if you have a lot of retransmissions and want to not carry them through resets.
USED_SAVED_SSL_SESSION = False
THREAD_SLEEP_OTA = 100000000
# Tried to use this to get the console logs to sync time via GPS so easier to troubleshoot w Server-side, didn't work well, so leave as false
UPDATE_TIME_WITH_GPS_TIME =False
# he is updating the clock from GPS every 60 mins
GPS_RTC_UPDATE_PERIOD =3600
# GPS config
# Set RUN_GPS_THREAD to False to turn off the GPS functionality, null will be placed in all the location info for both the Reader Data and Tag Data in the JSON sent to the Server and the firmware won't reboot based on the GPS thread (watchdog),
# This is used w/ the TTR-SHr1 Static Tag Reader, which will run indoors.
# Please make sure USE_NTP (Below) is set to True when RUN_GPS_THREAD (Above) is set to False or the timestamps for all observations will be 1 Jan 2020 00:00:00 UTC
# The user will use the "Reader Config" UI to set the Lat/Long that will be injected into the observations that come from this Static Tag Reader
# Set RUN_GPS_THREAD to True to turn on the GPS functionality,
# This is used w/ the TTR-MHr1 Mobile Tag Reader, which is expected to have a full view of the sky and can move
#NTP config
# Set USE_NTP to True so the timestamp for all observations will come from NTP (network timing protocol) via LTE
# Use this for the TTR_SHr1 Static Tag Reader w the RUN_GPS_THREAD set to False above
# Set USE_NTP to False so the timestamp for all observations will come from GPS
# Use this for the TTR_MHr1 Mobile Tag Reader
NTP_SERVER = "pool.ntp.org"
NTP_UPDATE_PERIOD = 3600
#This configuration allows Troverlo to add a new carrier without having to change code and update firmware via OTA. The order does not matter.
SIM_IDS = [ {'name':'Verizon','carrier':'verizon','id':'311480','apn':'vzwinternet'}, \ {'name':'AT&T','carrier':'at&t','id':'310170','apn':'m2m64.com.attz'}, \ {'name':'Hologram','carrier':'','id':'234500','apn':'hologram'}, \ {'name':'US Cellular','carrier':'','id':'311588','apn':'internet'}, \ {'name':'T-Mobile','carrier':'','id':'310260','apn':'fast.t-mobile.com'}, \ {'default':1,'name':'Hologram','carrier':'','id':'','apn':'hologram'}]
#additional debug logging can be turned on to troubleshoot lte and post to server issues
lte_debug = False
post_debug = False
# This allows us to bypass DNS and go directly to Troverlo's server-side app, concern is if this IP address changes, this is just for testing
CONFIG_HOST_IP = '20.119.128.4'
# Every carrier has its own DNS where they look up the IP address of Troverlo's server-side app. ATT had issues, so we are overriding it and using "Google's DNS" instead by default.
CONFIG_DNS_IP = ('8.8.8.8', '8.8.4.4')