Comments (3)
In this library the 2902 is automatic when the characteristic has the notification property. You need to delete those 3 lines.
from nimble-arduino.
Not quite clear to me. How the descriptor will get its content in this "2902-automatic" way?
Here my more complete code that makes difference between Celsius and Fahrenheit, dependent of a compiler directive.
// Create NimBLE Characteristics and Create a NimBLE Descriptor
// Temperature
#ifdef temperatureCelsius
pCharacteristicTEMP = pBmeService->createCharacteristic(TEMP_UUID, NIMBLE_PROPERTY::NOTIFY);
NimBLEDescriptor* pNimBLEDescriptorTEMP = pCharacteristicTEMP->createDescriptor(BLEUUID((uint16_t)0x2902));
pNimBLEDescriptorTEMP->setValue("BME temperature Celsius");
pCharacteristicTEMP->addDescriptor(pNimBLEDescriptorTEMP);
#else
pCharacteristicTEMP = pBmeService->createCharacteristic(TEMP_UUID, NIMBLE_PROPERTY::NOTIFY);
NimBLEDescriptor* pNimBLEDescriptorTEMP = pCharacteristicTEMP->createDescriptor(BLEUUID((uint16_t)0x2902));
pNimBLEDescriptorTEMP->setValue("BME temperature Fahrenheit");
pCharacteristicTEMP->addDescriptor(pNimBLEDescriptorTEMP);
#endif
How I have to implement this in NimBLE making a distinguish between these temperature scales?
Regards,
Jop
from nimble-arduino.
That's is not what the 2902 descriptor is for, it's only for setting the client notification subscription status.
You'll want to use some other method to achieve what you are doing here.
from nimble-arduino.
Related Issues (20)
- Set Manufacturer Data - Bug HOT 1
- Platformio, arduino and esp32 - pinning nimble to core and debug HOT 3
- onAuthenticationComplete() never called HOT 2
- ESP32-S3 crashing with the examples HOT 2
- Device name not showed at first connection HOT 3
- Allow only certain bonded client to connect to NimBLEServer. Whitelist in advertising does not work for already bonded peers HOT 1
- Changing CPU frequency causes crash HOT 4
- Notification 8 byte data size HOT 1
- how to get faster reconnects from deep sleep HOT 3
- ble does not work when cpu set to 40mhz or bellow HOT 2
- notify not updating values in nRF Connect HOT 2
- Is it possible to advertise the device name as a client? HOT 2
- How to achieve long-distance connection communication? HOT 3
- Rapid and Repeated: E NimBLEClient: Connection failed; status=574 Connection Failed to be Established HOT 2
- How to obtain client from existing server connection? HOT 3
- How to get current PHY mode HOT 4
- Name clash of `const char *TAG` with Arduino core macro `TAG`. HOT 5
- ESP32-S3 Extended Advertising: Capturing Packets HOT 1
- Error compile Arduino BLE 5 example for ESP32 HOT 5
- API change - feature test macro missing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nimble-arduino.