kopia lustrzana https://github.com/PiInTheSky/lora-gateway
V1.8.39 - changes to hab.link protocol
rodzic
570f804dd4
commit
f60a041985
|
@ -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
|
||||
--------------------
|
||||
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
1
global.h
1
global.h
|
@ -139,6 +139,7 @@ struct TConfig
|
|||
char antenna[64];
|
||||
int EnableDev;
|
||||
char UplinkCode[64];
|
||||
char Version[16];
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
|
15
hablink.c
15
hablink.c
|
@ -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
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue