diff --git a/data_embed/index.html b/data_embed/index.html
index 93c139e..10d49ac 100644
--- a/data_embed/index.html
+++ b/data_embed/index.html
@@ -530,8 +530,8 @@
diff --git a/src/ble_utils.cpp b/src/ble_utils.cpp
index ca18afc..c0f81ac 100644
--- a/src/ble_utils.cpp
+++ b/src/ble_utils.cpp
@@ -22,6 +22,7 @@ BLECharacteristic *pCharacteristicTx;
BLECharacteristic *pCharacteristicRx;
extern Configuration Config;
+extern Beacon *currentBeacon;
extern logging::Logger logger;
extern bool sendBleToLoRa;
extern bool bluetoothConnected;
@@ -69,10 +70,9 @@ namespace BLE_Utils {
}
void setup() {
- uint8_t dmac[6];
- esp_efuse_mac_get_default(dmac);
- std::string BLEid = "LoRa Tracker " + std::to_string(dmac[4]) + std::to_string(dmac[5]);
- BLEDevice::init(BLEid);
+ String id = currentBeacon->callsign;
+ String BLEid = id.substring(0, id.indexOf("-")) + "-BLE";
+ BLEDevice::init(BLEid.c_str());
pServer = BLEDevice::createServer();
pServer->setCallbacks(new MyServerCallbacks());
diff --git a/src/bluetooth_utils.cpp b/src/bluetooth_utils.cpp
index a13f032..cf8de08 100644
--- a/src/bluetooth_utils.cpp
+++ b/src/bluetooth_utils.cpp
@@ -9,6 +9,7 @@
extern Configuration Config;
+extern Beacon *currentBeacon;
extern BluetoothSerial SerialBT;
extern logging::Logger logger;
extern TinyGPSPlus gps;
@@ -35,12 +36,10 @@ namespace BLUETOOTH_Utils {
SerialBT.register_callback(BLUETOOTH_Utils::bluetoothCallback);
SerialBT.onData(BLUETOOTH_Utils::getData); // callback instead of while to avoid RX buffer limit when NMEA data received
- uint8_t dmac[6];
- esp_efuse_mac_get_default(dmac);
- char ourId[5];
- snprintf(ourId, sizeof(ourId), "%02x%02x", dmac[4], dmac[5]);
+ String id = currentBeacon->callsign;
+ String BTid = id.substring(0, id.indexOf("-")) + "-BT";
- if (!SerialBT.begin(String("LoRa Tracker " + String(ourId)))) {
+ if (!SerialBT.begin(String(BTid))) {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "Bluetooth", "Starting Bluetooth failed!");
displayShow("ERROR", "Starting Bluetooth failed!", "");
while(true) {
diff --git a/src/bme_utils.cpp b/src/bme_utils.cpp
index 7a8b647..4216594 100644
--- a/src/bme_utils.cpp
+++ b/src/bme_utils.cpp
@@ -16,6 +16,7 @@ float newHum, newTemp, newPress, newGas;
uint32_t bmeLastReading = -60000;
int wxModuleType = 0;
uint8_t wxModuleAddress = 0x00;
+bool wxModuleFound = false;
Adafruit_BME280 bme280;
@@ -54,7 +55,6 @@ namespace BME_Utils {
if (Config.bme.active) {
getWxModuleAddres();
if (wxModuleAddress != 0x00) {
- bool wxModuleFound = false;
#ifdef HELTEC_V3_GPS
if (bme280.begin(wxModuleAddress, &Wire1)) {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "BME", " BME280 sensor found");
@@ -245,7 +245,7 @@ namespace BME_Utils {
if (type == 1) {
wx = " - C - % - hPa";
} else {
- wx = ".../...g...t...r...p...P...h..b.....";
+ wx = ".../...g...t...";
}
return wx;
} else {
@@ -275,7 +275,7 @@ namespace BME_Utils {
} else {
wx = ".../...g...t";
wx += tempStr;
- wx += "r...p...P...h";
+ wx += "h";
wx += humStr;
wx += "b";
wx += presStr;
diff --git a/src/station_utils.cpp b/src/station_utils.cpp
index fb94810..ee40855 100644
--- a/src/station_utils.cpp
+++ b/src/station_utils.cpp
@@ -36,6 +36,7 @@ extern bool smartBeaconActive;
extern bool winlinkCommentState;
extern int wxModuleType;
+extern bool wxModuleFound;
extern bool gpsIsActive;
extern bool gpsShouldSleep;
@@ -210,12 +211,12 @@ namespace STATION_Utils {
}
String packet;
- if (Config.bme.sendTelemetry && type == 1) { // WX
+ if (Config.bme.sendTelemetry && wxModuleFound && type == 1) { // WX
packet = APRSPacketLib::generateGPSBeaconPacket(currentBeacon->callsign, "APLRT1", Config.path, "/", APRSPacketLib::encodeGPS(gps.location.lat(),gps.location.lng(), gps.course.deg(), 0.0, currentBeacon->symbol, Config.sendAltitude, gps.altitude.feet(), sendStandingUpdate, "Wx"));
if (wxModuleType != 0) {
packet += BME_Utils::readDataSensor(0);
} else {
- packet += ".../...g...t...r...p...P...h..b.....";
+ packet += ".../...g...t...";
}
} else {
String path = Config.path;