Implemented LoRa promiscuous mode

This commit is contained in:
Mark Qvist 2018-06-27 11:42:48 +02:00
parent 4f9cfee7c2
commit d493e5e311
3 changed files with 157 additions and 71 deletions

View file

@ -199,6 +199,17 @@ void kiss_indicate_ready() {
Serial.write(FEND);
}
void kiss_indicate_promisc() {
Serial.write(FEND);
Serial.write(CMD_PROMISC);
if (promisc) {
Serial.write(0x01);
} else {
Serial.write(0x00);
}
Serial.write(FEND);
}
void kiss_indicate_detect() {
Serial.write(FEND);
Serial.write(CMD_DETECT);
@ -278,6 +289,14 @@ uint8_t getRandom() {
}
}
void promisc_enable() {
promisc = true;
}
void promisc_disable() {
promisc = false;
}
bool eeprom_info_locked() {
uint8_t lock_byte = EEPROM.read(eeprom_addr(ADDR_INFO_LOCK));
if (lock_byte == INFO_LOCK_BYTE) {