Explorar el Código

Version 6.1.3 Added India support draft.

platenspeler hace 5 años
padre
commit
ac13b15081
Se han modificado 4 ficheros con 58 adiciones y 5 borrados
  1. 6 1
      ESP-sc-gway/ESP-sc-gway.ino
  2. 8 4
      ESP-sc-gway/_loraFiles.ino
  3. 11 0
      ESP-sc-gway/loraModem.h
  4. 33 0
      TODO.md

+ 6 - 1
ESP-sc-gway/ESP-sc-gway.ino

@@ -429,7 +429,7 @@ void setup() {
 	MAC_char[18] = 0;
 
 	Serial.begin(_BAUDRATE);								// As fast as possible for bus
-	delay(100);	
+	delay(500);	
 
 #if _GPS==1
 	// Pins are define in LoRaModem.h together with other pins
@@ -456,9 +456,14 @@ void setup() {
 	delay(500);
 
 	if (SPIFFS.begin()) {
+#if _DUSB>=1
 		Serial.println(F("SPIFFS init success"));
+#endif
 	}
 	else {
+#if _DUSB>=1
+		Serial.println(F("SPIFFS not found"));
+#endif
 	}
 #endif	
 #if _SPIFF_FORMAT>=1

+ 8 - 4
ESP-sc-gway/_loraFiles.ino

@@ -107,7 +107,7 @@ int readConfig(const char *fn, struct espGwayConfig *c) {
 		String id =f.readStringUntil('=');						// Read keyword until '=', C++ thing
 		String val=f.readStringUntil('\n');						// Read value until End of Line (EOL)
 
-#if _DUSB>=1
+#if _DUSB>=2
 		Serial.print(F("readConfig:: reading line="));
 		Serial.print(id);
 		Serial.print(F("="));
@@ -383,11 +383,14 @@ int addLog(const unsigned char * line, int cnt)
 		Serial.print(gwayConfig.logFileRec);
 
 		Serial.print(F(": "));
-
+#if _DUSB>=2
 		for (i=0; i< 12; i++) {				// The first 12 bytes contain non printable characters
 			Serial.print(line[i],HEX);
 			Serial.print(' ');
 		}
+#else
+		i+=12;
+#endif
 		Serial.print((char *) &line[i]);	// The rest if the buffer contains ascii
 
 		Serial.println();
@@ -500,11 +503,12 @@ int addSeen(struct nodeSeen *listSeen, uint32_t idSeen, uint8_t sfSeen, unsigned
 //	( message[4]<<24 | message[3]<<16 | message[2]<<8 | message[1] )
 	
 #if _DUSB>=1
-	if (( debug>=0 ) && ( pdebug & P_MAIN )) {
+	if (( debug>=1 ) && ( pdebug & P_MAIN )) {
 		Serial.print(F("addSeen:: "));
 //		Serial.print(F(" listSeen[0]="));
 //		Serial.print(listSeen[0].idSeen,HEX);
-		Serial.print(F(", tim="));
+//		Serial.print(F(", "));
+		Serial.print(F("tim="));
 		Serial.print(timSeen);
 		Serial.print(F(", idSeen="));
 		Serial.print(idSeen,HEX);

+ 11 - 0
ESP-sc-gway/loraModem.h

@@ -151,6 +151,14 @@ vector freqs [] = {
 	{ 487700000, 125, 7, 12, 487700000, 125, 7, 12}				// 487.7 - SF7BW125 to SF12BW125
 };
 
+#elif defined(IN865_867)
+vector freqs [] = { 
+	{ 865062500, 125, 7, 12, 865062500, 125,  7, 12},			// And RX1
+	{ 865402500, 125, 7, 12, 865402500, 125,  7, 12},
+	{ 865985000, 125, 7, 12, 865985000, 125,  7, 12},
+	{         0,   0, 0,  0, 866550000, 125, 10, 10}			// RX2
+};
+
 #else
 int freqs [] = {
 	// Print an Error, Not supported
@@ -246,8 +254,11 @@ struct pins {
 #define MOSI 27
 #define RST 14
 #define SS 18
+
+#if _GPS==1
 #define GPS_RX 15
 #define GPS_TX 12
+#endif // _GPS
 
 #elif _PIN_OUT==5
 // ----------------------------------------------------------------------------

+ 33 - 0
TODO.md

@@ -0,0 +1,33 @@
+# Single Channel LoRaWAN Gateway
+
+Version 6.1.2, November 14, 2019	  
+Author: M. Westenberg (mw12554@hotmail.com)  
+Copyright: M. Westenberg (mw12554@hotmail.com)  
+
+All rights reserved. This program and the accompanying materials are made available under the terms 
+of the MIT License which accompanies this distribution, and is available at
+https://opensource.org/licenses/mit-license.php  
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
+without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+Maintained by Maarten Westenberg (mw12554@hotmail.com)
+
+
+
+# ToDo Functions
+
+Features not in release 6.1.2 
+
+- Support FSK
+- Support for eu433 frequencies
+- Better testeing for uplink functions
+- Get HOP functions to work on yhree frequencies
+
+
+
+
+# License
+
+The source files of the gateway sketch in this repository is made available under the MIT
+license. The libraries included in this repository are included for convenience only and 
+all have their own license, and are not part of the ESP 1ch gateway code.