LoRa tracker with KISS TNC capability
 
 
 
 
 
 
Go to file
Thomas Osterried ba8c81ba74 Many fixes, improvements and new features
Changelog of 2022-08-21:

show time constantly in line1

show time now in line1 (comes from system clock, either set from gps
or by ntp-client)
show uptime in line1
show wifi / webserver state in line2 (CLI|AP|off)
show time until next tx in line
Text updates in index.html

Code beautifying

Signed-off-by: DL3EL <dl3el@darc.de>

Also code beautifying

Signed-off-by: Thomas Osterried <dl9sau@darc.de>

Changelog of 2022-08-20:

- new web option
  - Option Send Course/Speed along with Altitude.
    Option "Show Altitude in compressed position" removed.
- Added hint for min/max values in tooltip
- Tips for reducing power

- platformio.ini:
  - enabled ENABLE_TNC_SELF_TELEMETRY.
    Reason: imho, no really need for telemetry. But code is not much.
    Tried to configure it in web-iface for debug purpose and it had no effect
    (because it was not compiled in).

- always_send_cseSpd_AND_altitude feature (see also webconfig)
- sendpacket() now gets information (flags) why / for what it is called
  This is for deciding, if you send altitude with each transmission
  (then course/speed is always sent in compressed format, and /A=......
  is added to the message text). [Vice versa is not allowed due to spec]
  If disabled, one transmission has course/speed and the next one
  altitude (depending on altitude ratio). Pretty cewl ;)

- improvements on display output

- improvements for handling gps state change valid/invalid.
  Lesser (better) cpu-consuming storage of last position.
  It's now handled in one routine at start of the main loop.

- mheard list: json list was cuted.
  -> -  DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500);
     +  DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000);
  But we still face the problem of empty mheard lists in the webinterface.
  -> STILL NEED FOR FIX

- webserver
  - wifi client / AP:
    Fix. If you loose connection to the AP, we now go to the
    algorithm again for reconnect, or start own AP. And if no client
    is associated in AP mode, we also try to re-determine.
    -> moved to new function restart_AP_or_STA()

    Reconnect also if we are STA and got no IP address by dhcp
    (there are some known compatibility issues with some dhcp-serrvers,
    where on dhcp refresh we lost the gateway):
    if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL))
  - wifi status now with one status variable, i.E.:
      wifi_connection_status = WIFI_RUNNING_AS_AP;
    Used in the main program for display routine.

  - system clock now set from gps time

===
dl3el's commit messages (newest on top)

- update time and sec of next beacon per second, even if rxshow is >0
- show gps time in OLED
- smoothen speed in OLED. display current Position, Uptime & Satt Info on
  Website
- bug fix in WebServer: Enable Wifi menu did not show the currently selected
  value

- Features:
  - Change gps reception in main loop
  - do not accept gps data when hdop is > 8
  - when gps data is invalid, show gps.location.age
  - when beacon is send manually and reset the timer for fixed beacon
  - when oled is constantly on, refresh screen every second
  - show wifi mode on screen (CLI or AP, run or stopped)
  - show SSID & IP on screen when manual tx (button, web) and as boot message

  - Bugfixes:
  - manual send works now, when oled is constantly o

- fix output to Oled Display
- reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on
- show Discharge mA in OLED for optimization
===

And finally, from the old changelog with changes since the last release:

Changelog of 2022-08-09:

Fix
- logical error for setting lora chip to sleep after tx;
  affected users with digipeating mode switched off. -> They did not receive
  any RF packets.

Improvements:
- hack for re-enabling webserver if it was switched off_
  moved from the short-pressed beacon button to the long-pressed GPS button.
  Thanks to Thomas Beiderwieden <dl3el> for the patch.

Feature
- If you press the GPS button, on your OLED display now your AP name and
  IP address are displayed.
  Thanks to Thomas Beiderwieden <dl3el> for the patch.

- Known issues
  The first Menu in the webinterface, "Enable WIFI", stores the chosen
  value. You can see it in the json config, and how boot-up behaves
  (-> correctly stored in the preferences).
  But: the chooser always displays Menu item 1 as active.

Signed-off-by: Thomas Osterried <dl9sau@darc.de>

Changelog of 2022-08-07:

 Major improvements and smaller bugfixes

- feature: option to disable wifi. Saves abt 80mA current
  3 options: 2 alaways on; 1 off if no bluetooth client is connected in between
  60s after boot (watch red oled button; goes off as soon as a
  bt client connects in the boot phase). 0 disable (re-enabl by pressing
  beacon button)
- pseudo csma/cd. ppersist / slottime as we know it from standard
  packet-radio / -APRS
  In loaSend. TODO: better concept with a tx-queue. But this is rather complex,
  because the queue must not grow too large, else we re-send old packts..
- feature to encode altitude in compressed position instead of /A=...
  compressed position can encode course/speed, altitude (and others). Option to
  send course/speed to 0%, 100% or something in between.
  altitude check button is obsolete. Switch off by setting alt ratio to 0.
- cross-digipeating: just for sure, clear rx queue after going back to main
  freq.
- if we are not a digipeater and we have no serial-bt-client, we may let the
  loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current
  (a bit)
- adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption
  up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e.
  40 MHz or 20 MHz did not work with my device (boot phase never ended)
- options to start tncServer and gpsServer (if you don't need them, you
  may not like to expose these tcp ports to your LAN or HAMNET)
- changed preferences.getString(PREFxxxxx) to
  preferences.getString(PREFxxxxx, ""), because if variable is not set,
  the preferences library returns "the variable name itself" - wtf!.
  In the case of PREF_NTP_SERVER, we saw log messages that ntp server
  with fqdn "ntp_server" could not be resolved; it had no impact, because
  it did a failback to the compiled-in default.  Changed call for
  PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too.
- wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power
  consumption of the devie). 8 dBm are too less fore some cases.
  -> New web config for setting max_tx_power in AP- and STA- modes.
- Fix: In mode wifi-client, it did not reconnect if association was lost.
- small improvement for comment-text ratelimiting

BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd)

Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-21 22:08:47 +02:00
.github/workflows Minor changes 2022-03-07 21:06:05 +01:00
data_embed Text updates in index.html 2022-08-21 20:43:05 +02:00
img Create H49c4700b02604cf9a3b9f5f1e91c9e33u.webp 2021-03-15 00:19:40 +01:00
include Many fixes, improvements and new features 2022-08-20 08:34:28 +02:00
lib Major improvements and smaller bugfixes 2022-08-07 20:01:24 +02:00
pdf Heltec-WiFi-KIT32 & Heltec-WiFi-KIT32_V2 2021-03-21 17:18:14 +01:00
src Many fixes, improvements and new features 2022-08-21 22:08:47 +02:00
tools Include git hash in version 2021-04-20 17:25:22 +02:00
.gitignore Adds Smart Beaconing settings 2021-07-11 11:54:11 +02:00
.travis.yml LoRa APRS Tracker 2018-11-25 21:07:34 +01:00
INSTALL.md course calculation corrected 2020-02-02 13:45:19 +01:00
README.md Get self telemetry path working. 2021-09-19 15:50:35 -05:00
partitions.csv Upgrade firmware from web interface 2021-03-01 14:47:34 +01:00
platformio.ini Many fixes, improvements and new features 2022-08-20 08:34:28 +02:00

README.md

LoRa tracker with KISS TNC capability

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

Contributors

  • Initial work: OE1ACM, OE3CJB
  • Redesigned: SQ9MDD
  • KISS TNC Over Serial or Bluetooth: SQ5RWU
  • Lora32 board support: DJ1AN
  • Self-telemetry improvement: KB1GIM

Supported boards

  • TTGO T-beam v.0.7
  • TTGO T-beam v.1.0
  • Lora32 board

User key functions:

short press (OLED Enabled):

  • if OLED is OFF a short press will wake it up and show current data (as "Display Timeout" seconds)
  • if OLED is ON with GPS-FIX immediate sending of a frame with the position from the GPS
  • if OLED is ON without GPS-FIX, immediate sending of the frame with the position saved in the configuration

short press (OLED Disabled):

  • with a valid GPS-FIX immediate sending of a frame with the position from the GPS
  • without valid GPS-FIX, immediate sending of the frame with the position saved in the configuration

long press while booting

  • reset to factory default

long press: toggle on or off GPS power supply

  • if the "FIXED_BEACON_EN" option is enabled in the configuration, a beacon will be sent every set time interval

Oled screens information

  • ((TX)) - position frame sent automatically
  • ((RX)) - informs about the received frame
  • ((GPSOFF)) - GPS power-off information
  • ((GPS ON)) - GPS power-on information
  • ((MAN TX)) - information about sending a manually initialized GPS position frame
  • ((FIX TX)) - information about the forced manual sending of a frame with the position saved in the configuration when GPS is off or no fix
  • ((AUT TX)) - information about sending automatic positioning frame when GPS is turned off
  • ((KISSTX)) - information about sending the frame sent by KISS
  • ((WEB TX)) - sending frame as requested via HTTP
  • ((TEL TX)) - information about sending telemetry

How to binary first flash readme... (thanx SP6VWX)

  • Download the appropriate binary file for your board from: https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS/releases
  • Download current version of the esphome-flasher tool: https://github.com/esphome/esphome-flasher/releases
  • Connect your board to your USB port and open ESPHome Flasher.
  • If your board is not showing under Serial Port then you likely need to install the drivers for the CP210X serial chip. In Windows you can check by searching “Device Manager” and ensuring the device is shown under “Ports”.
  • In ESPHome Flasher, refresh the serial ports and select your board's serial port.
  • Browse to the downloaded firmware and select the correct firmware based on the board type.
  • Select/Press Flash ESP.
  • Once complete, “Done! Flashing is complete!” will be shown.
  • any subsequent updates can be done via WWW

Installing from source (only for advanced users)

  • Clone Git repo to any folder of your PC
  • Download and install "Visual Studio Code"
  • Open "Visual Studio Code" and add "PlatformIO" plugin
  • Open "PlatformIO" and click on "Import Arduino Project"
  • In the top part of the window choose youy board then browse to cloned repo and click "import"
  • In the left column click on the ANT-shaped icon, choose your board and click on "Upload". COM port should be detected automatically Wait for procedure to finish and keep reading

Configuring parameters

Wait for the board to reboot, connect to "N0CALL AP" WiFi network, password is: xxxxxxxxxx (10 times "x") and point your browser to "http://192.168.4.1" (http, not https). Hover your mouse to textboxes to get useful hints.

WiFi Settings

you can scan for local SSID or manually type in name and password

  • Scan WiFi: scan for local WiFi networks
  • SSID: name of the AP to connect to
  • Password: password of WiFi AP
  • AUTO AP Password: if configured network is not reachable the AP mode will be enabled, SSID will be your callsign and this will be the password

APRS Settings

These are main APRS settings such as callsign, SSID and symbol (refer to: http://www.aprs.org/symbols.html). Please remember to turn ON GPS in order to use it as a tracker.

  • Frequency: frequency of receive and transmit
  • Speed: speed of the LoRa APRS packet (default: 300)
  • Callsign and SSID: Callsign of the tracker (e.g: N0CALL-10)
  • Relay PATH: destination path of APRS packet
  • Symbol table & Symbol: custom APRS icon
  • Show altitude: allow altitude to be reported
  • Show comment: includes comment in APRS packet
  • Comment: custom message to send
  • Show Battery: includes current battery voltage
  • Fixed beacon: enables static beacon transmission
  • Fixed beacon interval: beacon interval in seconds (please more than 30 minutes to avoid overflow on the network)
  • Latitude & Longitude: fixed beacon position to transmit (in APRS format)
  • Min interval: packet are transmitted not less than x second apart
  • Max interval: maximum interval between packages
  • Speed and course: variables to calculate smart beaconing
  • GPS enabled: enables power to GPS module

Device Settings

These are main device settings, hover the mouse on the checkboxes and explainations will appear.

  • OLED Display enabled: Enables OLED functionalities
  • Bluetooth enabled: Enables bluetooth functions (such as TNC via APRSDROID)
  • LED Signaling: not yet implemented
  • Auto Power OFF: activate auto power off when USB is unplugged (only for TBEAM 1.0 or later)
  • Auto Power OFF delay: timer to turn off board after USB is unplugged (only if enabled)
  • Display show RX Time: when a packet is received display the packet is shown for X seconds
  • Display Timeout: display will turn OFF after X seconds for better power save (0 to disable and keep OLED ON)

Received

Here is the list of recently received stations with some details

Actions

Some shortcuts to useful functions such as manually send beacon

Update

This box allows firmware to be uploaded via OTA

Default WiFi Password:

  • Default WiFi Password is: xxxxxxxxxx
  • that is, 10 times x