How to Use SLIP Format (SLIP Only)
For connection types that do not include error detection and correction, such as serial protocols, SLIP provides a means for the host and device to re-synchronize in the case of connection errors by watching for specifically reserved frame delimiters marking the start and end of a message. The MMS SLIP wrapper is defined in Table 9.
All messages start with SLIP’s frame delimiter C0, and must consider SLIP escape sequences that deal with occurrences of C0 inside the SLIP data frame:
If an outbound message contains the byte value C0, software should encode it into SLIP as DB DC.
If an inbound message contains the byte sequence DB DC, software should decode it to C0.
If an outbound message contains the byte value DB, software should encode it into SLIP as DB DD.
If an inbound message contains the byte sequence DB DD, software should decode it to DB.
Message Info indicates the direction of the message (such as Direction Host to Device for Commands, Direction Device to Host for Notifications). If the host has sent the device a command that exceeds the device’s incoming message buffer capacity, the device responds with a brief message indicating Hardware Capability Exceeded, and populates Length of MMS Message with the maximum possible message length the device can process, followed by a zero length MMS Message and the closing SLIP Frame Delimiter.
Table - MMS SLIP Wrapper
Byte 0
SLIP Frame Delimiter = 0xC0
Byte 1
Message Info 0x00 = Direction Host to Device 0x02 = Direction Device to Host 0x03 = Hardware Capability Exceeded
Bytes 2..5
Length of MMS Message Use big endian order
Bytes 6..n
MMS Message
Byte n+1
SLIP Frame Delimiter = 0xC0
For further reference, see the definition of the SLIP format in Part D, Section 3 of Specification of the Bluetooth® System, Host Controller Interface, Volume 4, which is available at https://www.bluetooth.org/Technical/Specifications/adopted.htm. Note the reference to bluetooth.org is intentional, and the specification does indeed apply to other device connection types.
Last updated

