mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-15 17:54:45 +01:00
mas pruebas
This commit is contained in:
parent
c675552b5f
commit
c9187502b3
|
|
@ -1,3 +1,4 @@
|
|||
#include <Arduino.h>
|
||||
#include <SPI.h>
|
||||
#include <LoRa.h>
|
||||
#include <WiFi.h>
|
||||
|
|
@ -109,7 +110,9 @@ void valida_y_procesa_packet(String mensaje) {
|
|||
}
|
||||
}
|
||||
|
||||
void APRS_IS_READ(){
|
||||
|
||||
|
||||
void APRS_connect(){
|
||||
int count = 0;
|
||||
String aprsauth;
|
||||
Serial.println("Conectando a APRS-IS");
|
||||
|
|
@ -128,30 +131,33 @@ void APRS_IS_READ(){
|
|||
} else {
|
||||
Serial.println("Connected with server: " + String(SERVER) + " APRSPORT: " + String(APRSPORT));
|
||||
|
||||
String aprsisData;
|
||||
while (espClient.connected()) {
|
||||
aprsauth = "user " + iGate_Callsign + " pass " + passcode_igate + "\n"; //info igate
|
||||
espClient.write(aprsauth.c_str());
|
||||
delay(200);
|
||||
char c = espClient.read();
|
||||
//if (c == '\r') continue;
|
||||
if (c == '\n') {
|
||||
Serial.println(aprsisData);
|
||||
aprsisData = "";
|
||||
}
|
||||
aprsisData += c;
|
||||
|
||||
}
|
||||
|
||||
aprsauth = "user " + iGate_Callsign + " pass " + passcode_igate + " vers " + "ESP32_TEST" + " " + "0.2" + " filter " + "b/CD*/CA*/CE*/XQ*" + "\n\r"; //info igate
|
||||
espClient.write(aprsauth.c_str());
|
||||
delay(200);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void APRS_IS_READ(){
|
||||
String aprsisData;
|
||||
while (espClient.connected()) {
|
||||
char c = espClient.read();
|
||||
if (c == '\n') {
|
||||
Serial.print(aprsisData);
|
||||
aprsisData = "";
|
||||
}
|
||||
aprsisData += c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
setup_wifi();
|
||||
btStop();
|
||||
setup_lora();
|
||||
Serial.println("Starting iGate\n");
|
||||
//APRS_connect();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
#ifndef IGATE_CONFIG_H_
|
||||
#define IGATE_CONFIG_H_
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#define WIFI_SSID "Richon"
|
||||
#define WIFI_PASSWORD "k4fPnmg5qnyf"
|
||||
|
||||
#define BeaconInterval 900000 // 15 minutes = 900000 seg
|
||||
|
||||
String iGate_Callsign = "CD2RXU-10";
|
||||
String iGate_Callsign = "CD2RXU-11";
|
||||
String passcode_igate = "23201";
|
||||
|
||||
const String LAT = "3302.03S"; // por corregir // write your latitude
|
||||
|
|
@ -16,8 +18,14 @@ const String iGate_Comment = "DIY ESP32 - LoRa APRS iGATE https://github.com/ric
|
|||
|
||||
const String SERVER = "brazil.aprs2.net"; // write the address of the aprs server
|
||||
const int APRSPORT = 14579; // write the aprs server APRSPORT
|
||||
//funciona con 14579 y 14580
|
||||
|
||||
//const String SERVER = "radioaficion.pro"; // write the address of the aprs server
|
||||
//const int APRSPORT = 14580; // write the aprs server APRSPORT
|
||||
|
||||
|
||||
String iGateBeaconPacket = iGate_Callsign + ">APLG01,TCPIP*,qAC,T2BRAZIL:=" + LAT + "L" + LON + "&" + iGate_Comment + "\n";
|
||||
//String iGateBeaconPacket = iGate_Callsign + ">APLG01,TCPIP*,qAC,CHILE:=" + LAT + "L" + LON + "&" + iGate_Comment + "\n";
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Reference in a new issue