mas pruebas

This commit is contained in:
richonguzman 2023-02-20 08:29:24 -03:00
parent c9187502b3
commit 20b7b03578
2 changed files with 16 additions and 17 deletions

View file

@ -131,7 +131,7 @@ void APRS_connect(){
} else {
Serial.println("Connected with server: " + String(SERVER) + " APRSPORT: " + String(APRSPORT));
aprsauth = "user " + iGate_Callsign + " pass " + passcode_igate + " vers " + "ESP32_TEST" + " " + "0.2" + " filter " + "b/CD*/CA*/CE*/XQ*" + "\n\r"; //info igate
aprsauth = "user " + iGate_Callsign + " pass " + passcode_igate + " vers " + "ESP32_TEST" + " " + "0.2" + " filter " + "r/-33.034/-70.573/200" + "\n\r"; //info igate
espClient.write(aprsauth.c_str());
delay(200);
}
@ -141,12 +141,14 @@ void APRS_connect(){
void APRS_IS_READ(){
String aprsisData;
while (espClient.connected()) {
char c = espClient.read();
if (c == '\n') {
Serial.print(aprsisData);
aprsisData = "";
while (espClient.available() > 0) {
char c = espClient.read();
if (c == '\n') {
Serial.print(aprsisData);
aprsisData = "";
}
aprsisData += c;
}
aprsisData += c;
}
}
@ -155,15 +157,15 @@ void setup() {
Serial.begin(115200);
setup_wifi();
btStop();
setup_lora();
//setup_lora();
Serial.println("Starting iGate\n");
//APRS_connect();
APRS_connect();
}
void loop() {
//APRS_IS_READ();
APRS_IS_READ();
String receivedPacket = "";
/*String receivedPacket = "";
static bool beacon_update = true;
int packetSize = LoRa.parsePacket();
@ -185,5 +187,5 @@ void loop() {
connect_and_upload_to_APRS_IS(iGateBeaconPacket);
lastTxTime = millis();
beacon_update = false;
}
}*/
}

View file

@ -16,12 +16,9 @@ const String LON = "07134.42W"; //por corregir
const String iGate_Comment = "DIY ESP32 - LoRa APRS iGATE https://github.com/richonguzman/LoRa_APRS_iGate";
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
const String SERVER = "radioaficion.pro"; // write the address of the aprs server //const String SERVER = "brazil.aprs2.net";
const int APRSPORT = 14580; // write the aprs server APRSPORT
// 14579 port is allready filtered
String iGateBeaconPacket = iGate_Callsign + ">APLG01,TCPIP*,qAC,T2BRAZIL:=" + LAT + "L" + LON + "&" + iGate_Comment + "\n";