BLE notify

User avatar
666hjk
Posts: 47
Joined: Wed Jan 12, 2022 3:09 am
Location: 小红点

BLE notify

Postby 666hjk » Thu Apr 07, 2022 1:05 pm

Hi All,

https://raw.githubusercontent.com/RuiSa ... Client.ino

//Activate notify
const uint8_t notificationOn[] = {0x1, 0x0};
const uint8_t notificationOff[] = {0x0, 0x0};

1) i went thru the BLE client code above , is the arrangement of 0x1 , 0x0 by LSB format?

2) since is 8-bit, can we do this instead or am i missing something?
const uint8_t notificationOn = 0x01;
const uint8_t notificationOff = 0x00;

pls advise.
Thanks.
学习中找战友。

chegewara
Posts: 2258
Joined: Wed Jun 14, 2017 9:00 pm

Re: BLE notify

Postby chegewara » Thu Apr 07, 2022 5:48 pm

BLE does not care what you are sending, from protocol point of view its just a bunch of bytes.

1. its just 2 bytes without a meaning, for example you can ON with 0 and OFF with 1
2. yes

User avatar
666hjk
Posts: 47
Joined: Wed Jan 12, 2022 3:09 am
Location: 小红点

Re: BLE notify

Postby 666hjk » Wed Jul 20, 2022 10:56 am

noted.
学习中找战友。

Who is online

Users browsing this forum: Google [Bot], jgustavoam and 39 guests