Comments (3)
After some testing I can confirm that on pure C code, disabling vlen
doesn't prevent variable length received on the server. So this is not a bug, simply a misunderstanding of what vlen
does. If the client writes 0 bytes, the received packet is 0 on the server.
Variable length only changes the length of the client when he reads or is notified by the server, not when the server receives data.
I don't know what would be the best way to handle this, but padding with zeroes (while considering endianness) could be an option.
from nrf-softdevice.
Attempting to clarify to any other new user of this crate, because this took me a while running into the issue and finding this:
AIU, the softdevice should already filter out attempts to write outside of the bounds established by this crate. Some interpretation difference between the softdevice and this crate causes issues. At least from this crate's point of view, the many unwrap!
calls in gatt_traits.rs are justified, just something about when the size guards should kick in is unclear.
(This doesn't change anything about this being an issue, but the crate authors are not lightly spreading unwraps in paths that are user controlled).
from nrf-softdevice.
I've created a quick fix at #139. Writes with a bad length will be ignored rather than panicking. If more sophisticated handling is needed you can implement the service by hand. Let me know if the PR resolves the issue for you.
from nrf-softdevice.
Related Issues (20)
- Could not execute process probe-run --chip nRF52840_xxAA HOT 3
- Security connection HOT 1
- Allow to open/close a BLE pairing&bonding window HOT 4
- Flash Capacity Definition Discrepancy for nRF52832 and nRF52833 Chips HOT 3
- Custom GATT service with u64 characteristic causes the application to stuck/crash in build-release mode HOT 6
- Bindgen dependency requirement?
- `InvalidState` after re-connecting HOT 8
- S340 SoftDevice support (for ANT) HOT 1
- nRF52805 example HOT 2
- Switch to nrfxlib HOT 1
- Help with compiling - missing crates HOT 10
- Error: The core is in locked up status as a result of an unrecoverable exception HOT 5
- Bonding examples not working. Device does not pair. HOT 1
- How to do fixed pin security?
- How to use channels with ble server & connection? HOT 3
- set_value & notify_value with i16 and other values? HOT 1
- Configure nrf UART with ble HOT 2
- Disable Softdevice for sleep HOT 2
- Examples for BBC micro:bit v2
- Writing 'notify_value' fast causes values to not send HOT 1
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 nrf-softdevice.