To kinda answer my own question yet again, this post: viewtopic.php?f=2&t=9690 tells us that the descriptor READ flag is 1 and not 2 like it is for characteristics.
This really needs to be updated in the documentation and the ubluetooth.py file.
Search found 5 matches
- Thu Nov 18, 2021 4:18 pm
- Forum: Programs, Libraries and Tools
- Topic: BLE Descriptors on an ESP32
- Replies: 1
- Views: 1481
- Thu Nov 18, 2021 4:17 pm
- Forum: General Discussion and Questions
- Topic: BLE characteristic_user_description (0x2901)
- Replies: 6
- Views: 4857
Re: BLE characteristic_user_description (0x2901)
I have, like @mirronelli, been bashing my head against a wall trying to get this to work. It really does need highlighting in the documentation.
- Thu Nov 18, 2021 2:48 pm
- Forum: Programs, Libraries and Tools
- Topic: BLE Descriptors on an ESP32
- Replies: 1
- Views: 1481
BLE Descriptors on an ESP32
I'm trying to add a Characteristic Presentation Format descriptor to a characteristic. My code looks like this: _GNSS_BASE_UUID = ubluetooth.UUID("c33a0000-bda8-4293-b836-10dd6d78e7a1") _GNSS_BASE_LATITUDE = ( ubluetooth.UUID(0x2AAE), _FLAG_READ | _FLAG_NOTIFY, ((ubluetooth.UUID(0x2904), _FLAG_READ)...
- Thu Nov 18, 2021 1:10 pm
- Forum: ESP32 boards
- Topic: BLE _IRQ_GATTS_READ_REQUEST
- Replies: 1
- Views: 825
Re: BLE _IRQ_GATTS_READ_REQUEST
Answering my own question - it was a misunderstanding on my part. I assumed reads weren't implemented on the ESP32, but it's just the interrupt that's not called on a read. So you *must* set a value using gatts_write and you can't do anything fancy when a central performs the read.
- Tue Nov 16, 2021 11:05 pm
- Forum: ESP32 boards
- Topic: BLE _IRQ_GATTS_READ_REQUEST
- Replies: 1
- Views: 825
BLE _IRQ_GATTS_READ_REQUEST
The docs say that _IRQ_GATTS_READ_REQUEST is only supported on the STM32. Is there a reason this hasn't been implemented on the ESP32? My use case is that I want to receive the values for some characteristics after the central has connected, regardless whether they have changed on the peripheral. Th...