Maximum packet size in SPS

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
RatheeshT
Offline
Last seen:1 year 10 months ago
加入:2017-01-02 11:08
Maximum packet size in SPS

嗨,对话框中,

In SPS example, if i send 100 bytes at a time ,it will send all 100 bytes in one attempts or it will send by 5 attempts like by splitting into 20 bytes.( i.e. in the function user_ble_pull ()).

请耐心ase clarify me the packet size for each transmission?

Device:
MT_dialog
Offline
Last seen:1 month 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi RatheeshT,

Hi RatheeshT,

The maximum size of a BLE packet is 27 bytes, but 7 bytes are reserved for the L2CAP and ATT (4 bytes for the L2CAP and 4 for 3 bytes for the ATT) headers, so the actual data payload is limited to 20 bytes with the default MTU of 23 - 3 the ATT header. The DSPS upon connection performs an MTU exchange to 160 for setting the maximum transmition unit, that resuts in a first packet of 20 bytes of actual payload (since the headers for the L2CAP and ATT are included) and the rest of the packets in multiples of 27 bytes of payload (the headers for the L2CAP and ATT are ommited) therefore in a 100 byte transmition the device will send the first packet of 20 bytes two packets of 27 bytes of payload and the last packet of 26 bytes of payload.

Thanks MT_dialog