mas pruebas
This commit is contained in:
parent
c675552b5f
commit
c9187502b3
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <Arduino.h>
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#include <LoRa.h>
|
#include <LoRa.h>
|
||||||
#include <WiFi.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;
|
int count = 0;
|
||||||
String aprsauth;
|
String aprsauth;
|
||||||
Serial.println("Conectando a APRS-IS");
|
Serial.println("Conectando a APRS-IS");
|
||||||
|
|
@ -128,23 +131,25 @@ void APRS_IS_READ(){
|
||||||
} else {
|
} else {
|
||||||
Serial.println("Connected with server: " + String(SERVER) + " APRSPORT: " + String(APRSPORT));
|
Serial.println("Connected with server: " + String(SERVER) + " APRSPORT: " + String(APRSPORT));
|
||||||
|
|
||||||
String aprsisData;
|
aprsauth = "user " + iGate_Callsign + " pass " + passcode_igate + " vers " + "ESP32_TEST" + " " + "0.2" + " filter " + "b/CD*/CA*/CE*/XQ*" + "\n\r"; //info igate
|
||||||
while (espClient.connected()) {
|
|
||||||
aprsauth = "user " + iGate_Callsign + " pass " + passcode_igate + "\n"; //info igate
|
|
||||||
espClient.write(aprsauth.c_str());
|
espClient.write(aprsauth.c_str());
|
||||||
delay(200);
|
delay(200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void APRS_IS_READ(){
|
||||||
|
String aprsisData;
|
||||||
|
while (espClient.connected()) {
|
||||||
char c = espClient.read();
|
char c = espClient.read();
|
||||||
//if (c == '\r') continue;
|
|
||||||
if (c == '\n') {
|
if (c == '\n') {
|
||||||
Serial.println(aprsisData);
|
Serial.print(aprsisData);
|
||||||
aprsisData = "";
|
aprsisData = "";
|
||||||
}
|
}
|
||||||
aprsisData += c;
|
aprsisData += c;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
|
@ -152,6 +157,7 @@ void setup() {
|
||||||
btStop();
|
btStop();
|
||||||
setup_lora();
|
setup_lora();
|
||||||
Serial.println("Starting iGate\n");
|
Serial.println("Starting iGate\n");
|
||||||
|
//APRS_connect();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
#ifndef IGATE_CONFIG_H_
|
#ifndef IGATE_CONFIG_H_
|
||||||
#define IGATE_CONFIG_H_
|
#define IGATE_CONFIG_H_
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
#define WIFI_SSID "Richon"
|
#define WIFI_SSID "Richon"
|
||||||
#define WIFI_PASSWORD "k4fPnmg5qnyf"
|
#define WIFI_PASSWORD "k4fPnmg5qnyf"
|
||||||
|
|
||||||
#define BeaconInterval 900000 // 15 minutes = 900000 seg
|
#define BeaconInterval 900000 // 15 minutes = 900000 seg
|
||||||
|
|
||||||
String iGate_Callsign = "CD2RXU-10";
|
String iGate_Callsign = "CD2RXU-11";
|
||||||
String passcode_igate = "23201";
|
String passcode_igate = "23201";
|
||||||
|
|
||||||
const String LAT = "3302.03S"; // por corregir // write your latitude
|
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 String SERVER = "brazil.aprs2.net"; // write the address of the aprs server
|
||||||
const int APRSPORT = 14579; // write the aprs server APRSPORT
|
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,T2BRAZIL:=" + LAT + "L" + LON + "&" + iGate_Comment + "\n";
|
||||||
|
//String iGateBeaconPacket = iGate_Callsign + ">APLG01,TCPIP*,qAC,CHILE:=" + LAT + "L" + LON + "&" + iGate_Comment + "\n";
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Loading…
Reference in New Issue