V1.8.39 - changes to hab.link protocol

pull/67/head
Dave Akerman 2020-11-25 15:19:17 +00:00
rodzic 570f804dd4
commit f60a041985
4 zmienionych plików z 23 dodań i 2 usunięć

Wyświetl plik

@ -250,6 +250,12 @@ Many thanks to David Brooke for coding this feature and the AFC.
Change History
==============
25/11/2020 - V1.8.39
--------------------
Send callsign, listener type (LoRa Gateway) and version to hab.link server
Don't include callsign with telemetry messages to hab.link server
06/05/2020 - V1.8.38
--------------------

Wyświetl plik

@ -46,7 +46,7 @@
#include "udpclient.h"
#include "lifo_buffer.h"
#define VERSION "V1.8.38"
#define VERSION "V1.8.39"
bool run = TRUE;
// RFM98
@ -2599,6 +2599,7 @@ int main( int argc, char **argv )
// Clear config to zeroes so we only have to set non-zero defaults
memset((void *)&Config, 0, sizeof(Config));
strcpy(Config.Version, VERSION);
if ( prog_count( "gateway" ) > 1 )
{

Wyświetl plik

@ -139,6 +139,7 @@ struct TConfig
char antenna[64];
int EnableDev;
char UplinkCode[64];
char Version[16];
};
typedef struct {

Wyświetl plik

@ -25,7 +25,18 @@ void UploadSentence(int sockfd, char *Sentence)
char Message[300];
// Create message to upload
sprintf(Message, "POSITION:CALLSIGN=%s,SENTENCE=%s\n", Config.Tracker, Sentence);
// sprintf(Message, "POSITION:CALLSIGN=%s,SENTENCE=%s\n", Config.Tracker, Sentence);
sprintf(Message, "POSITION:SENTENCE=%s\n", Sentence);
write(sockfd, Message, strlen(Message));
}
void UploadListener(int sockfd)
{
char Message[100];
// Create message to upload
sprintf(Message, "LISTENER:TYPE=LoRa Gateway,VERSION=%s,CALLSIGN=%s\n", Config.Version, Config.Tracker);
write(sockfd, Message, strlen(Message));
}
@ -92,6 +103,8 @@ void *HablinkLoop( void *vars )
if (sockfd >= 0)
{
LogMessage("Connected to hab.link\n");
UploadListener(sockfd);
}
else
{