BlueSnap
Commands Version 4.81SIO, 1/20/2016 Page 13 of
27
Cedar Park, TX, USA
•
(512) 994-3630
•
www.serialio.com
&
Returns the value of the switches on BlueSnap.
W
Re-enables discovery and connection. This command reloads the stored value of the Inquiry and
Page Window to re-enable. For example, to turn off Discovery but still allow connections, send an
“SI,0000” command, and follow it with a “W” command. This command returns “
Wake
” as a
response.
Z
Enters low power deep sleep mode (<2ma) when NOT connected. Can only be exited by toggling
the RESET pin on the module (causing a HARD reset) , or power cycling the device. To get the
lowest power mode, first issue a Q, then a Z. Use the SNIFF settings to get lowest power while
connected.
Limitations of using 7 Bit data mode
SerialIO.com firmware now supports (from version 4.22 and on) selectable 7 bit data mode, using the “S7,1” command.
Unfortunately the Bluetooth hardware does not support 7 bit data, so this function is accomplished in the firmware application.
While completely functional, the performance in 7 bit mode is less than ideal, because software emulation is required to make
this work. Hence, there is a noticeable latency and character per second processing limit in this mode. Therefore it is not
recommended that this mode be used if the desired serial baudrate is greater than 9600 baud.
COMMANDS to MANIPULATE GPIO
The GPIO command interface uses combination
of 2bytes, a mask, and value, packed into a hex
word for each command. The first byte, the
mask, determines which GPIO are to be
affected, and the second byte is the value to set.
15 --------- 8 7 -------- 0
<hexword> = MASK[7...0] VALUE[7..0]
There are 2 registers used to control the GPIO, the first is a direction register. This controls whether the GPIO is an input or
an output. The second register is the value to apply to the GPIO if set to an output, or is the value of the built-in weak pull-up
resistor if the GPIO is set to an input. These settings are immediate, and do not survive a power cycle.
Examples: S@,8080 sets GPIO-7 to an output
S&,8080 drives GPIO-7 high
S&,8000 drives GPIO-7 low
Power-up values
: These 2 registers will apply the direction and values upon each subsequent power-up:
Examples: S%,0101 sets GPIO-0 to an output on power-up
S^,0303 drives GPIO-0 high, and pulls up GPIO-1.
Multiple bits can be set, any bits with a mask of 0 are left unaffected for the command.
Some GPIO are checked at power-up time to perform certain functions, so care must be taken when manipulating them.
GPIO3, 6, are used to automatically set master mode, and auto discovery. If it is desired to use these GPIO for other purposes
at power-up, a special command must be used to disable their being sensed at power-up time. This command is “SQ,4<cr>”
CMD VALUE
DESCRIPTION
@ <hexword> Set direction bits for GPIO
& <hexword> Set values for GPIO
% <hexword> Store powerup direction bits for GPIO
^ <hexword> Store powerup values for GPIO
*
<hexword> Set values for PIO8,9,10,11