My Argon do show up on the nRF Connect, but cant seem to see the advertised values even with the example from another thread
From Need help sending BLE UART broadcast
#include "Particle.h"
void setAdvertisingData();
float volt;
float amp;
float watt;
float temp;
uint8_t percent;
void setup() {
setAdvertisingData();
BLE.setAdvertisingInterval(130); // Advertise every 100 milliseconds. Unit is 0.625 millisecond intervals.
}
void loop() {
static uint32_t ms = 0;
if (!digitalRead(BTN)) // use MODE button to reset the dummy data
ms =
percent =
volt =
amp =
watt =
temp = 0;
if (millis() - ms < 1000) return;
ms = millis();
if (percent < 100) percent += 5;
volt += 1.5;
amp += 2.5;
watt = volt * amp;
temp += 0.5;
setAdvertisingData();
}
struct customData {
uint16_t companyID;
char data[25];
};
void setAdvertisingData() {
int retVal = 0;
customData cd;
BleAdvertisingData advData;
cd.companyID = 0xFFFF; // undefined company ID for custom data
memset(&cd.data, 0x00, sizeof(cd.data));
retVal = snprintf(cd.data, sizeof(cd.data)-1, "%.1fV%.1fA%.1fW%.1fF%u", volt, amp, watt, temp, percent);
Serial.printlnf("%s (%d)", cd.data, strlen(cd.data));
if (retVal < 0 || sizeof(cd.data)-1 < retVal) {
strcpy(cd.data, "too long! press MODE");
}
advData.appendCustomData((uint8_t*)&cd, 2 + strlen(cd.data));
BLE.advertise(&advData);
}
Not gonna discount the possibility that the issue lies with iOS nRF Connect. But I do not have an Android device available. Ideally, I should advertise and receive on another Argon that can can serial print out the received payload.