ArduinoGeneral

Bluno advertise data with ble

userHead rait.rand 2020-09-20 15:47:35 1084 Views3 Replies
Hi,
How can I make advertise analog value with bluetooth?
I cannot manage to change advertising data, all the time the same string advertised.
Should I change ble firmware or settings to do that?
I can read all the time data: 0F09426C756E6F000000000000000000051210002000020A000502B0DF1218
No matter what I write to serial.
Code is here:
void setup() {
Serial.begin(115200); //initial the Serial
pinMode(A0, INPUT);
}
void loop() {
int sensorReading = analogRead(A0);
byte buffer[3] = {
0xAD,
(byte)(sensorReading),
(byte)(sensorReading >> 8)
};
Serial.write(buffer, sizeof(buffer));
delay(1000);
}
2020-09-28 16:22:35 I do not have control over BLE receiver and it can read only BLE advertising data.
So how could I make Bluno to advertise values?
userHeadPic rait.rand