new test not good

This commit is contained in:
richonguzman 2023-01-28 13:02:08 -03:00
parent a8fcb32a2f
commit efa8f166df
6 changed files with 45 additions and 34 deletions

View File

@ -1,12 +1,14 @@
# LORA (1 Watt Module) APRS Tracker
This LORA APRS Tracker will work with very cheep hardware (amazon, ebay or aliexpress):
- ESP32 ( ESP32 Dev Module)
- Ebyte E22 400M30S (1 Watt (30dB) Lora SPI Module)
- GY-GPSNEO6MV2 (NEO6M GPS Module)
- ESP32 ( ESP32 Dev Module)
- Ebyte E22 400M30S (1 Watt (30dB) Lora SPI Module)
- GY-GPSNEO6MV2 (NEO6M GPS Module)
This project uses Enconded APRS GPS packet to extends range by saving bytes (increased battery life, higher chances of good packet reception (increased range), lower probability of packet collisions (more channel capacity) and 1 Watt LoRa Module (over the usual 0.1 Watt in commercial boards like the LILYGO T-Beam V.1).
_____________________________________________________________________________
Achievements:
- configurations saved on ESP32 memory (SPIFFS).
@ -15,7 +17,7 @@ Achievements:
- force Tx with the "short" push of a button.
- send enconded GPS data packet for shorter and realiable comunication.
To add (shortly) working on it
To add (shortly) aka "working on it" :
- turn_slope for course angle smartbeacon
- oled screen (allready bought ... and waiting.. )
- SendAltitude: encoded instead of just "Course+Speed" without adding lenght to the APRS packet.
@ -25,14 +27,14 @@ To add (shortly) working on it
- Battery Monitoring (voltage, consumption, low_battery warning, charging?)
_____________________________________________________________________________
This Repository is based on lots of other Lora APRS Tracker ideas like:
- https://github.com/lora-aprs/LoRa_APRS_Tracker (the start with LILYGO T-BEAM v.1)
- https://github.com/aprs434/lora.tracker (the great encoding position modification)
- https://github.com/Mane76/lora.tracker (great ideas about changing callsign and other mods)
- https://github.com/sh123/esp32_loraprs (inspiration for accesing the Lora Module with Radiolib library)
_____________________________________________________________________________

View File

@ -1,4 +1,5 @@
{
"debug": false,
"beacons": [
{
"callsign": "CD2RXU-7",
@ -52,11 +53,11 @@
],
"lora": {
"frequency_rx": 433775000,
"frequency_tx": 433775000,
"frequency_rx": 433775,
"frequency_tx": 433775,
"power": 20,
"spreading_factor": 12,
"signal_bandwidth": 125000,
"signal_bandwidth": 125.0,
"coding_rate4": 5
}
}

View File

@ -15,12 +15,12 @@ https://github.com/sh123/esp32_loraprs
#include <WiFi.h>
#include <OneButton.h>
#include "BeaconManager.h"
#include "pins.h"
#include "pins_conection.h"
#include "lora_config.h"
#include "beacon_config.h"
#include "configuration.h"
#define VERSION "2023.01.28" // BETA still!!!
#define VERSION "2023.01.29" // BETA still!!!
SX1268 radio = new Module(NSS, DIO1, NRST, BUSY);
HardwareSerial neo6m_gps(1);
@ -32,20 +32,19 @@ BeaconManager BeaconMan;
static bool send_update = true;
void load_config() {
ConfigurationManagement confmg("/tracker.json");
Config = confmg.readConfiguration();
BeaconMan.loadConfig(Config.beacons);
if (BeaconMan.getCurrentBeaconConfig()->callsign == "NOCALL-10") {
Serial.println("You have to change your settings in 'data/tracker.json' and "
"upload it via \"Upload File System image\"!");
while (true) {
}
} else {
Serial.println("##### (Configuration Loaded) #####");
}
ConfigurationManagement confmg("/tracker.json");
Config = confmg.readConfiguration();
BeaconMan.loadConfig(Config.beacons);
if (BeaconMan.getCurrentBeaconConfig()->callsign == "NOCALL-10") {
Serial.println("You have to change your settings in 'data/tracker.json' and "
"upload it via \"Upload File System image\"!");
while (true) {
}
} else {
Serial.println(" (Configuration Loaded)");
}
}
void setup_lora_module() {
int state = radio.begin(LoraFreqTx, LoraBandWidth, LoraSpreadingFactor, LoraCodingRate, LoraSyncWord, LoraOutro, LoraPreampbleLenght);
radio.setOutputPower(Lora_Power);
@ -77,9 +76,9 @@ void setup() {
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
Serial.print("LoRa APRS tracker"); // __DATE__ " " __TIME__);
load_config();
Serial.print("LoRa tracker " __DATE__ " " __TIME__ " / Callsign ------> ");
Serial.println(BeaconMan.getCurrentBeaconConfig()->callsign);
Serial.println("________________________________________");
setup_lora_module();
setup_gps_module();
UserButton1.attachClick(ForcedBeaconTx);
@ -87,6 +86,8 @@ void setup() {
WiFi.mode(WIFI_OFF);
btStop();
Serial.print("(Version = "); Serial.print(VERSION); Serial.println(")");
Serial.print(" / Callsign ---> ");
Serial.println(BeaconMan.getCurrentBeaconConfig()->callsign);
Serial.println("Transmission Start ---->");
}

View File

@ -59,15 +59,17 @@ Configuration ConfigurationManagement::readConfiguration() {
conf.beacons.push_back(beacon);
}
/*
conf.button.tx = data["button"]["tx"] | false;
conf.button.alt_message = data["button"]["alt_message"] | false;
conf.lora.frequencyRx = data["lora"]["frequency_rx"] | 433775000;
conf.lora.frequencyTx = data["lora"]["frequency_tx"] | 433775000;
conf.lora.frequencyRx = data["lora"]["frequency_rx"] | 433775;
conf.lora.frequencyTx = data["lora"]["frequency_tx"] | 433775;
conf.lora.power = data["lora"]["power"] | 20;
conf.lora.spreadingFactor = data["lora"]["spreading_factor"] | 12;
conf.lora.signalBandwidth = data["lora"]["signal_bandwidth"] | 125000;
conf.lora.signalBandwidth = data["lora"]["signal_bandwidth"] | 125;
conf.lora.codingRate4 = data["lora"]["coding_rate4"] | 5;
*/
return conf;
}
@ -102,8 +104,10 @@ void ConfigurationManagement::writeConfiguration(Configuration conf) {
v["enhance_precision"] = beacon.enhance_precision;
}
data["debug"] = conf.debug;
/*
data["button"]["tx"] = conf.button.tx;
data["button"]["alt_message"] = conf.button.alt_message;
@ -113,7 +117,8 @@ void ConfigurationManagement::writeConfiguration(Configuration conf) {
data["lora"]["spreading_factor"] = conf.lora.spreadingFactor;
data["lora"]["signal_bandwidth"] = conf.lora.signalBandwidth;
data["lora"]["coding_rate4"] = conf.lora.codingRate4;
*/
serializeJson(data, file);
file.close();
}

View File

@ -38,9 +38,9 @@ public:
bool enhance_precision;
};
class LoRa {
/*class LoRa {
public:
LoRa() : frequencyRx(433775000), frequencyTx(433775000), power(20), spreadingFactor(12), signalBandwidth(125000), codingRate4(5) {
LoRa() : frequencyRx(433775), frequencyTx(433775), power(20), spreadingFactor(12), signalBandwidth(125), codingRate4(5) {
}
long frequencyRx;
@ -59,14 +59,16 @@ public:
bool tx;
int alt_message;
};
*/
Configuration() : debug(false) {
}
bool debug;
std::list<Beacon> beacons;
LoRa lora;
Button button;
//LoRa lora;
//Button button;
};
class ConfigurationManagement {