30027906
FIGURE 7. UART NULL Modem Connection
15.2.2 Disabling the UART transport layer
The Host can disable the UART transport layer by sending
the “Disable Transport Layer” Command. The LMX9838 will
empty its buffers, send the confirmation event and disable its
UART interface. Afterwards the UART interface will be re-
configured to wake up on a falling edge of the CTS pin.
15.2.3 LMX9838 enabling the UART interface
As the Transport Layer can be disabled in any situation the
LMX9838 must first make sure the transport layer is enabled
before sending data to the host. Possible scenarios can be
incoming data or incoming link indicators. If the UART is not
enabled the LMX9838 assumes that the Host is sleeping and
waking it up by activating RTS. To be able to react on that
Wake up, the host has to monitor the CTS pin.
As soon as the host activates its RTS pin, the LMX9838 will
first send a confirmation event and then start to transmit the
events.
15.2.4 Enabling the UART transport layer from the host
If the host needs to send data or commands to the LMX9838
while the UART Transport Layer is disabled it must first as-
sume that the LMX9838 is sleeping and wake it up using its
RTS signal. When the LMX9838 detects the Wake-Up signal
it activates the UART HW and acknowledges the Wake-Up
signal by settings its RTS. Additionally the Wake up will be
confirmed by a confirmation event. When the Host has re-
ceived this “Transport Layer Enabled” event, the LMX9838 is
ready to receive commands.
16.0 Command Interface
The LMX9838 offers Bluetooth functionality in either a self
contained slave functionality or over a simple command in-
terface. The interface is listening on the UART interface.
The following sections describe the protocol transported on
the UART interface between the LMX9838 and the host in
command mode (see Figure 8). In Transparent mode, no data
framing is necessary and the device does not listen for com-
mands.
16.1 FRAMING
The connection is considered “Error free”. But for packet
recognition and synchronization, some framing is used.
All packets sent in both directions are constructed per the
model shown in Table 13.
16.1.1 Start and End Delimiter
The “STX” char is used as start delimiter: STX = 0x02. ETX =
0x03 is used as end delimiter.
16.1.2 Packet Type ID
This byte identifies the type of packet. See Table 14 for de-
tails.
16.1.3 Opcode
The opcode identifies the command to execute. The opcode
values can be found within the “LMX9838 Software User’s
Guide” included within the LMX9838 Evaluation Board.
16.1.4 Data Length
Number of bytes in the Packet Data field. The maximum size
is defined with 333 data bytes per packet.
16.1.5 Checksum:
This is a simple Block Check Character (BCC) checksum of
the bytes “Packet type”, “Opcode” and “Data Length”. The
BCC checksum is calculated as low byte of the sum of all
bytes (e.g., if the sum of all bytes is 0x3724, the checksum is
0x24).
30027907
FIGURE 8. Bluetooth Functionality
TABLE 13. Package Framing
Start
Delimiter
Packet
Type ID
Opcode
Data
Length
Check
sum
Packet
Data
End
Delimiter
1 Byte
1 Byte
1 Byte
2 Bytes
1 Byte
<Data Length>
Bytes
1 Byte
- - - - - - - - - - - - - Checksum - - - - - - - - - - - - -
www.national.com
18
LMX9838