Compare commits

...

8 Commits

@ -4,32 +4,36 @@
2. Install the missing libraries<br>
There are two possibilities - either using the Library Manager of PlatformIO or the command line tool:<br>
<h3>1. Built-In Liabrary Manager</h3>
Press the PlatformIO HOME Button to enter the Home Screen and there the Libraries Button to add missing libraries:<br>
<img src="img/img1.jpg" width="480"><br>
Search and install the following libaries:<br>
Press the PlatformIO HOME Button to enter the Home Screen and there the Libraries Button to add missing libraries.<br>
Search and install the following libaries:<br/>
<ul>
<li>RadioHead</li>
<li>TinyGPSPlus</li>
<li>DHT sensor library for ESPx</li>
<li>Adafruit SSD1306</li>
<li>Adafruit GFX Library</li>
<li>Adafruit BusIO</li>
<li>Adafruit Unified Sensor</li>
<li>AXP202X_Library</li>
<li>https://github.com/SQ9MDD/AXP202X_Library.git (AXP202X_Library)</li>
<li>OneWire</li>
<li>DallasTemperature</li>
<li>SparkFun u-blox Arduino Library</li>
<li>blanchon/ArduinoJson</li>
<li>arcao/Syslog</li>
</ul>
<br>
<h3>2. Command Line Tool</h3>
use the following commands<br>
platformio lib install "RadioHead"<br>
platformio lib install "TinyGPSPlus"<br>
platformio lib install "DHT sensor library for ESPx"<br>
platformio lib install "Adafruit SSD1306"<br>
platformio lib install "Adafruit GFX Library"<br>
platformio lib install "AXP202X_Library"<br>
platformio lib install "Adafruit Unified Sensor"<br>
platformio lib install "OneWire"<br>
platformio lib install "DallasTemperature"<br>
<br>
Check that the platformio.ini is available as it holds the board type for PlatformIO.<br>
After pressing the check mark the code will be compiled, after pressing the arrow it will be compiled and uploaded to a connected TTGO.<br>
If you issue<br/>
~/.platformio/penv/bin/pio run<br/>
It should resolve all dependencies automaticaly, thanks to the definitions in the section "lib_deps =".<br/>
You could (but not need to) install the libraries by hand:
<br/>
platformio lib install "&lt;library name&gt;
<br/>
Check that the platformio.ini is available as it holds the board type for PlatformIO.
<h2>Compile</h2>
<ul>
<li>GUI: After pressing the check mark the code will be compiled, after pressing the arrow it will be compiled and uploaded to a connected TTGO.</li>
<li>platformio-cli: ~/.platformio/penv/bin/pio run -e ttgo-t-beam-v1.0 -t upload --upload-port /dev/cu.SLAB_USBtoUART</li>
</ul>

@ -4,7 +4,7 @@ Tracker can be used on its own.
You can also connect it via blueetooth with APRSdroid.
After connection with APRX based DIGI it can be used as KISS-TNC
![diagram](http://git.mis.ks.ua/US1GHQ/TTGO-T-Beam-LoRa-APRS/raw/branch/lora-esp32-dev/img/digi-schemat.png)
![diagram](https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS/blob/master/img/digi-schemat.png)
## Contributors
* Initial work: OE1ACM, OE3CJB

@ -0,0 +1,3 @@
# rem ~/.platformio/penv/bin/pio run -e ttgo-t-beam-v1.0 -t upload --upload-port /dev/ttyACM0
~/.platformio/penv/bin/pio run -e ttgo-t-beam-v1.0-development -t upload --upload-port /dev/ttyACM0
~/.platformio/penv/bin/pio device monitor

@ -0,0 +1,74 @@
{
"wifi_en": 2,
"wifi_ssid": "ssid here",
"wifi_failAP": true,
"wifi_pwrAP": 8,
"wifi_pwrSTA": 80,
"tncsrvr_en": false,
"gpssrv_en": false,
"ntp_server": "",
"syslog_server": "192.168.0.1",
"lora_freq": 433.7750,
"lora_speed": 300,
"lora_rx_en": true,
"lora_tx_en": true,
"txPower": 23,
"lora_cradapt": false,
"lora_rssi2p": 34,
"snraprsis": true,
"lora_dig_mode": 1,
"lora_dig_x_m": 0,
"tx_qrg_bc": 1,
"tx_aprsis_bc": true,
"tx_aprsis_sm": true,
"lora_freq_x": 433.9000,
"lora_speed_x": 1200,
"txPower_x": 23,
"rx_qrg": 1,
"aprs_callsign": "N0CALL",
"aprs_relay_path": "WIDE1-1",
"aprs_s_table": "/",
"aprs_symbol": "[",
"aprs_comment": "Lora Tracker/iGate",
"aprs_lat_p": "00-09.2100N",
"aprs_lon_p": "000-39.4200E",
"aprs_blist": "",
"aprs_fb_interv": 1800,
"sb_min_interv": 120,
"sb_max_interv": 1800,
"sb_min_speed": 5,
"sb_max_speed": 70,
"sb_angle": 28.0000,
"sb_turn_slope": 26,
"sb_turn_time": 30,
"aprs_batt": true,
"aprs_fixed_beac": false,
"aprs_alt_r": 100,
"aprs_CSandA": true,
"gps_enabled": true,
"kiss_myloc_ok": true,
"gps_sleep_ok": true,
"tnc_tel": false,
"tnc_tel_int": 3600,
"tnc_tel_mic": 0,
"tnc_tel_path": "",
"oled_enabled": true,
"show_cmt": true,
"aprs_comm_rt": true,
"bt_enabled": true,
"usbser_proto": 1,
"sh_rxtime": 10,
"shutdown_act": true,
"shutdown_dt": 10,
"reboot_intrvl": 0,
"sh_oledtime": 0,
"cpufreq": 80,
"aprsis_en": true,
"aprsis_srv_h": "euro.aprs2.net",
"aprsis_srv_p": 14580,
"aprsis_fltr": "b/DL3EL-13 m/10",
"aprsis_call": "",
"aprsis_pw": "nrnr",
"aprsis_2rf": 0,
"lora_freq_rx_curr": 433.7750
}

@ -0,0 +1,7 @@
{
"SSID1": "EnterSSIDofYourAccesspoint",
"password1": "EnterPasswordofYourAccesspoint"
"SSID2": "EnterSSIDofYour2ndAccesspoint",
"password2": "EnterPasswordofYour2ndAccesspoint",
"ap_password": "xxxxxxxxxx"
}

@ -19,63 +19,170 @@
</div>
<article>
<form action="/save_wifi_cfg" method="post">
<div class="grid-container quarters">
<div>
<label for="wifi_en">Enable Wifi</label>
<select id="wifi_en" name="wifi_en">
<option value="1">1: Wifi may be off if bluetooth client is connected in between 60s on boot (recommended, see below)</option>
<option value="2">2: Wifi on (during hardware limitaion, bluetooth will be disabled on LORA32_21 devices)</option>
<option value="0">0: Wifi off (see below for hints and caveats)</option>
</select>
</div>
</div>
<div class="grid-container quarters">
<div id="wifi_list">
<label for="wifi_ssid">Network</label>
<input type="button" value="Scan WiFi" id="scan_wifi_btn" onclick="scanWifi();">
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="wifi_ssid">WiFi SSID</label>
<input class="u-full-width" type="text" name="wifi_ssid" placeholder="Your Wifi SSID" title="Your Wifi SSID" id="wifi_ssid">
</div>
<div>
<label for="wifi_password">WiFi Password</label>
<input class="u-full-width" type="password" name="wifi_password" id="wifi_password" placeholder="Your WiFi Password" title="Your WiFi Password">
<input class="u-full-width" type="password" name="wifi_password" id="wifi_password" placeholder="Your WiFi Password" title="Your WiFi Password, 8 characters minimum">
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="wifi_pwrSTA">TXPWR as STA</label>
<select id="wifi_pwrSTA" name="wifi_pwrSTA">
<option value="80">Max (20dBm, 100mW, suggested)</option>
<option value="8">Min (2dBm, 2mW)</option>
<option value="44">Low (11dBm, 12mW)</option>
<option value="60">Mid (15dBm, 32mW)</option>
<option value="72">High (18dBm, 63mW)</option>
</select>
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="ap_password">AUTO AP Password</label>
<input class="u-full-width" type="password" name="ap_password" id="ap_password" placeholder="AUTO AP Password" title="AUTO AP Password">
<input class="u-full-width" type="password" name="ap_password" id="ap_password" placeholder="AUTO AP Password" title="AUTO AP Password, 8 characters minimum">
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="wifi_pwrAP">TXPWR as AP</label>
<select id="wifi_pwrAP" name="wifi_pwrAP">
<option value="8">Min (2dBm, 2mW, suggested)</option>
<option value="44">Low (11dBm, 12mW)</option>
<option value="60">Mid (15dBm, 32mW)</option>
<option value="72">High (18dBm, 63mW)</option>
<option value="80">Max (20dBm, 100mW)</option>
</select>
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="ntp_server">NTP Server</label>
<input type="text" name="ntp_server" id="ntp_server" placeholder="pool.ntp.org" title="NTP Server name or IP Address. I.e. pool.ntp.org. If your igate is in the HAMNET, use ntp.hc.r1.ampr.org.">
</div>
<div>
<label for="syslog_server">Syslog Server</label>
<input type="text" name="syslog_server" id="syslog_server" placeholder="" title="Syslog Server name or IP Address. Leave empty to switch off. Syslog needs do be compiled in (will be default in futute)">
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="wifi_failAP">Allow failback to Mode AP</label>
<input name="wifi_failAP" id="wifi_failAP" type="checkbox" value="1" title="Allow failback to mode AP after once connected successfully connected (after boot) to configured remote AP. Disable for igates, where you don't need your tracker to be a hotspot. You like to enable, if you use your tracker portable and it should automatically be wifi client to your home network, and be AP if you are outside.">
</div>
<div>
<label for="tncsrvr_en">Enable TNC-Server</label>
<input name="tncsrvr_en" id="tncsrvr_en" type="checkbox" value="1" title="Enable TNC-Server (KISS over TCP) on port tcp 8001. If your device in open networks like HAMNET, enable it only when needed and consider firewalling.">
</div>
<div>
<label for="gpssrv_en">Enable GPS-Server</label>
<input name="gpssrv_en" id="gpssrv_en" type="checkbox" value="1" title="Enable GPS-Server (NMEA on port tcp 10110. If your device in open networks like HAMNET, enable it only when needed and consider firewalling.">
</div>
</div>
<div class="grid-container full">
<input class="button-primary" type="submit" value="Save">
</div>
</div>
</form>
</article>
</section>
<section>
<div class="grid-container full">
<h2 class="u-full-width">APRS Settings</h2>
</div>
<article>
<div class="grid-container full">
<h2 class="u-full-width">APRS Settings</h2>
</div>
<form action="/save_aprs_cfg" method="post">
<div class="grid-container full">
<h5 class="u-full-width">Transmission Settings</h5>
</div>
<div class="grid-container 3 columns">
<div>
<label for="lora_freq">Frequency [MHz]</label>
<input name="lora_freq" id="lora_freq" type="number" min="144.000" max="928.000" step="0.001" title="LoRa center frequency between 433.001 and 928.000">
</div>
<div class="grid-container halves">
<div>
<label for="txPower">dBm</label>
<input name="txPower" id="txPower" type="number" min="0" max="23" title="LoRa TX Power. Range 0 to 23dBm">
<label for="lora_freq">Main Frequency [MHz]</label>
<input name="lora_freq" id="lora_freq" type="number" min="433.0000" max="928.0000" step="0.0001" title="LoRa center frequency between 433.0001 and 928.0000. I.e. 433.775">
</div>
<div>
<label for="lora_speed">Speed</label>
<select id="lora_speed" name="lora_speed">
<option value="439">BW 31.25khz CR 4:5 SF 9 (300bps)</option>
<option value="1367">BW 31.25khz CR 4:5 SF 7 (1200bps)</option>
<option value="300">BW 125khz CR 4:5 SF 12 (default, 300bps)</option>
<option value="300">BW 125khz CR 4:5 SF 12 (Slow Standard, 300bps)</option>
<option value="240">BW 125khz CR 4:6 SF 12 (244bps)</option>
<option value="210">BW 125khz CR 4:7 SF 12 (209bps)</option>
<option value="180">BW 125khz CR 4:8 SF 12 (183bps)</option>
<option value="610">BW 125khz CR 4:8 SF 10 (610bps)</option>
<option value="1200">BW 125khz CR 4:5 SF 9 (PL,UA, 1200bps)</option>
<option value="6000">BW 125khz CR 4:5 SF 7 (BBS, 6000bps)</option>
<option value="21000">BW 500khz CR 4:5 SF 7 (BBS, 21000bps)</option>
<option value="1200">BW 125khz CR 4:7 SF 9 (Fast Standard, 1200bps)</option>
</select>
</div>
<div>
<label for="lora_tx_en">Enable LoRa transmitter</label>
<input name="lora_tx_en" id="lora_tx_en" type="checkbox" value="1" title="Allow TX on LoRa. Disable this if you like to prevent TX under all circumstances (i.e. if your tracker is behind an rx-amplifier)">
</div>
<div>
<label for="lora_rx_en">Enable LoRa receiver</label>
<input name="lora_rx_en" id="lora_rx_en" type="checkbox" value="1" title="Allow RX on LoRa. Disable this if you need to save power consumption; LoRa chip will be only powered on during TX. Only honored if lora_digipeating_mode == 0 and no bluetooth client is connected on boot">
</div>
<div>
<label for="txPower">TX power [dBm]</label>
<input name="txPower" id="txPower" type="number" min="0" max="23" title="LoRa TX Power. Range 0 to 23dBm">
</div>
<div>
<label for="lora_cradapt">Automatic CodeRate adaption on TX</label>
<input name="lora_cradapt" id="lora_cradapt" type="checkbox" value="1" title="Enable automatic CR adaption. Has only influence on TX (RX can decode every CR). Use this only if you are not a WIDE1 or WIDE2 digi (here you like to send always with higher speed). Still testing, if it behaves good to our network. Currently works only for SF12 modes, because for SF 10 and lower the code for programming CR+SF+BW-combination has not been written yet">
</div>
<div>
<label for="aprs_blist">Filter src-calls or calls in digipath on receiption</label>
<input type="text" name="aprs_blist" id="aprs_blist" title="Filter out specified source calls or calls in digipath on receiption -> no repeating, no igate, not visible via kiss. They don't exist ;). List calls separated by ',': DL1AAA,DL1BBB'. This filters out DL1AAA without SSID AND with SSID. If you specify DL1AAA-1, only DL1AAA-1 is filtered out. If you specify DL1AAA-0 (special case), then only packets from DL1AAA are filtered out.">
</div>
</div>
<div class="grid-container halves">
<div>
<label for="lora_rssi2p">Add SNR and RSSI to path. '*': only if heard direct (recommended for many usecases). '~': not recommended; better let user decide with Q-addressing</label>
<select id="lora_rssi2p" name="lora_rssi2p">
<option value="0">off</option>
<option value="1">To RF duing digipeating (~)</option>
<option value="2">To KISS</option>
<option value="4">To APRSIS (~)</option>
<option value="3">To RF and KISS (~)</option>
<option value="5">To RF and APRSIS (~)</option>
<option value="6">To KISS and APRSIS (~)</option>
<option value="7">To RF and KISS and APRSIS (~)</option>
<option value="8">To RF*</option>
<option value="16">To KISS*</option>
<option value="32">To APRSIS*</option>
<option value="34">To APRSIS* and KISS (recommended with aprsdroid for or digis)</option>
<option value="48">To APRSIS* and KISS* (recommended for digis)</option>
<option value="42">To APRSIS* and RF* and KISS (recommended digis while testing)</option>
<option value="56">To APRSIS* and RF* and KISS* (also a good setting!)</option>
<option value="35">To APRSIS* and RF and KISS (~)</option>
<option value="49">To APRSIS* and RF and KISS* (~)</option>
<option value="57">!Too much options. GUI needs redisign!</option>
<option value="9">!I.e. To RF* and RF would not make any sense!<option>
</select>
</div>
</div>
<div class="grid-container halves">
More info for SNR/RSSI path encoding see documentation section below
<div>
<label for="snraprsis">SNR/RSSI-encoding on kiss: compatible to APRS-IS?</label>
<input name="snraprsis" id="snraprsis" type="checkbox" value=1 title="Add snr+rssi at last digipeater, without digipeated flag. Use this for APRS-IS connections. If you have connected a digipeater software to kiss, this option has to be switched off">
</div>
</div>
<div class="grid-container full">
<h5 class="u-full-width">Station Settings</h5>
@ -83,11 +190,11 @@
<div class="grid-container quarters">
<div>
<label for="aprs_callsign">Callsign and SSID</label>
<input class="u-full-width" type="text" minlength="3" name="aprs_callsign" placeholder="NOCALL-1" id="aprs_callsign" title="your callsign with SSID">
<input class="u-full-width" type="text" minlength="3" maxlength="9" name="aprs_callsign" placeholder="NOCALL-1" id="aprs_callsign" title="your callsign with SSID">
</div>
<div>
<label for="aprs_relay_path">Relay Path</label>
<input class="u-full-width" type="text" minlength="0" name="aprs_relay_path" id="aprs_relay_path" title="APRS path, use the shortest as possible, ECHO or WIDE1-1">
<input class="u-full-width" type="text" minlength="0" name="aprs_relay_path" id="aprs_relay_path" title="APRS path, use the shortest as possible, ECHO, WIDE1-1 or WIDE2-1. If you really need a fill-in-digi, choose WIDE1-1,WIDE2-1. RFONLY or NOGATE must not be set in front of WIDEn-m. WIDE2-1,WIDE1-1 is not valid. The path with value '1' enables dest-path-digi-notation (like DL9SAU>APRS-1:..) instead of Path ..,WIDE1-1:... If you are a transmitting igate, please leave empty (or set it to Q. See below). About the SNR/RSSI-Path feature: You may request to add SNR/RSSI by adding 'Q' to your path (i.e. 'WIDE1-1,Q'; for transmitting igates (and balloons, aircrafts, ..), only 'Q' is recommended). Then only the first digi (or igate) adds SNR/RSSI to the path. If you add 'QQ' instead of 'Q' to your path (i.e. 'WIDE1-1,QQ'). Then every digi and igate adds SNR/RSSI to the path (useful for analyzing RF net quality). Use with care; resulting longer path consumes a bit more airtime.">
</div>
<div>
<label for="aprs_s_table">Symbol Table</label>
@ -95,16 +202,24 @@
</div>
<div>
<label for="aprs_symbol">Symbol</label>
<input class="u-full-width" type="text" minlength="1" maxlength="1" name="aprs_symbol" id="aprs_symbol" title="select an icon, for example: [ - jogger, Y - jacht, > - car, b - bike ">
<input class="u-full-width" type="text" minlength="1" maxlength="1" name="aprs_symbol" id="aprs_symbol" title="select an icon, for example: [ - jogger, Y - jacht, > - car, b - bike">
</div>
<div>
<label for="aprs_alt">Show Altitude</label>
<input name="aprs_alt" id="aprs_alt" type="checkbox" value="1" title=" show altitude as frame part">
</div>
<label for="aprs_alt_r">Altitude ratio [%]</label>
<input name="aprs_alt_r" id="aprs_alt_r" type="number" min="0" max="100" title="Altitude ratio every n'th packet.. Use 100 for every packet, 0 for no altitude, or any number in between. Recommended: 10 (altitude every tenth's frame). If you use compression ('Send Course/Speed along with Altitude switched off') for reducing airtime (-> then n% altitude-encoding packets are sent, and 100-n% course/speed-encoded packets), you may choose 50 for ballons, where speed/dir and altitude are of equal interrest; if you choose 10, then 90 % of your transmissions encode speed/direction. Cave: if you set it to 100 and switch next option 'Send Course/Speed along with Altitude' to off, then only altitude packets are sent. If you configure 0, altitude is never sent (-> only compressed speed). If ratio is < 100 and gps altitude is not refreshed, only encoded speed is sent." placeholder="10">
</div>
<div>
<label for="aprs_CSandA">Send Course/Speed along with Altitude</label>
<input name="aprs_CSandA" id="aprs_CSandA" type="checkbox" value="1" title="If set to on, course/speed and altitude are always sent both in one (larger) packet. If gps signal for course/speed is valid, cse/spd will be encoded in the compressed part and altitude is added as /A=...... in the message-part. If set off, either compressed cse/spd OR compressed altitude packets are sent, according to the 'Altitude ratio' setting.">
</div>
<div>
<label for="show_cmt">Show Comment</label>
<input name="show_cmt" id="show_cmt" type="checkbox" value="1" title=" show comment text">
</div>
</div>
<div>
<label for="aprs_comm_rt">Ratelimit adding comment text</label>
<input name="aprs_comm_rt" id="aprs_comm_rt" type="checkbox" value="1" title="If enabled, comment text is sent only every tenth's transmission. Saves airtime.">
</div>
<div>
<label for="aprs_comment">Comment</label>
<input class="u-full-width" type="text" minlength="0" maxlength="64" name="aprs_comment" id="aprs_comment" title=" personal comment">
@ -124,18 +239,18 @@
</div>
<div>
<label for="tnc_tel_int">Self Telemetry Interval [s]</label>
<input name="tnc_tel_int" id="tnc_tel_int" type="number" min="10" title="time between sending telemetry if Enable Self Telemetry option is selected ">
<input name="tnc_tel_int" id="tnc_tel_int" type="number" min="600" title="time between sending telemetry if Enable Self Telemetry option is selected. 3600 is recommended. Min 600.">
</div>
<div>
<label for="tnc_tel_mic">Self Telemetry Sequence</label>
<select id="tnc_tel_mic" name="tnc_tel_mic" title="self telemetry sequence type (numeric supported by aprs.fi and aprsdirect.com)">
<select id="tnc_tel_mic" name="tnc_tel_mic" title="self telemetry sequence type (numeric supported by aprs.fi and aprsdirect.de)">
<option value="0">Numeric</option>
<option value="1">MIC</option>
</select>
</div>
<div>
<label for="tnc_tel_path">Self Telemetry Relay Path</label>
<input class="u-full-width" type="text" minlength="0" name="tnc_tel_path" id="tnc_tel_path" title="APRS path for self telemetry, use the shortest as possible, ECHO or WIDE1-1">
<input class="u-full-width" type="text" minlength="0" name="tnc_tel_path" id="tnc_tel_path" title="APRS path for self telemetry, use the shortest as possible (émpty path ith recommended. Or ECHO or WIDE2-1 or WIDE1-1). ">
</div>
</div>
<div class="grid-container full">
@ -144,19 +259,19 @@
<div class="grid-container quarters">
<div>
<label for="aprs_fixed_beac">Fixed Beacon</label>
<input name="aprs_fixed_beac" id="aprs_fixed_beac" type="checkbox" value="1" title="enable fixed beacon when GPS is disabled or no fix">
<input name="aprs_fixed_beac" id="aprs_fixed_beac" type="checkbox" value="1" title="enable fixed beacon when GPS is disabled or no fix">
</div>
<div>
<label for="aprs_fb_interv">Fixed Beacon Interval [s]</label>
<input name="aprs_fb_interv" id="aprs_fb_interv" type="number" min="120" title="time between sending a beacon if Fixed Beacon option is selected ">
<input name="aprs_fb_interv" id="aprs_fb_interv" type="number" min="120" title="time between sending a beacon if Fixed Beacon option is selected. 1800 or 3600 is recommended for users; 900 or 1800 for digis. Min 120. This beacon value is also used if GPS is lost when smart-beacooning. If it is >= sb_max_intervall, this value is used.">
</div>
<div>
<label for="aprs_lat_p">Latitude Preset</label>
<input class="u-full-width" type="text" minlength="0" name="aprs_lat_p" id="aprs_lat_p" title="latitude for fixed bicon, APRS format for example: 5215.0N">
<label for="aprs_lat_p">Latitude</label>
<input class="u-full-width" type="text" minlength="0" name="aprs_lat_p" id="aprs_lat_p" title="latitude for fixed beacon, APRS format for example: 5215.00N. 'dd.nnnnS', '-dd.nnnn', 'dd mm[.nnn]' and 'dd mm ss' and 'dd mm' ss&quot;' and 'dd-mm[.nn]N' are also supported. If position is south, you can prefix '-' instead of writing 'S' behind the coordinate. '-nnS' does not make sense. If you like to add a locator, add it here and leave longitude field blank. If GPS is enabled and a valid position has been received, that one will be used instead of the configured one, until the next system reboot">
</div>
<div>
<label for="aprs_lon_p">Longitude Preset</label>
<input class="u-full-width" type="text" minlength="0" name="aprs_lon_p" id="aprs_lon_p" title="longtitude for fixed bicon, APRS format for example 02050.59E">
<label for="aprs_lon_p">Longitude</label>
<input class="u-full-width" type="text" minlength="0" name="aprs_lon_p" id="aprs_lon_p" title="longtitude for fixed beacon, APRS format for example 02050.59E. 'ddd.nnnnS', '-ddd.nnnn', 'ddd mm[.nnn]' and 'ddd mm ss' and 'ddd mm' ss&quot;' and 'ddd-mm[.nn]E' are also supported. If position is west, you can prefix '-' instead of writing 'W' behind the coordinate. '-nnW' does not make sense.. If you like to add a locator, add it to the latitude field and leave this field blank.">
</div>
</div>
<div class="grid-container full">
@ -165,30 +280,180 @@
<div class="grid-container quarters">
<div>
<label for="sb_min_interv">Min interval [s]</label>
<input name="sb_min_interv" id="sb_min_interv" size="10" type="number" min="10" title="Minimal time for Smart Beaconing">
<input name="sb_min_interv" id="sb_min_interv" type="number" min="10" title="Minimal time for Smart Beaconing. 60 is recommended. Min 10.">
</div>
<div>
<label for="sb_max_interv">Max interval [s]</label>
<input name="sb_max_interv" id="sb_max_interv" size="10" type="number" min="120" title="Maximal time for Smart Beaconing">
<input name="sb_max_interv" id="sb_max_interv" type="number" min="90" title="Maximal time for Smart Beaconing. 1800 is recommended. Min 90.">
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="sb_min_speed">Min speed [km/h]</label>
<input name="sb_min_speed" id="sb_min_speed" size="10" type="number" min="0" title="Minimal speed for Smart Beaconing">
<input name="sb_min_speed" id="sb_min_speed" type="number" min="0" title="Minimal speed for Smart Beaconing. Min 0.">
</div>
<div>
<label for="sb_max_speed">Max speed [km/h]</label>
<input name="sb_max_speed" id="sb_max_speed" size="10" type="number" min="1" title="Maximal speed for Smart Beaconing">
<input name="sb_max_speed" id="sb_max_speed" type="number" min="1" title="Maximal speed for Smart Beaconing. Min 1.">
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="sb_angle">Course change [degrees]</label>
<input name="sb_angle" id="sb_angle" size="10" type="number" min="1" max="360" title="Angle of course change to speed up beacon transmission">
<input name="sb_angle" id="sb_angle" type="number" min="5" max="360" title="Angle of course change to speed up beacon transmission. Recommended value: 28. Range 0 to 360.">
</div>
<div>
<label for="sb_turn_slope">Turn Slope [degrees]</label>
<input name="sb_turn_slope" id="sb_turn_slope" type="number" min="5" max="255" title="Smart beaconing turn slope. Use 7 for pedestrian, 11 for low/mid speed and 26 for high speed. Recommended value: 26. Range 5 to 255.">
</div>
<div>
<label for="sb_turn_time">Turn Time [seconds]</label>
<input name="sb_turn_time" id="sb_turn_time" type="number" min="5", title="Smart beaconing turn time. Wait at least this amount of seconds for next beacon. Recommended value: 30. Min 5.">
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="gps_enabled">GPS enabled</label>
<input name="gps_enabled" id="gps_enabled" type="checkbox" value="1" title="enable or disable GPS">
</div>
</div>
<div>
<label for="kiss_myloc_ok">Accept own positions via KISS</label>
<input name="kiss_myloc_ok" id="kiss_myloc_ok" type="checkbox" value="1" title="If set to true, we'll stop sending own position beacons if we heard a position from our call via kiss. Uncheck this, if you like to filter out those positions and keep sending it by this device.">
</div>
<div>
<label for="gps_sleep_ok">Allow GPS sleep while own positions received via KISS</label>
<input name="gps_sleep_ok" id="gps_sleep_ok" type="checkbox" value="1" title="If we have a kiss client like aprsdroid, or a digipeater software, which sends own positions (with same call as ours), we pause sending own positions (neither fixed nor smart beaconing). Uncheck, if you have a display attached and still like to see your current GPS position. This option is only honored if configuration 'Accept own positions via KISS' enabled. Why? If your filter out own positions from and this device sends on it's own, it needs gps running ;)">
</div>
</div>
<div class="grid-container full">
<h6 class="u-full-width">Additional settings for secondary frequency:<br/>EXPERIMANTAL - USE WITH CARE!</h6>
</div>
<div class="grid-container halves">
<div>
<label for="lora_freq_x">Secondary Frequency [MHz]</label>
(for cross-repeating or listening transmissions from igates)</label>
<input name="lora_freq_x" id="lora_freq_x" type="number" min="0.0000" max="928.0000" step="0.0001" title="LoRa center frequency - must be different from main frequency and between 433.0001 and 928.0000 or 0 if not needed. I.e. 433.900">
</div>
<div>
<label for="txPower_x">TX power on secondary frequency [dBm]</label>
<input name="txPower_x" id="txPower_x" type="number" min="0" max="23" title="LoRa TX Power on secondary frequency. Range 0 to 23dBm">
</div>
</div>
<div class="grid-container halves">
<div>
<label for="lora_speed_x">Speed on secondary frequency</label>
<select id="lora_speed_x" name="lora_speed_x">
<option value="1200">BW 125khz CR 4:7 SF 9 (Fast Standard. default; use high speeds on the secondary frequency)</option>
<option value="610">BW 125khz CR 4:8 SF 10 (610bps)</option>
<option value="300">BW 125khz CR 4:5 SF 12 (300bps)</option>
<option value="240">BW 125khz CR 4:6 SF 12 (244bps)</option>
<option value="210">BW 125khz CR 4:7 SF 12 (209bps)</option>
<option value="180">BW 125khz CR 4:8 SF 12 (183bps)</option>
</select>
</div>
</div>
<div class="grid-container halves">
<div>
<label for="rx_qrg">RX on frequencies</label>
(Only honored, if we are NOT configured as WIDE1 or WIDE2 digi. If set to both frequencies: Ratio depends on how many packets are received on each qrg in a 10min window; we stay 20s on one qrg.)
<select id="rx_qrg" name="rx_qrg">
<option value="1">RX on main frequency</option>
<option value="2">RX on secondary frequency</option>
<option value="3">RX on both frequencies</option>
</select>
</div>
<div>
<label for="lora_freq_rx_curr">Current RX Frequency:</label>
<input name="lora_freq_rx_curr" id="lora_freq_rx_curr" type="number" readonly title="Nothing to enter here">
</div>
</div>
<div class="grid-container full">
<h6 class="u-full-width">Additional settings for mode repater:<br/>EXPERIMANTAL - USE WITH CARE!</h6>
</div>
<div class="grid-container halves">
<div>
<label for="lora_dig_mode">LoRa Repater Mode</label>
<select id="lora_dig_mode" name="lora_dig_mode">
<option value="0">off. This device does not do any repeating decision.</option>
<option value="1">Repeat if own call is addressed (recommended for normal users). default.</option>
<option value="2">Act as WIDE1 (fill-in) digi</option>
<option value="3">Act as a simple WIDE2 digi (consider to instead attach a real aprs-digipeater software via KISS)</option>
</select>
</div>
</div>
<div class="grid-container halves">
<div>
<label for="lora_dig_x_m">Digipeat heard stations from MAIN frequency to which frequencies</label>
(If LoRa Repeater Mode has not been set to off)
<select id="lora_dig_x_m" name="lora_dig_x_m">
<option value="0">Repeat only to main frequency (default)</option>
<option value="1">Repeat to both frequencies</option>
<option value="2">Repeat only to cross-digi frequency</option>
</select>
</div>
</div>
<div class="grid-container halves">
<div>
<label for="tx_qrg_bc">TX our beacon from this device or from-kiss to frequencies</label>
(Only honored, if we are configured as WIDE1 or WIDE2 digi)
<select id="tx_qrg_bc" name="tx_qrg_bc">
<option value="1">TX on main frequency</option>
<option value="2">TX on secondary frequency</option>
<option value="3">TX on both frequencies</option>
<option value="0">Don't send our beacon on RF (but only to kiss and to APRS-IS)</option>
</select>
</div>
</div>
<div class="grid-container full">
<h5 class="u-full-width">APRS-IS settings</h5>
</div>
<div class="grid-container halves">
<div>
<label for="aprsis_en">Enable APRS-IS connection</label>
<input name="aprsis_en" id="aprsis_en" type="checkbox" value="1" title="If we are configured as WIFI client, connet to the APRS-IS net">
</div>
<div>
<label for="aprsis_srv_h">Server Name</label>
<input type="text" name="aprsis_srv_h" id="aprsis_srv_h" placeholder="euro.aprs2.net" title="Server name or IP Address. I.e. euro.aprs2.net. If your igate is in the HAMNET, use aprs.hc.r1.ampr.org">
</div>
<div>
<label for="aprsis_srv_p">TCP Port</label>
<input type="number" name="aprsis_srv_p" id="aprsis_srv_p" placeholder="14580" min="1" max="65535" title="TCP Port, i.e. 14580">
</div>
<div>
<label for="aprsis_call">Callsign (optional)</label>
<input type="text" name="aprsis_call" id="aprsis_call" minlength="3" maxlength="9" title="Use this callsign for the APRS-IS connection. If not configured, your default callsign is used." placeholder="may be left blank">
</div>
<div>
<label for="aprsis_pw">Password (required)</label>
<input type="password" name="aprsis_pw" id="aprsis_pw" title="Your password for the APRS-IS connection.">
</div>
<div>
<label for="aprsis_fltr">Filter (optional)</label>
<input type="text" name="aprsis_fltr" id="aprsis_fltr" title="Request server-site filter (may be left empty). See http://www.aprs-is.net/javAPRSFilter.aspx ; Example: 't/mqs/YOURCALL/50' -> Gate only messages, query and status messages to RF, from a circle of 50km around your last known position. w, o and i may be of interest, but some people on 2m APRS or APRS-IS may send those packets much too frequently. Please trace the effect! Perhaps in combination with '-e/DB0FRI-10'. In our case, the digi positioning beacon from DB0FRI-10 (which is also an igate nearby, APRS-IS path qAI,DB0FRI-10) came from APRS-IS to us and we gated his beacon, encoded as third-party-trafffic, back to RF (which makes no sense: 1. His direct RF beacon is much better heard than ours -> all RF users heard it. 2. We needless consumed airtime). -> Using -e/IGATE1/IGATE2/.. , everything heard (and sent to APRS-IS) by our neighbor igates like DB0FRI-10 will not be re-gated by us. Please also check, if '-d/..' instead of (or additional to) '-e/..' is more suitiable in your environment; you may also consider -/b/.. ." placeholder="may be left blank">
</div>
<div>
<label for="tx_aprsis_sm">Send status-message to APRS-IS</label>
<input name="tx_aprsis_sm" id="tx_aprsis_sm" type="checkbox" value="1" title="Send APRS-status-message about new tcp connectioni, -attepts or your requested shutdown/reboot to APRS-IS. This helps you to trace reboots and unexpected loss of wifi- or internet-access.">
</div>
<div>
<label for="tx_aprsis_bc">Allow send our beacon to APRS-IS</label>
<input name="tx_aprsis_bc" id="tx_aprsis_bc" type="checkbox" value="1" title="Allow sending our beacon from this device or from KISS to APRS-IS. You may like to disable this i.e. if you are a portable hotspot together with your tracker, but others already gate your own packets to APRS-IS -> you'll see at APRS-IS who heard you.">
</div>
<div>
<label for="aprsis_2rf">Gate APRS-IS traffic to frequencies</label>
(Will be '3rd-party encoded'. Be careful - do not flood our slow main frequency! Use filters..)
<select id="aprsis_2rf" name="aprsis_2rf">
<option value="0">Don't gate APRS-IS to RF (default)</option>
<option value="1">Gate to main frequency</option>
<option value="2">Gate to secondary frequency</option>
<option value="3">Gate to both frequencies</option>
</select>
</div>
<div>
<label for"aprsis_status">Connection status</label>
<input type="text" name="aprsis_status" id="aprsis_status" readonly title="Connection status. Nothing to enter here">
</div>
</div>
<div class="grid-container full">
<div>
@ -208,45 +473,102 @@
<div>
<label for="oled_enabled">OLED Display enabled</label>
<input name="oled_enabled" id="oled_enabled" type="checkbox" value="1" title="Enables or disables OLED">
</div>
</div>
<div>
<label for="bt_enabled">Bluetooth enabled</label>
<input name="bt_enabled" id="bt_enabled" type="checkbox" value="1" title="enable or disable bluetooth">
</div>
</div>
<!--
<div>
<label for="logserial_en">Serial Logging</label>
<input name="logserial_en" id="logserial_en" type="checkbox" value="0" title="Enable or disable verbose logging on usb-serial port. If disabled, KISS-receive and KISS-send is disabled on usb-serial.">
</div>
-->
<div>
<label for="usbser_proto">USB-Serial protocol</label>
<select id="usbser_proto" name="usbser_proto">
<option value="0">1. KISS (default)</option>
<option value="1">2. Serial logging</option>
<option value="2">3. Trace packets from LoRa (TNC-trace-format)</option>
<option value="3">4. 2) and 3)</option>
<option value="4">5. No KISS, no logging, no tnc-trace.</option>
</select>
</div>
<div>
<label for="led_enable">LED signaling</label>
<input name="led_enable" id="led_enable" type="checkbox" value="1" title="enable or disable LED" DISABLED>
</div>
<input name="led_enable" id="led_enable" type="checkbox" value="1" title="enable or disable LED (not implemented)" DISABLED>
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="cpufreq">Adjust CPU frequency (MHz)</label>
<input name="cpufreq" id="cpufreq" type="number" min="0" max="250" title="Reduce CPU freq for power consumption (up to 20 % less). Use with extreme care! Tested with value 80. 0 means: no change to power-on-state." placeholder="0">
</div>
<div>
<label for="reboot_intrvl">Reboot every n hours</label>
<input name="reboot_intrvl" id="reboot_intrvl" type="number" min="0" max="1193" title="Do a periodical reboot every n hous. 0 = disable. Range 0 to 1193" placeholder="0">
</div>
<div>
<label for="shutdown_act">Auto power off</label>
<input name="shutdown_act" id="shutdown_act" type="checkbox" value="1" title="activate auto shutdown after usb plug off (not for T-BEAM 0.7)">
</div>
</div>
<input name="shutdown_act" id="shutdown_act" type="checkbox" value="1" title="activate auto shutdown after usb plug off (not for T-BEAM 0.7). The power off the device will be switched off.">
</div>
<div>
<label for="shutdown_dt">Auto power off delay [s]</label>
<input name="shutdown_dt" id="shutdown_dt" type="number" min="3" max="3600" title="auto shutdown delay in seconds. Range 3 to 3600.">
</div>
</div>
<div class="grid-container quarters">
<div>
<label for="sh_rxtime">Display show RX time [s]</label>
<input name="sh_rxtime" id="sh_rxtime" type="number" min="0" max="45" title="show RX packet for seconds">
</div>
<input name="sh_rxtime" id="sh_rxtime" type="number" min="0" max="45" title="show RX packet for seconds, refresh rate for OLED. Range 0 to 45.">
</div>
<div>
<label for="sh_oledtime">Display timeout [s]</label>
<input name="sh_oledtime" id="sh_oledtime" type="number" min="0" max="60" title="Turn OFF OLED after X seconds. Set 0 to disable">
<input name="sh_oledtime" id="sh_oledtime" type="number" min="0" max="60" title="Turn OFF OLED after X seconds. Set 0 to disable (constantly active OLED has a refresh rate of 1s. Range 0 to 60.">
</div>
<div>
<label for="UptimeMinutes">Uptime of Device [min]</label>
<input type="text" name="UptimeMinutes" id="UptimeMinutes" readonly title="uptime device in minutes">
</div>
</div>
<div class="grid-container halves">
<div>
<label for="shutdown_dt">Auto power off delay [s]</label>
<input name="shutdown_dt" id="shutdown_dt" type="number" min="3" max="3600" title="auto shutdown delay in seconds">
</div>
</div>
<label for="curPos">Current Position</label>
<input type="text" name="curPos" id="curPos" readonly title="Current Postition of device [P if preset; p, if gps is invalid and used as temporary preset]">
</div>
<div>
<label for="OledLine5">Satellite & Batt Info</label>
<input type="text" name="OledLine5" id="OledLine5" readonly title="Satellite (#Sats/HDOP) [more sats are good, lowest HDOP is best. Should be < 8], and Batt Info [B means Battery; P means external pwr. Positive current is battery-charge-current, while prefixed with 'B', and battery voltage shown.]">
</div>
</div>
<div class="grid-container halves">
<div>
<label for="OledLine1">OledLine1</label>
<input type="text" name="OledLine1" id="OledLine1" readonly title="OledLine1">
</div>
<div>
<label for="OledLine2">OledLine2</label>
<input type="text" name="OledLine2" id="OledLine2" readonly title="OledLine2">
</div>
</div>
<div class="grid-container halves">
<div>
<label for="OledLine3">OledLine3</label>
<input type="text" name="OledLine3" id="OledLine3" readonly title="OledLine3">
</div>
<div>
<label for="OledLine4">OledLine4</label>
<input type="text" name="OledLine4" id="OledLine4" readonly title="OledLine4">
</div>
</div>
<div class="grid-container full">
<div>
<input class="button-primary u-full-width" type="submit" value="Save" title="save settings, remember reboot tracker after save">
</div>
</div>
</form>
</form>
</article>
</section>
</section>
<section>
<div class="grid-container full">
<h2 class="u-full-width">Received</h2>
@ -311,12 +633,138 @@
</div>
</form>
</div>
<div class="grid-container full">
Click <a href="/cfg">here</a> to view your configuration.
<form action="/save2fs" method="post">
<div>
<input class="button-primary" type="submit" value="save2fs">
</div>
</form>
</div>
</article>
</section>
<section>
<div class="grid-container full">
<h2 class="u-full-width">Documentation</h2>
</div>
<article>
<div class="grid-container full">
<h5 class="u-full-width">Tooltip</h5>
</div>
<div>If you navigate your mouse over an input field / button, you see a detailed description what it does / which values are expected.</div>
<div class="grid-container full">
<h5 class="u-full-width">Info for SNR/RSSI path encoding</h5>
</div>
<div>If enabled, add SNR and RSSI in path on receiption, prefixed with 'Q'. Examples:<br/>
SNR 23 RSSI -73 -> Q2373<br/>
SNR -03 RSSI -104 -> QA3K4<br/>
SNR -13 RSSI -114 -> QB3L4<br/>
Still testing, if it behaves good to our network.<br/>
Use with care; resulting longer path consumes a bit more airtime.
</div>
<div class="grid-container full">
<h5 class="u-full-width">TTGO T-Beam middle hardware-button: User key functions:</h5>
</div>
<div>
<h6 class="u-full-width">short press</h6>
If OLED is enabled and OLED is OFF:<br/>
<ul>
<li>a short press will wake it up and show current data (as "Display Timeout" seconds</li>
</ul>
If OLED is disabled or OLED is ON:<br>
<ul>
<li>with GPS-FIX immediate sending of a frame with the position from the GPS</li>
<li>without GPS-FIX, immediate sending of the frame with the position saved in the configuration</li>
</ul>
<h6 class="u-full-width">long press</h6>
<ul>
<li>toggle on or off WiFi and WebServer</li>
<li><b>Cave</b>: if you long-press during boot, your <b>settings are purged!</b></li>
</ul>
</div>
<div class="grid-container full">
<h5 class="u-full-width">TTGO T-Beam left/right hardware-buttons:</h5>
</div>
<div>
<ul><li>Left button (nearby USB-port): if long-pressed, your device will powered off (press 7s), or is switched on again (2s).</li></ul>
<ul><li>Right button (lateral): short-press reboots your device (restarts the CPU).</li></ul>
</div>
<div>
</div>
<div class="grid-container full">
<h5 class="u-full-width">Tips for reducing power (Usage as tracker only):</h5>
</div>
<div>
WiFi OFF<br/>
<ul>
<li>be aware, that aprs-is connection depends on the Webserver and will stop working).</li>
<li>select option 0 to disable WiFi & APRS-IS</li>
<li>select option 1 to disable WiFi if a bluetooth client is connected in between 60s on boot (recommended for portables, and for LORA32_21 devices)</li>
</ul>
LoRa Receiver OFF:<br>
<ul>
<li>reduces power consumption, if you just use the device as a tracker</li>
</ul>
Fixed Beacon off:<br>
<ul>
<li>Smart Beaconing is activated, if there is no fixed beacon</li>
</ul>
</div>
<div class="grid-container full">
<h5 class="u-full-width">extended Wifi Config:</h5>
</div>
<div>
which WiFi is selected?<br/>
<ul>
<li>first, the SSID which is configured via the WebSiet will be searched</li>
<li>second, if that SSID is not found, the WiFi configured in data/wifi.cfg will be searched</li>
<li>third, if that SSID is also not found, a local accesspoint with the SSID "call AP" will be created. After connected to, this Webserver will be reachable with the IP Address 192.168.4.1</li>
</ul>
data/wifi.cfg<br>
<ul>
<li>wifi.cfg in the directory data contains an SSID and password of the AP for the second try described above</li>
<li>the total length of this file must not exceed 256 Byte. The password must not be shorter that 8 byte. The json structure must not be changed</li>
<li>if something is wrong or the file is missing, the complete file will be ignored and step 2 (above) will be skipped</li>
<li>To upload wifi.cfg to your board you have to do this via Upload File System image in PlatformIO!</li>
<li>To find the 'Upload File System image' click the PlatformIO symbol (the little alien) on the left side, choose your configuration, click on 'Platform' and search for 'Upload File System image'. If you use platformio-cli, upload the filesystem as described below.</li>
</ul>
Platform.IO CLI<br>
<ul>
<li>if your computer is a raspberry PI3 or if you do not want/need the overhead of the Platfrom.IO GUI, you can use the CLI</li>
<li>you can find it <a href="https://docs.platformio.org/en/latest/core/installation/methods/installer-script.html">here</a></li>
<li>usefull commands, if the board is connected to the PI via USB:</li>
<li>Clean all of project compilation: ~/.platformio/penv/bin/pio run -e [board identifier] -t cleanall --upload-port /dev/[port]</li>
<li>Erase Flash: ~/.platformio/penv/bin/pio run -e [board identifier] -t erase --upload-port /dev/[port]</li>
<li>Build Filesystem: ~/.platformio/penv/bin/pio run -e [board identifier] -t buildfs --upload-port /dev/[port]</li>
<li>Upload Filesystem: ~/.platformio/penv/bin/pio run -e [board identifier] -t uploadfs --upload-port /dev/[port]</li>
<li>Compile and Upload Firmware: ~/.platformio/penv/bin/pio run -e [board identifier] -t upload --upload-port /dev/[port]</li>
<li>start serial monitor: ~/.platformio/penv/bin/pio device monitor -p /dev/[port] -b 115200</li>
<li>all the commands above executed in that order, will completely erase the board, compile and upload the filesystem, compile and upload the current firmware, reboot the board and start the serial monitor</li>
<li>if a precompiled fw should be uploaded, without compilation, use the nobuild switch:<br/>
~/.platformio/penv/bin/pio run -e ttgo-t-beam-v1.0-development -t nobuild -t upload --upload-port /dev/ttyACM0</li>
</ul>
</div>
</article>
<article>
<div class="grid-container full">
<h5 class="u-full-width">Hardware notices</h5>
</div>
<div>
<h6 class="u-full-width">TTGO LoRa32 V2.1 (aka T3 V1.6.1)</h6>
Hardware limitation: if bluetooth is enabled and BT-client is connected, WIFI (-> Web-Server) does not work anymore.<br/>
You'll see the red LED while booting turned on for 60s as indicatior for waiting for BT-clients.
Hack: firmware compiled with -e ttgo-lora32-v2.1 and bluetooth configuration variable is set to enabled, now listens on boot up to one minute for your bluetooth device to connect.<br/>
If a bluetooth device connects, it does not start the Web-Server. Else, it closes SerialBT port and starts the Web-Server on LORA32_21 devices.<br>
See also: new feature for switching WIFI off (i.e. if you use the device as portable tracker), if you don't need it: Webserver eats abt 80mA..<br>
How to switch the Webserver on again, please read the long-press button (GPS) section.
</div>
</article>
</section>
</div>
<footer>
<center><b>Contributors in order of appearance:</b><br> OE1ACM, OE3CJB, SQ9MDD, SQ5RWU, DJ1AN, M0IGA, SQ5WPR, DO2JMG, SP6VWX, SQ2WB, IU2FRL, DO3BOX, US1GHQ</center>
<center><b>Latest stable version:</b> <a href=https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS>https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS</a></center>
<center><b>Contributors in order of appearance:</b><br> OE1ACM, OE3CJB, SQ9MDD, SQ5RWU, DJ1AN, M0IGA, SQ5WPR, DO2JMG, SP6VWX, SQ2WB, IU2FRL, DO3BOX, DL9SAU, DL3EL</center>
<center><b>Latest stable version:</b> <a href=https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS>https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS</a></center>
<center><b>Licensed under:</b> CC BY-NC-SA</center>
<center><!--VERSION--></center>
</footer>

@ -0,0 +1,3 @@
# rem ~/.platformio/penv/bin/pio run -e ttgo-t-beam-v1.0 -t nobuild -t upload --upload-port /dev/ttyACM0
~/.platformio/penv/bin/pio run -e ttgo-t-beam-v1.0-development -t nobuild -t upload --upload-port /dev/ttyACM0
~/.platformio/penv/bin/pio device monitor

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 148 KiB

@ -7,16 +7,61 @@
extern Preferences preferences;
// MAX 15 chars for preference key!!!
static const char *const PREF_AP_PASSWORD = "ap_password";
static const char *const PREF_WIFI_SSID = "wifi_ssid";
static const char *const PREF_WIFI_PASSWORD = "wifi_password";
static const char *const PREF_AP_PASSWORD = "ap_password";
static const char *const PREF_NTP_SERVER = "ntp_server";
static const char *const PREF_SYSLOG_SERVER = "syslog_server";
static const char *const PREF_WIFI_ENABLE_INIT = "wifi_en_i";
static const char *const PREF_WIFI_ENABLE = "wifi_en";
static const char *const PREF_WIFI_TXPWR_MODE_AP_INIT = "wifi_pwrAP_i";
static const char *const PREF_WIFI_TXPWR_MODE_AP = "wifi_pwrAP";
static const char *const PREF_WIFI_TXPWR_MODE_STA_INIT = "wifi_pwrSTA_i";
static const char *const PREF_WIFI_TXPWR_MODE_STA = "wifi_pwrSTA";
static const char *const PREF_WIFI_STA_ALLOW_FAILBACK_TO_MODE_AP_AFTER_ONCE_CONNECTED_INIT = "wifi_failAP_i";
static const char *const PREF_WIFI_STA_ALLOW_FAILBACK_TO_MODE_AP_AFTER_ONCE_CONNECTED = "wifi_failAP";
static const char *const PREF_TNCSERVER_ENABLE_INIT = "tncsrvr_en_i";
static const char *const PREF_TNCSERVER_ENABLE = "tncsrvr_en";
static const char *const PREF_GPSSERVER_ENABLE_INIT = "gpssrv_en_i";
static const char *const PREF_GPSSERVER_ENABLE = "gpssrv_en";
// LoRa settings
static const char *const PREF_LORA_FREQ_PRESET_INIT = "lora_freq_i";
static const char *const PREF_LORA_FREQ_PRESET = "lora_freq";
static const char *const PREF_LORA_SPEED_PRESET_INIT = "lora_speed_i";
static const char *const PREF_LORA_SPEED_PRESET = "lora_speed";
static const char *const PREF_LORA_RX_ENABLE_INIT = "lora_rx_en_i";
static const char *const PREF_LORA_RX_ENABLE = "lora_rx_en";
static const char *const PREF_LORA_TX_ENABLE_INIT = "lora_tx_en_i";
static const char *const PREF_LORA_TX_ENABLE = "lora_tx_en";
static const char *const PREF_LORA_TX_POWER_INIT = "txPower_i";
static const char *const PREF_LORA_TX_POWER = "txPower";
static const char *const PREF_LORA_ADD_SNR_RSSI_TO_PATH_PRESET_INIT = "lora_rssi2p_i";
static const char *const PREF_LORA_ADD_SNR_RSSI_TO_PATH_PRESET = "lora_rssi2p";
static const char *const PREF_LORA_ADD_SNR_RSSI_TO_PATH_END_AT_KISS_PRESET_INIT = "snraprsis_i";
static const char *const PREF_LORA_ADD_SNR_RSSI_TO_PATH_END_AT_KISS_PRESET = "snraprsis";
static const char *const PREF_LORA_FREQ_CROSSDIGI_PRESET_INIT = "lora_freq_x_i";
static const char *const PREF_LORA_FREQ_CROSSDIGI_PRESET = "lora_freq_x";
static const char *const PREF_LORA_TX_BEACON_AND_KISS_TO_FREQUENCIES_PRESET_INIT = "tx_qrg_bc_i";
static const char *const PREF_LORA_TX_BEACON_AND_KISS_TO_FREQUENCIES_PRESET = "tx_qrg_bc";
static const char *const PREF_LORA_TX_BEACON_AND_KISS_TO_APRSIS_PRESET_INIT = "tx_aprsis_bc_i";
static const char *const PREF_LORA_TX_BEACON_AND_KISS_TO_APRSIS_PRESET = "tx_aprsis_bc";
static const char *const PREF_LORA_TX_STATUSMESSAGE_TO_APRSIS_PRESET_INIT = "tx_aprsis_sm_i";
static const char *const PREF_LORA_TX_STATUSMESSAGE_TO_APRSIS_PRESET = "tx_aprsis_sm";
static const char *const PREF_LORA_SPEED_CROSSDIGI_PRESET_INIT = "lora_speed_x_i";
static const char *const PREF_LORA_SPEED_CROSSDIGI_PRESET = "lora_speed_x";
static const char *const PREF_LORA_TX_POWER_CROSSDIGI_PRESET_INIT = "txPower_x_i";
static const char *const PREF_LORA_TX_POWER_CROSSDIGI_PRESET = "txPower_x";
static const char *const PREF_LORA_RX_ON_FREQUENCIES_PRESET_INIT = "rx_qrg_i";
static const char *const PREF_LORA_RX_ON_FREQUENCIES_PRESET = "rx_qrg";
static const char *const PREF_LORA_AUTOMATIC_CR_ADAPTION_PRESET_INIT = "lora_cradapt_i";
static const char *const PREF_LORA_AUTOMATIC_CR_ADAPTION_PRESET = "lora_cradapt";
static const char *const PREF_APRS_DIGIPEATING_MODE_PRESET_INIT = "lora_dig_mode_i";
static const char *const PREF_APRS_DIGIPEATING_MODE_PRESET = "lora_dig_mode";
static const char *const PREF_APRS_CROSS_DIGIPEATING_MODE_PRESET_INIT = "lora_dig_x_m_i";
static const char *const PREF_APRS_CROSS_DIGIPEATING_MODE_PRESET = "lora_dig_x_m";
// Station settings
static const char *const PREF_APRS_CALLSIGN = "aprs_callsign";
static const char *const PREF_APRS_RELAY_PATH = "aprs_relay_path";
@ -25,14 +70,24 @@ static const char *const PREF_APRS_SYMBOL_TABLE = "aprs_s_table";
static const char *const PREF_APRS_SYMBOL = "aprs_symbol";
static const char *const PREF_APRS_COMMENT = "aprs_comment";
static const char *const PREF_APRS_COMMENT_INIT = "aprs_comm_init";
static const char *const PREF_APRS_SHOW_ALTITUDE = "aprs_alt";
static const char *const PREF_APRS_SHOW_ALTITUDE_INIT = "aprs_alt_init";
static const char *const PREF_APRS_COMMENT_RATELIMIT_PRESET = "aprs_comm_rt";
static const char *const PREF_APRS_COMMENT_RATELIMIT_PRESET_INIT = "aprs_comm_rt_i";
static const char *const PREF_APRS_SHOW_ALTITUDE = "aprs_alt"; /* obsoleted. may be removed later. Use alt ratio 0 .. 100*/
static const char *const PREF_APRS_SHOW_ALTITUDE_INIT = "aprs_alt_init"; /* obsoleted. may be removed later. Use alt ratio 0 .. 100*/
static const char *const PREF_APRS_ALTITUDE_RATIO = "aprs_alt_r";
static const char *const PREF_APRS_ALTITUDE_RATIO_INIT = "aprs_alt_r_i";
static const char *const PREF_APRS_ALWAYS_SEND_CSE_SPEED_AND_ALTITUDE = "aprs_CSandA";
static const char *const PREF_APRS_ALWAYS_SEND_CSE_SPEED_AND_ALTITUDE_INIT = "aprs_CSandA_i";
static const char *const PREF_APRS_SHOW_BATTERY = "aprs_batt";
static const char *const PREF_APRS_SHOW_BATTERY_INIT = "aprs_batt_init";
static const char *const PREF_APRS_LATITUDE_PRESET = "aprs_lat_p";
static const char *const PREF_APRS_LATITUDE_PRESET_INIT = "aprs_lat_p_init";
static const char *const PREF_APRS_LONGITUDE_PRESET = "aprs_lon_p";
static const char *const PREF_APRS_LONGITUDE_PRESET_INIT = "aprs_lon_p_init";
static const char *const PREF_APRS_SENDER_BLACKLIST = "aprs_blist";
static const char *const PREF_APRS_SENDER_BLACKLIST_INIT = "aprs_blist_init";
static const char *const PREF_APRS_FIXED_BEACON_PRESET = "aprs_fixed_beac";
static const char *const PREF_APRS_FIXED_BEACON_PRESET_INIT = "aprs_fix_b_init";
static const char *const PREF_APRS_FIXED_BEACON_INTERVAL_PRESET = "aprs_fb_interv";
@ -47,6 +102,7 @@ static const char *const PREF_TNC_SELF_TELEMETRY_MIC = "tnc_tel_mic";
static const char *const PREF_TNC_SELF_TELEMETRY_MIC_INIT = "tnc_tel_mic_i";
static const char *const PREF_TNC_SELF_TELEMETRY_PATH = "tnc_tel_path";
static const char *const PREF_TNC_SELF_TELEMETRY_PATH_INIT = "tnc_tel_path_i";
// SMART BEACONING
static const char *const PREF_APRS_SB_MIN_INTERVAL_PRESET = "sb_min_interv";
static const char *const PREF_APRS_SB_MIN_INTERVAL_PRESET_INIT = "sb_min_interv_i";
@ -58,14 +114,26 @@ static const char *const PREF_APRS_SB_MAX_SPEED_PRESET = "sb_max_speed";
static const char *const PREF_APRS_SB_MAX_SPEED_PRESET_INIT = "sb_max_speed_i";
static const char *const PREF_APRS_SB_ANGLE_PRESET = "sb_angle";
static const char *const PREF_APRS_SB_ANGLE_PRESET_INIT = "sb_angle_i";
static const char *const PREF_APRS_SB_TURN_SLOPE_PRESET = "sb_turn_slope";
static const char *const PREF_APRS_SB_TURN_SLOPE_PRESET_INIT = "sb_turn_slope_i";
static const char *const PREF_APRS_SB_TURN_TIME_PRESET = "sb_turn_time";
static const char *const PREF_APRS_SB_TURN_TIME_PRESET_INIT = "sb_turn_time_i";
// Device settings
static const char *const PREF_APRS_GPS_EN = "gps_enabled";
static const char *const PREF_APRS_GPS_EN_INIT = "gps_state_init";
static const char *const PREF_ACCEPT_OWN_POSITION_REPORTS_VIA_KISS = "kiss_myloc_ok";
static const char *const PREF_ACCEPT_OWN_POSITION_REPORTS_VIA_KISS_INIT = "kiss_myloc_ok_i";
static const char *const PREF_GPS_ALLOW_SLEEP_WHILE_KISS = "gps_sleep_ok";
static const char *const PREF_GPS_ALLOW_SLEEP_WHILE_KISS_INIT = "gps_sleep_ok_i";
static const char *const PREF_APRS_SHOW_CMT = "show_cmt";
static const char *const PREF_APRS_SHOW_CMT_INIT = "show_cmt_init";
static const char *const PREF_DEV_BT_EN = "bt_enabled";
static const char *const PREF_DEV_BT_EN_INIT = "bt_enabled_init";
static const char *const PREF_DEV_LOGTOSERIAL_EN = "logserial_en"; /* obsoleted. may be removed later. Use alt ratio 0 .. 100*/
static const char *const PREF_DEV_LOGTOSERIAL_EN_INIT = "logserial_en_i"; /* obsoleted. may be removed later. Use alt ratio 0 .. 100*/
static const char *const PREF_DEV_USBSERIAL_DATA_TYPE = "usbser_proto";
static const char *const PREF_DEV_USBSERIAL_DATA_TYPE_INIT= "usbser_proto_i";
static const char *const PREF_DEV_OL_EN = "oled_enabled";
static const char *const PREF_DEV_OL_EN_INIT = "ol_enabled_init";
static const char *const PREF_DEV_SHOW_RX_TIME = "sh_rxtime";
@ -74,7 +142,28 @@ static const char *const PREF_DEV_AUTO_SHUT = "shutdown_act";
static const char *const PREF_DEV_AUTO_SHUT_INIT = "shutdown_actini";
static const char *const PREF_DEV_AUTO_SHUT_PRESET = "shutdown_dt";
static const char *const PREF_DEV_AUTO_SHUT_PRESET_INIT = "shutdown_dtini";
static const char *const PREF_DEV_REBOOT_INTERVAL = "reboot_intrvl";
static const char *const PREF_DEV_REBOOT_INTERVAL_INIT = "reboot_intrvl_i";
static const char *const PREF_DEV_SHOW_OLED_TIME = "sh_oledtime"; // set OLED timeout
static const char *const PREF_DEV_SHOW_OLED_TIME_INIT = "sh_oledtime_i";
static const char *const PREF_DEV_CPU_FREQ = "cpufreq";
static const char *const PREF_DEV_CPU_FREQ_INIT = "cpufreq_i";
// APRSIS settings
static const char *const PREF_APRSIS_EN_INIT = "aprsis_en_i";
static const char *const PREF_APRSIS_EN = "aprsis_en";
static const char *const PREF_APRSIS_SERVER_NAME_INIT = "aprsis_srv_h_i";
static const char *const PREF_APRSIS_SERVER_NAME = "aprsis_srv_h";
static const char *const PREF_APRSIS_SERVER_PORT_INIT = "aprsis_srv_p_i";
static const char *const PREF_APRSIS_SERVER_PORT = "aprsis_srv_p";
static const char *const PREF_APRSIS_FILTER_INIT = "aprsis_fltr_i";
static const char *const PREF_APRSIS_FILTER = "aprsis_fltr";
static const char *const PREF_APRSIS_CALLSIGN_INIT = "aprsis_call_i";
static const char *const PREF_APRSIS_CALLSIGN = "aprsis_call";
static const char *const PREF_APRSIS_PASSWORD_INIT = "aprsis_pw_i";
static const char *const PREF_APRSIS_PASSWORD = "aprsis_pw";
static const char *const PREF_APRSIS_ALLOW_INET_TO_RF_INIT = "aprsis_2rf_i";
static const char *const PREF_APRSIS_ALLOW_INET_TO_RF = "aprsis_2rf";
#endif

@ -1,6 +1,5 @@
#include <Arduino.h>
#include <KISS_TO_TNC2.h>
#include <KISS_TO_PKT.h>
#if defined(ENABLE_BLUETOOTH)
#include "BluetoothSerial.h"

@ -3,13 +3,13 @@
#include <WebServer.h>
#include <ESPmDNS.h>
#include <Update.h>
#include <RH_RF95.h>
#include <RadioLib.h>
#include <esp_wifi.h>
#ifndef TASK_WEBSERVER
#define TASK_WEBSERVER
extern RH_RF95 rf95;
extern SX1278 rf95;
#ifdef KISS_PROTOCOL
extern WiFiServer tncServer;
#endif

@ -1,10 +1,10 @@
#ifndef BUILD_NUMBER
#define BUILD_NUMBER "17"
#endif
#ifndef VERSION
#define VERSION "v0.4.6.17-0a01171 - 2021-12-28 21:20:22.015464"
#endif
#ifndef VERSION_SHORT
#define VERSION_SHORT "v0.4.6.17-0a01171"
#endif
#ifndef BUILD_NUMBER
#define BUILD_NUMBER "91"
#endif
#ifndef VERSION
#define VERSION "v0.3.91-290838b - 2022-10-08 18:55:29.826499"
#endif
#ifndef VERSION_SHORT
#define VERSION_SHORT "v0.3.91-290838b"
#endif

@ -0,0 +1,2 @@
.vscode
.DS_Store

@ -0,0 +1,8 @@
# set(COMPONENT_SRCS "./AXP202X_Library/src/axp20x.cpp")
# set(COMPONENT_ADD_INCLUDEDIRS "./AXP202X_Library/src")
# register_component()
idf_component_register(SRCS "src/axp20x.cpp"
INCLUDE_DIRS "src"
)

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 lewis he
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,22 @@
AXP202X_Library
=====================================
- How to program **AXP20x_Library** with ESP-IDF [ESP_IDF_AXP20x_Library](https://github.com/lewisxhe/ESP_IDF_AXP20x_Library)
- The `setPowerOutPut` function has forced DCDC3 to be turned on and cannot be controlled because T-Watch uses DCDC3 as the esp32 to power the main chip. If it is turned off, the hardware cannot be programmed.
TTGO invests time and resources to provide this open source code, please support TTGO and open source hardware by purchasing products from TTGO!
Written by Lewis He for TTGO. MIT license, all text above must be included in any redistribution
## Chip resource table
| CHIP | AXP173 | AXP192 | AXP202 |
| -------- | ---------------- | ---------------- | ---------------- |
| DC1 | 0v7~3v5 /1200mA | 0v7~3v5 /1200mA | X |
| DC2 | 0v7~2v275/1600mA | 0v7~2v275/1600mA | 0v7~2v275/1600mA |
| DC3 | X | 0v7~3v5 /700mA | 0v7~3v5 /1200mA |
| LDO1 | 3v3 /30mA | 3v3 /30mA | 3v3 /30mA |
| LDO2 | 1v8~3v3 /200mA | 1v8~3v3 /200mA | 1v8~3v3 /200mA |
| LDO3 | 1v8~3v3 /200mA | 1v8~3v3 /200mA | 0v7~3v3 /200mA |
| LDO4 | 0v7~3v5 /500mA | X | 1v8~3v3 /200mA |
| LDO5/IO0 | X | 1v8~3v3 /50mA | 1v8~3v3 /50mA |

@ -0,0 +1,66 @@
/*
MIT License
Copyright (c) 2019 lewis he
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <Wire.h>
#include <axp20x.h>
AXP20X_Class axp;
const uint8_t i2c_sda = 21;
const uint8_t i2c_scl = 22;
void setup()
{
Serial.begin(115200);
Wire.begin(i2c_sda, i2c_scl);
int ret = axp.begin(Wire);
if (ret == AXP_FAIL) {
Serial.println("AXP Power begin failed");
while (1);
}
//! AXP202 GPIO has no internal pull-up or pull-down.
//! For stability, external pull-up or pull-down resistors are required.
ret = axp.setGPIOMode(AXP_GPIO_0, AXP_IO_INPUT_MODE);
Serial.printf("AXP_GPIO_0 %d\n", ret);
ret = axp.setGPIOMode(AXP_GPIO_1, AXP_IO_INPUT_MODE);
Serial.printf("AXP_GPIO_1 %d\n", ret);
ret = axp.setGPIOMode(AXP_GPIO_2, AXP_IO_INPUT_MODE);