diff --git a/Bluetooth.h b/Bluetooth.h index 660713e..a4913d0 100644 --- a/Bluetooth.h +++ b/Bluetooth.h @@ -476,7 +476,7 @@ char bt_devname[11]; Bluefruit.Security.setSecuredCallback(bt_connect_callback); Bluefruit.Periph.setDisconnectCallback(bt_disconnect_callback); Bluefruit.Security.setPairCompleteCallback(bt_pairing_complete); - //Bluefruit.Periph.setConnInterval(6, 12); // 7.5 - 15 ms + Bluefruit.Periph.setConnInterval(6, 12); // 7.5 - 15 ms const ble_gap_addr_t gap_addr = Bluefruit.getAddr(); char *data = (char*)malloc(BT_DEV_ADDR_LEN+1); diff --git a/RNode_Firmware.ino b/RNode_Firmware.ino index a10dbb8..05d9807 100644 --- a/RNode_Firmware.ino +++ b/RNode_Firmware.ino @@ -609,8 +609,14 @@ void transmit(uint16_t size) { written++; - if (written == 255) { - LoRa->endPacket(); add_airtime(written); + if (written == 255 && header & 0x0F) { + if (!LoRa->endPacket()) { + kiss_indicate_error(ERROR_MODEM_TIMEOUT); + kiss_indicate_error(ERROR_TXFAILED); + led_indicate_error(5); + hard_reset(); + } + add_airtime(written); LoRa->beginPacket(); LoRa->write(header); written = 1;