Comments (5)
Hi, thanks for testing it out 😃 .
Long reads and writes will be implemented shortly, I have the test code in place currently in the bugfix branch, although commented out for now. It needs more work as NimBLE doesn't really provide a great way to detect when a long write or write is in progress so I need to stumble through the source code a bit more. With luck it won't be too much longer.
from nimble-arduino.
I dont know NimBLE, but here is how long read is solved in old library (its in bluetooth specs):
https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/BLECharacteristic.cpp#L373
IIRC long write is handled by WRITE_EVT and param->write.is_prep
, and finally by EXEC_WRITE_EVT (im not sure about last event).
PS i am wondering if its required to write long read/write code or its maybe handled internally by NimBLE
from nimble-arduino.
@chegewara Thanks for the link, sadly it doesn't seem NimBLE provides any sort of indication flag for long read/write.
The best I can do it seems is compare the data size with the mtu the check the packet header length that may give an indication if this is an initial read or followup. I think it does handle the offset internally though so hopefully that won't need to be managed.
from nimble-arduino.
I figured out I could fix my case by negotiating a higher mtu from the client side.
I'm not sure if that should be the standard way to do it or if the package should somehow combine it.
from nimble-arduino.
Long reads and writes are sub-optimal, they consume a lot of time. It's much better to use the biggest MTU size you can handle.
That said, I have sorted out the long read/write situation in the server code and just now pushed the update to the bugfix branch if you want to check it out.
from nimble-arduino.
Related Issues (20)
- 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 4
- Error compile Arduino BLE 5 example for ESP32 HOT 5
- API change - feature test macro missing HOT 2
- Error in converting EddystoneTLM negative temperatures to float HOT 4
- ESP32-S3 crash with arduino-esp32 core 3.x.x HOT 28
- The future of this repo... new ESP MCU's cannot be supported. HOT 3
- NimBLE-Arduino crashes with esp32 version 3.0.1. and a LilyGo T-display S3 HOT 4
- NimBLE-Arduino debug exception when trying to initialize BLE functions HOT 3
- Crash with 'Arduino Nano ESP32' on core ESP32 3.0.1 with NimbleV1.4.2 HOT 2
- BLE SERVICE and WiFi.scanNetworks not wokring simulteneously HOT 3
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.