We are implementing a DFU controller in a microcontroller that communicates with the nRF boot-loader over serial. The target device is nRF52832 using SDKv15.3.0. The boot-loader is from the example DFU secure serial boot-loader.
According to the Bluetooth Core Specification 4.0, Vol4 PartD CH3 Slip Layer, the SLIP protocol should have a start and end byte (0xC0) around each SLIP packet. So between SLIP packets there are 2 consecutive 0xCO bytes. This is shown in Fig 3.1 of the standard.
... C0 C0 [ slip packet 1 ] C0 C0 [ slip packet 2] C0 C0 [ slip packet 3] C0 C0 ...
When we send SLIP packets to the bootloader we get problems if there are start and end bytes as per the Bluetooth Standard
TX: C0 00 C0 Get Protocol Version
RX: 60 00 01 01 C0 Response Get Protocol Version
TX: C0 07 C0 Set MTU
RX: 60 00 01 01 Response Get Protocol Version (missing end C0)
TX C0 00 C0 Get Protocol Version
RX 60 07 01 83 C0 C0 Response Set MTU (with 2 end C0 bytes)
However if we send SLIP packets with only an end byte (C0), so there is only one C0 between SLIP packets, it works correctly in that we get the correct response for each request.
TX: 00 C0 Get Protocol Version
RX: 60 00 01 01 C0 Response Get Protocol Version
TX: 07 C0 Set MTU
RX 60 07 01 83 C0 Response Set MTU
TX: 00 C0 Get Protocol Version
RX: 60 00 01 01 C0 Response Get Protocol Version
What is going on here? Does the Nordic SLIP library implement the Bluetooth Specification or not?