commit
e015d399c4
@ -530,8 +530,8 @@ Send for example `8386` as Downlink on Port 2 to get battery status and time/dat
|
||||
|
||||
0x19 set sleep cycle
|
||||
|
||||
0 ... 255 device sleep cycle in seconds/2
|
||||
e.g. 120 -> device sleeps 240 seconds after each send cycle [default = 0]
|
||||
bytes 1..2 = device sleep cycle in seconds/10 (MSB)
|
||||
e.g. {0x04, 0xB0} -> device sleeps 20 minutes after each send cycle [default = 0]
|
||||
|
||||
0x20 load device configuration
|
||||
|
||||
@ -579,10 +579,13 @@ Send for example `8386` as Downlink on Port 2 to get battery status and time/dat
|
||||
0x01 = timeNeedsSync (last sync failed)
|
||||
0x02 = timeSet (synched)
|
||||
|
||||
0x87 set time/date
|
||||
0x87 sync time/date
|
||||
|
||||
Device synchronizes it's time/date by calling the preconfigured time source.
|
||||
|
||||
0x88 set time/date
|
||||
|
||||
bytes 1..4 = time/date to set in UTC epoch seconds (MSB, e.g. https://www.epochconverter.com/hex)
|
||||
|
||||
# License
|
||||
|
||||
|
@ -74,7 +74,7 @@ typedef struct __attribute__((packed)) {
|
||||
uint8_t countermode; // 0=cyclic unconfirmed, 1=cumulative, 2=cyclic confirmed
|
||||
int16_t rssilimit; // threshold for rssilimiter, negative value!
|
||||
uint8_t sendcycle; // payload send cycle [seconds/2]
|
||||
uint8_t sleepcycle; // sleep cycle [seconds/2]
|
||||
uint16_t sleepcycle; // sleep cycle [seconds/10]
|
||||
uint8_t wifichancycle; // wifi channel switch cycle [seconds/100]
|
||||
uint8_t blescantime; // BLE scan cycle duration [seconds]
|
||||
uint8_t blescan; // 0=disabled, 1=enabled
|
||||
|
@ -25,7 +25,7 @@
|
||||
"t": "set",
|
||||
"p": "payload.schedule",
|
||||
"pt": "msg",
|
||||
"to": "replace",
|
||||
"to": "first",
|
||||
"tot": "str"
|
||||
},
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ static void defaultConfig(configData_t *myconfig) {
|
||||
COUNTERMODE; // 0=cyclic, 1=cumulative, 2=cyclic confirmed
|
||||
myconfig->rssilimit = 0; // threshold for rssilimiter, negative value!
|
||||
myconfig->sendcycle = SENDCYCLE; // payload send cycle [seconds/2]
|
||||
myconfig->sleepcycle = SLEEPCYCLE; // sleep cycle [seconds/2]
|
||||
myconfig->sleepcycle = SLEEPCYCLE; // sleep cycle [seconds/10]
|
||||
myconfig->wifichancycle =
|
||||
WIFI_CHANNEL_SWITCH_INTERVAL; // wifi channel switch cycle [seconds/100]
|
||||
myconfig->blescantime =
|
||||
|
@ -90,9 +90,9 @@ void irqHandler(void *pvParameters) {
|
||||
// goto sleep if we have a sleep cycle
|
||||
if (cfg.sleepcycle)
|
||||
#ifdef HAS_BUTTON
|
||||
enter_deepsleep(cfg.sleepcycle * 2, (gpio_num_t)HAS_BUTTON);
|
||||
enter_deepsleep(cfg.sleepcycle * 10, (gpio_num_t)HAS_BUTTON);
|
||||
#else
|
||||
enter_deepsleep(cfg.sleepcycle * 2);
|
||||
enter_deepsleep(cfg.sleepcycle * 10);
|
||||
#endif
|
||||
}
|
||||
} // for
|
||||
|
@ -14,13 +14,13 @@
|
||||
|
||||
// Payload send cycle and encoding
|
||||
#define SENDCYCLE 30 // payload send cycle [seconds/2], 0 .. 255
|
||||
#define SLEEPCYCLE 0 // sleep time after a send cycle [seconds/2], 0 .. 255; 0 means no sleep [default = 0]
|
||||
#define SLEEPCYCLE 0 // sleep time after a send cycle [seconds/10], 0 .. 65535; 0 means no sleep [default = 0]
|
||||
#define PAYLOAD_ENCODER 2 // payload encoder: 1=Plain, 2=Packed, 3=Cayenne LPP dynamic, 4=Cayenne LPP packed
|
||||
#define COUNTERMODE 0 // 0=cyclic, 1=cumulative, 2=cyclic confirmed
|
||||
|
||||
// MAC sniffing parameters
|
||||
#define MACFILTER 1 // set to 0 if you want to scan all devices, 1 to scan only devices with random MACs (aka smartphones) [default = 1]
|
||||
#define BLECOUNTER 0 // set to 0 if you do not want to install the BLE sniffer
|
||||
#define BLECOUNTER 1 // set to 0 if you do not want to install the BLE sniffer
|
||||
#define WIFICOUNTER 1 // set to 0 if you do not want to install the WIFI sniffer
|
||||
#define MAC_QUEUE_SIZE 50 // size of MAC processing buffer (number of MACs) [default = 50]
|
||||
|
||||
|
1009
src/rcommand.cpp
1009
src/rcommand.cpp
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user