Silicon Labs
Page 19 of 296
Requirements for state transition
Command Mode
(no Bluetooth connections)
In this mode, ASCII commands
can be given to iWRAP.
A connection is successfully created by
using the CALL command and
CONNECT event indicating that a
successful connection is received.
A remote device opens a Bluetooth
connection to iWRAP. A RING event
indicating that a connection is received.
If iWRAP events are disabled the carrier
detect (CD) pin can also be used to
indicate data or command mode.
Data Mode
In this mode, all data is sent
transparently from UART
interface to Bluetooth connection.
The user switches mode by sending an
escape sequence to iWRAP firmware or
by toggling the DTR pin.
A link is terminated (closed by the remote
device or by link loss) and NO
CARRIER event is received.
Command Mode
(active connection)
In this mode, ASCII commands
can be given to iWRAP.
User switches the mode either by sending
an escape sequence to iWRAP firmware
or by using the SELECT command.
Table 1: iWRAP mode transitions explained
4.1 The escape sequence
The escape sequence causes the iWRAP firmware to toggle between command mode and data mode. The
escape sequence consists of three (3) escape characters that are defined by the SET CONTROL ESCAPE
command. By default, the escape character is ‘+’.
Do not enter any character before and/or after the escape sequence for a guard time, which is 1 second.
Furthermore, send the escape characters individually, not as a string.
With default settings, the escape sequence is:
< 1 second sleep> +++ < 1 second sleep>
When a successful state transition from data mode to command mode is made, iWRAP sends a “READY.”
event to indicate that it is ready to receive commands.
The same escape sequence or the SELECT command can be used to return to data mode.