I just tested the universal_beta_sensor and universal_gateway in the dev branch.
I found out that the way the band and sf are choosen is not implemented correctly.
As for the sensor:
First of all the includes are not in the correct order:
Actually it is:
as in "fdrs_sensors.h the existance of GLOBALS is checked which is done within sensors_setup.h.
At this point only FDRS_BAND and FDRS_FS should be used.
In the constructor of the Universal_Sensor_beta the defines BAND and FS are used, where FDRS_BAND and FDRS_FS should be used.
So the constructor is:
FDRSLoRa FDRS(GTWY_MAC,READING_ID,MISO,MOSI,SCK,SS,RST,DIO0,BAND,SF);
but should be:
FDRSLoRa FDRS(GTWY_MAC,READING_ID,MISO,MOSI,SCK,SS,RST,DIO0,FDRS_BAND,FDRS_SF);
This way you can either correctly choose the band and sf within the universal_sensor.ino via
#define BAND 866E6
#define SF 7
or within the fdrs_globals.h via
#define GLOBAL_BAND 866E6 //LoRa Frequency Band
#define GLOBAL_SF 7 //LoRa Spreading Factor
I try to check this in as a pull request but I'm still struggling with git/github a little bit. :) So just to be sure, someone else can fix this just in case.
I just tested the universal_beta_sensor and universal_gateway in the dev branch. I found out that the way the band and sf are choosen is not implemented correctly.
As for the sensor: First of all the includes are not in the correct order: Actually it is:
It must be:
as in "fdrs_sensors.h the existance of GLOBALS is checked which is done within sensors_setup.h.
At this point only FDRS_BAND and FDRS_FS should be used. In the constructor of the Universal_Sensor_beta the defines BAND and FS are used, where FDRS_BAND and FDRS_FS should be used. So the constructor is:
FDRSLoRa FDRS(GTWY_MAC,READING_ID,MISO,MOSI,SCK,SS,RST,DIO0,BAND,SF);
but should be:FDRSLoRa FDRS(GTWY_MAC,READING_ID,MISO,MOSI,SCK,SS,RST,DIO0,FDRS_BAND,FDRS_SF);
This way you can either correctly choose the band and sf within the universal_sensor.ino via
or within the fdrs_globals.h via
I try to check this in as a pull request but I'm still struggling with git/github a little bit. :) So just to be sure, someone else can fix this just in case.
Best Sascha