I'm currently working on a program that automates the Legacy DFU procedure and I'm running into some strange issues with writing to the DFU characteristics.
On the nRF Connect Mobile app, it is possible to write to the DFU characteristic "DFU Packet" by manually typing in the bytes to be sent with the option "bytearray" chosen. On the mobile app, I type in the full, valid write value to be sent to the "DFU Packet" characteristic and there is no issue.
However, on my desktop application, when attempting to write the same, valid value to the "DFU Packet" characteristic, I receive an error that states:
"Data length must be less than MTU size minus 3 (header): MTU: 23 bytes. Data being written: 28 bytes"
My question is, why am I receiving this error and how could I go about mitigating it? If the MTU size not changeable, how do I go about sending the data I want over multiple packets?
Here are some more details on my setup:
- Mobile Legacy DFU:
- Central: Android Smartphone running latest version of nRF Connect Mobile
- Peripheral: nRF52 DK running an example firmware that supports Legacy DFU
- Desktop Legacy DFU
- Central: nRF52 DK used as a BLE connector
- Peripheral: (different) nRF52 DK running an example firmware that supports Legacy DFU
Note that the firmware image that I am attempting to send is the same regardless of mobile or desktop. Any help would be greatly appreciated!