jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
397 stars 56 forks source link

PDU buffers are way too large #50

Closed jonas-schievink closed 5 years ago

jonas-schievink commented 5 years ago

MAX_PAYLOAD_SIZE, MAX_PDU_SIZE and MAX_PACKET_SIZE are currently defined under the assumption that we support data packets with up to 255 payload bytes. This is an optional feature which we don't support yet, so using MAX_PDU_SIZE to define the radio buffer size just wastes way too much RAM.

We should probably remove constants we don't need, and define more useful values like MIN_PAYLOAD_BUF for the minimum buffer length a hardware interface has to provide to Rubble.