Commit c8b4a07fafeaad34b28b22424b01f4c1d4b7576f

Authored by jdenecha
1 parent a2992178

first commit

Showing 4 changed files with 5 additions and 4 deletions   Show diff stats
base64.o 0 โ†’ 100644
No preview for this file type
@@ -40,7 +40,7 @@ byte currentMode = 0x81; @@ -40,7 +40,7 @@ byte currentMode = 0x81;
40 char message[256]; 40 char message[256];
41 char b64[256]; 41 char b64[256];
42 42
43 -bool sx1272 = true; 43 +bool sx1272 = false;
44 44
45 byte receivedbytes; 45 byte receivedbytes;
46 46
@@ -85,8 +85,8 @@ static char description[64] = ""; /* used for free form d @@ -85,8 +85,8 @@ static char description[64] = ""; /* used for free form d
85 85
86 // define servers 86 // define servers
87 // TODO: use host names and dns 87 // TODO: use host names and dns
88 -#define SERVER1 "54.72.145.119" // The Things Network: croft.thethings.girovito.nl  
89 -//#define SERVER2 "192.168.1.10" // local 88 +#define SERVER1 "127.0.0.1" // The Things Network: croft.thethings.girovito.nl
  89 +#define SERVER2 "192.168.42.106" // local
90 #define PORT 1700 // The port on which to send data 90 #define PORT 1700 // The port on which to send data
91 91
92 // ############################################# 92 // #############################################
@@ -265,7 +265,7 @@ void SetupLoRa() @@ -265,7 +265,7 @@ void SetupLoRa()
265 sx1272 = false; 265 sx1272 = false;
266 } else { 266 } else {
267 printf("Unrecognized transceiver.\n"); 267 printf("Unrecognized transceiver.\n");
268 - //printf("Version: 0x%x\n",version); 268 + printf("Version: 0x%x\n",version);
269 exit(1); 269 exit(1);
270 } 270 }
271 } 271 }
@@ -505,6 +505,7 @@ void receivepacket() { @@ -505,6 +505,7 @@ void receivepacket() {
505 memcpy((void *)(buff_up + buff_index), (void *)",\"data\":\"", 9); 505 memcpy((void *)(buff_up + buff_index), (void *)",\"data\":\"", 9);
506 buff_index += 9; 506 buff_index += 9;
507 j = bin_to_b64((uint8_t *)message, receivedbytes, (char *)(buff_up + buff_index), 341); 507 j = bin_to_b64((uint8_t *)message, receivedbytes, (char *)(buff_up + buff_index), 341);
  508 + //j = snprintf((char *)(buff_up + buff_index), 341, "%02d ",(uint8_t *)message);
508 buff_index += j; 509 buff_index += j;
509 buff_up[buff_index] = '"'; 510 buff_up[buff_index] = '"';
510 ++buff_index; 511 ++buff_index;
main.o 0 โ†’ 100644
No preview for this file type
single_chan_pkt_fwd 0 โ†’ 100755
No preview for this file type