-
Notifications
You must be signed in to change notification settings - Fork 39
Configuration
sh123 edited this page Dec 19, 2022
·
2 revisions
- If you are not using SX1278 module then modify module declaration in
config.h
find and replaceSX1278
with your module name. Read more about supported modules at RadioLib Wiki. - If you are using SX126X module then un-comment
USE_SX126X
define and replaceMODULE_NAME
with your module name if using module other thanSX1268
- go to esp32_loraprs.ino and make next changes based on your requirements in
initializeConfig()
- set
cfg.IsClientMode
tofalse
if you are planning to run server mode for APRS-IS iGate / Digipeater - for server mode fill
cfg.WifiSsid
andcfg.WifiKey
with your WiFI AP data - for server mode fill
cfg.AprsLogin
andcfg.AprsPass
with APRS-IS login callsign and pass - for server mode fill
cfg.AprsFilter
, see http://www.aprs-is.net/javAPRSFilter.aspx for various formats, do not includefilter
directive, just space separated values - change
cfg.LoraFreq
if you are planning to use different frequency or if planning to calibrate clients, currently it is set to 433.775MHz as per https://vienna.iaru-r1.org/wp-content/uploads/2019/01/VIE19-C5-015-OEVSV-LORA-APRS-433-MHz.pdf
- set
- if you are planning to use different esp32 pinouts then modify config.h
- lora module SS, CFG_LORA_PIN_SS, GPIO_5
- lora module RST, CFG_LORA_PIN_RST, GPIO_26
- lora module DIO0, CFG_LORA_PIN_DIO0, GPIO_14
- if you are planning to experiment with different bandwidths/spread factors then modify values in
initializeConfig()
, with current parameters APRS packet time on air is around 1-2 seconds @ 292bps/36Bps, to decode with as lower level as possible with reasonable speed (comparable to 300bps HF APRS), use https://github.com/tanupoo/lorawan_toa or https://www.rfwireless-world.com/calculators/LoRa-Data-Rate-Calculator.html to make further calculations- lora bandwidth
cfg.LoraBw
, 125 kHz (also tested with 20.6 KHz and SF9 with frequency correction) - lora spread factor
cfg.LoraSf
, 12 (should decode down to -20dB, chosen with the goal for minimum signal decode) - lora coding rate
cfg.LoraCodingRate
, 7 - lora output power
cfg.LoraPower
, 20 (max 20 dBm ~ 100mW, change to lower value if needed) - sync word
cfg.LoraSync
, 0x34
- lora bandwidth
- consider minimum decode level based on on BW + SF and required throughput
- uses LoRa built-in checksum calculation to drop broken packets
- note, that there a is significant frequency drift on temperature changes for different modules, especially on 868 MHz, drift seems to be acceptable on 433 MHz, so it could be used for bandwidths, which are less than 125 MHz, but it needs testing for each module
- you need to use external TCXO if you are planning to use modules for narrow bandwidths less than 125 kHz
- or calibrate clients based on server frequency drift report by changing
cfg.LoraFreq
, for example, let client and server run for an 30-60 minutes and if server reports err: -1500, then set client frequency to about 1000 kHz less, e.g. instead of 433.775 set it to 433.774, this will give couple of additional dB - alternatively automatic calibration could be done on server or client side by enabling automatic frequency correction by setting
cfg.EnableAutoFreqCorrection
totrue
, might be suitable for experiments where only one client is operating or if server broadcast messages, so clients can correct their frequency. Use it either on client side to tune all clients to server frequency if TX is enabled on iGate side or to tune server to single client for test purposes
- other useful options are
-
cfg.EnableSignalReport
set totrue
to enable signal report, it will be added as a comment to APRS-IS submitted location -
cfg.EnablePersistentAprsConnection
set tofalse
to avoid keeping connection open to APRS-IS -
cfg.EnableRfToIs
set totrue
to forward RF traffic to APRS-IS -
cfg.EnableIsToRf
set totrue
to forward APRS-IS traffic to RF, see alsocfg.AprsFilter
for traffic filtering -
cfg.EnableRepeater
set totrue
to enable packet repeater -
cfg.EnableBeacon
set totrue
to enable periodic beacons specified incfg.AprsRawBeacon
with period specified incfg.AprsRawBeaconPeriodMinutes
into RF and APRS-IS ifcfg.EnableRfToIs
is enabled -
cfg.LoraUseIsr
set totrue
to enable LoRa incoming packet handling using interrupts in continous RX mode suitable for speech data, otherwise set tofalse
for single packet polling mode
-
- iOS does not support serial over Bluetooth and requires BLE support, this enables APRS applications such as official aprs.fi to work with the modem
- to enable BLE support set
cfg.BtEnableBle
totrue
- Enable USB serial support by setting
cfg.UsbSerialEnable/CFG_USB_SERIAL_ENABLE
totrue
- When USB serial is enable Bluetooth and TCP/IP KISS server will be disabled
- Enable KISS over TCP/IP server by setting
KissEnableTcpIp/CFG_KISS_TCP_IP
totrue
- Bluetooth is NOT going to be disabled if enabled by setting name in
cfg.BtName/CFG_BT_NAME
- Default port is 8001
- Additionally, it is possible to run modem in WiFi AP mode by setting to
cfg.WifiEnableAp/CFG_WIFI_ENABLE_AP
totrue
in this casecfgWifiSsid/CFG_WIFI_SSID
andcfg.WifiKey/CFG_WIFI_KEY
will be used.
- when setting up APRSDroid, use "TNC (KISS)" connection protocol in Connection Preferences -> Connection Protocol
- Use TNC (plaintext TNC2) for interoperability with text based LoRa APRS trackers, which do NOT use AX25, set
cfg.EnableTextPackets/CFG_TEXT_PACKETS
totrue
to enable this modem mode of operation. If you need compatibility with https://www.lora-aprs.info/ then also setcfg.EnableTextPackets3/CFG_TEXT_PACKETS_3
totrue
.