diff --git a/gateway-mode0.txt b/gateway-mode0.txt new file mode 100644 index 0000000..e7f6129 --- /dev/null +++ b/gateway-mode0.txt @@ -0,0 +1,40 @@ +tracker=MORJX-LGW +EnableHabitat=Y +EnableSSDV=Y +JPGFolder=ssdv +LogTelemetry=Y +LogPackets=Y +CallingTimeout=60 +ServerPort=6004 +Latitude=53.61722 +Longitude=-1.7 +Antenna=Watson 2000 +#SMSFolder=./ +EnableDev=N + +NetworkLED=21 +InternetLED=22 +ActivityLED_0=23 +ActivityLED_1=24 + +#frequency_0=869.250 +#mode_0=1 +#bandwidth_0=125K +#implicit_0=0 +#coding_0=5 +#sf_0=8 +#lowopt_0=0 +#power_0=255 +#DIO0_0=31 +#DIO5_0=26 +#AFC_0=Y +#UplinkTime_0=2 +#UplinkCycle_0=60 + +frequency_1=434.250 +mode_1=0 +#DIO0_1=6 +#DIO5_1=5 +AFC_1=Y +#UplinkTime_1=5 +#UplinkCycle_1=60 diff --git a/gateway.c b/gateway.c index 5c4ae97..a8a1442 100644 --- a/gateway.c +++ b/gateway.c @@ -532,7 +532,7 @@ void UploadListenerTelemetry(char *callsign, float gps_lat, float gps_lon, char char JsonData[200]; /* In windows, this will init the winsock stuff */ - curl_global_init(CURL_GLOBAL_ALL); + // curl_global_init(CURL_GLOBAL_ALL); // RJH moved to main in gateway.c not thread safe /* get a curl handle */ curl = curl_easy_init(); @@ -566,10 +566,10 @@ void UploadListenerTelemetry(char *callsign, float gps_lat, float gps_lon, char curl_easy_cleanup(curl); } - curl_global_cleanup(); + // curl_global_cleanup(); // RJH moved to main in gateway.c not thread safe /* In windows, this will init the winsock stuff */ - curl_global_init(CURL_GLOBAL_ALL); + // curl_global_init(CURL_GLOBAL_ALL); // RJH moved to main in gateway.c not thread safe /* get a curl handle */ curl = curl_easy_init(); @@ -599,7 +599,7 @@ void UploadListenerTelemetry(char *callsign, float gps_lat, float gps_lon, char curl_easy_cleanup(curl); } - curl_global_cleanup(); + // curl_global_cleanup(); // RJH moved to main in gateway.c not thread safe } } @@ -1873,6 +1873,8 @@ int main(int argc, char **argv) exit(1); } + curl_global_init(CURL_GLOBAL_ALL); // RJH thread safe + mainwin = InitDisplay(); // Settings for character input @@ -2042,6 +2044,7 @@ int main(int argc, char **argv) } CloseDisplay(mainwin); + curl_global_cleanup(); // RJH thread safe if (Config.NetworkLED >= 0) digitalWrite(Config.NetworkLED, 0); if (Config.InternetLED >= 0) digitalWrite(Config.InternetLED, 0); diff --git a/gateway.custom b/gateway.custom new file mode 100644 index 0000000..8ced6e9 --- /dev/null +++ b/gateway.custom @@ -0,0 +1,46 @@ +tracker=M0RJX-LGW +EnableHabitat=Y +EnableSSDV=Y +JPGFolder=ssdv +LogTelemetry=Y +LogPackets=Y +CallingTimeout=60 +ServerPort=6004 +Latitude=53.61722 +Longitude=-1.7 +Antenna=Watson 2000 +#SMSFolder=./ +EnableDev=N + +NetworkLED=21 +InternetLED=22 +ActivityLED_0=23 +ActivityLED_1=24 + +frequency_0=869.250 +mode_0=1 +#bandwidth_0=125K +#implicit_0=0 +#coding_0=5 +#sf_0=8 +#lowopt_0=0 +#power_0=255 +#DIO0_0=31 +#DIO5_0=26 +AFC_0=Y +#UplinkTime_0=2 +#UplinkCycle_0=60 + +frequency_1=434.300 +#mode_1=1 +#DIO0_1=6 +#DIO5_1=5 +AFC_1=Y +bandwidth_1=20K8 +SF_1=8 +Coding_1=5 +Implicit_1=N +lowopt_1=N + +#UplinkTime_1=5 +#UplinkCycle_1=60 diff --git a/gateway.txt b/gateway.txt index c673b36..8fdd0d3 100644 --- a/gateway.txt +++ b/gateway.txt @@ -1,46 +1,46 @@ -tracker=M0RPI/5 -EnableHabitat=Y -EnableSSDV=Y -JPGFolder=ssdv -LogTelemetry=Y -LogPackets=Y -CallingTimeout=60 -ServerPort=6004 -Latitude=51.95023 -Longitude=-2.5445 -Antenna=868MHz Yagi -#SMSFolder=./ -EnableDev=Y +tracker=M0RJX-LGW +EnableHabitat=Y +EnableSSDV=Y +JPGFolder=ssdv +LogTelemetry=Y +LogPackets=Y +CallingTimeout=60 +ServerPort=6004 +Latitude=53.61722 +Longitude=-1.7 +Antenna=Watson 2000 +#SMSFolder=./ +EnableDev=N + +NetworkLED=21 +InternetLED=22 +ActivityLED_0=23 +ActivityLED_1=24 + +frequency_0=869.250 +mode_0=1 +#bandwidth_0=125K +#implicit_0=0 +#coding_0=5 +#sf_0=8 +#lowopt_0=0 +#power_0=255 +#DIO0_0=31 +#DIO5_0=26 +AFC_0=Y +#UplinkTime_0=2 +#UplinkCycle_0=60 + +frequency_1=434.450 +mode_1=2 +#DIO0_1=6 +#DIO5_1=5 +AFC_1=Y +#bandwidth_1=20K8 +#SF_1=8 +#Coding_1=5 +#Implicit_1=N +#lowopt_1=N -#NetworkLED=21 -#InternetLED=22 -#ActivityLED_0=23 -#ActivityLED_1=24 - -frequency_0=869.860 -mode_0=3 -#implicit_0=1 -#coding_0=5 -#sf_0=6 - -#frequency_0=869.500 -#mode_0= -#bandwidth_0=125K -#implicit_0=0 -#coding_0=5 -#sf_0=8 -#lowopt_0=0 -#power_0=255 -DIO0_0=31 -DIO5_0=26 -AFC_0=N -UplinkTime_0=2 -UplinkCycle_0=60 - -frequency_1=434.455 -mode_1=2 -DIO0_1=6 -DIO5_1=5 -#AFC_1=Y -#UplinkTime_1=5 +#UplinkTime_1=5 #UplinkCycle_1=60 diff --git a/habitat.c b/habitat.c index d91f4ac..a0bc84a 100644 --- a/habitat.c +++ b/habitat.c @@ -50,7 +50,7 @@ void UploadTelemetryPacket(int Channel) CURLcode res; /* In windows, this will init the winsock stuff */ - curl_global_init(CURL_GLOBAL_ALL); + // curl_global_init(CURL_GLOBAL_ALL); // RJH moved to main in gateway.c not thread safe /* get a curl handle */ curl = curl_easy_init(); @@ -139,7 +139,7 @@ void UploadTelemetryPacket(int Channel) // free(base64_data); } - curl_global_cleanup(); + // curl_global_cleanup(); // RJH moved to main in gateway.c not thread safe } diff --git a/ssdv.c b/ssdv.c index 29cc03e..1aac931 100644 --- a/ssdv.c +++ b/ssdv.c @@ -55,7 +55,7 @@ int UploadImagePackets(void) UploadedOK = 0; /* In windows, this will init the winsock stuff */ - curl_global_init(CURL_GLOBAL_ALL); + // curl_global_init(CURL_GLOBAL_ALL); // RJH moved to main in gateway.c not thread safe /* get a curl handle */ curl = curl_easy_init(); @@ -118,7 +118,7 @@ int UploadImagePackets(void) curl_easy_cleanup(curl); } - curl_global_cleanup(); + // curl_global_cleanup(); // RJH moved to main in gateway.c not thread safe return UploadedOK; } diff --git a/telemetry.tgz b/telemetry.tgz new file mode 100644 index 0000000..0b694aa Binary files /dev/null and b/telemetry.tgz differ