Advanced User Manual
www.rovingnetworks.com
rn-bluetooth-um Version 4.77 2/3/2011
Roving Networks Bluetooth™ Product User Manual
This manual contains the programming guide and command set for the complete family of Roving Networks Bluetooth
products. All Roving Networks modules, super modules, serial adapters and USB dongle (RN-USB-X) share the same
command set. Any commands specific to a given product will be highlighted as they appear in this document. For basic
usage information and a summary of common commands refer to the Install Guide for a given product.
Version 4.77
August 27, 2009
Roving Networks reserves the right to make corrections, modifications, and changes to its products, documentation and services
at any time, without notice. Customers should obtain the latest relevant information before placing orders and should verify that
such information is current and complete. Customers are responsible for their products and applications using Roving Networks
components. To minimize the risks, customers should provide adequate design and operating safeguards. Roving Networks
products are not authorized for use in safety-critical applications (such as life support) where a failure of the Roving Networks
product would reasonably be expected to cause severe personal injury or death.
Roving Networks and FireFlyAll are trademarks of Roving Networks, all other trademarks are property of their respective
owners.
Copyright © 2009 Roving Networks.
All rights reserved.
809 University Avenue
•
Los Gatos, CA 95032
•
Tel (408) 395-6539
• info@RovingNetworks.com
~
1
~
Advanced User Manual
www.rovingnetworks.com
rn-bluetooth-um Version 4.77 2/3/2011
1
Introduction ...............................................................................................................................................3
1.1
Making a Connection ........................................................................................................................3
2
Modes of Operation ...................................................................................................................................4
3
Configuration ....................................................................................................................................4
3.1
Command Mode vs. Data mode .......................................................................................................5
3.2
Local Configuration (via serial port) ................................................................................................5
3.3
Remote Configuration (via Bluetooth) .............................................................................................5
3.4
Using DIP switches and PIO for Configuration ...............................................................................6
4
Command Reference .................................................................................................................................8
1.2
SET Commands ................................................................................................................................8
4.1
GET Commands .............................................................................................................................12
4.2
CHANGE Commands.....................................................................................................................12
4.3
ACTION Commands ......................................................................................................................13
4.4
GPIO Commands ............................................................................................................................15
5
Power Management .................................................................................................................................16
5.1
Optimizing Inquiry (Discovery) and Page (Connection) Windows ...............................................16
5.2
SNIFF mode ....................................................................................................................................17
5.3
Enabling Deep Sleep .......................................................................................................................17
5.4
Disabling Output Drivers ................................................................................................................18
5.5
Lowering Transmit Power ..............................................................................................................18
6
Profile Settings and Features ...................................................................................................................19
6.1
Alternate Profile Selection ..............................................................................................................19
6.2
Using PIO as Modem Control Signals ............................................................................................19
7
Design Concerns......................................................................................................................................21
7.1
Hardware Signals ............................................................................................................................21
7.2
Hardware Connections and Power ..................................................................................................21
7.3
LED Status ......................................................................................................................................22
7.4
Optimizing for Latency or Throughput ..........................................................................................22
7.5
Limitations of 7 Bit Data Mode ......................................................................................................22
8
Common Problems and Questions ..........................................................................................................23
9
Discovery and Connection ......................................................................................................................24
10
Serial Adapter Configuration ..............................................................................................................25
10.1 Serial interface hardware flow control............................................................................................25
10.2 Dip Switch Settings ........................................................................................................................26
10.3 Instant Cable Replacement .............................................................................................................26
Appendix A: Bluetooth Evaluation Board ......................................................................................................27
Power Terminals..........................................................................................................................................27
Default LED status ......................................................................................................................................27
Appendix B: Command Quick Reference .......................................................................................................30
Appendix C: Factory Default Settings ............................................................................................................32
Appendix D: Firmware Revision History .......................................................................................................33
809 University Avenue
•
Los Gatos, CA 95032
•
Tel (408) 395-6539
• info@RovingNetworks.com
~
2
~
Advanced User Manual
www.rovingnetworks.com
rn-bluetooth-um Version 4.77 2/3/2011
1
Introduction
This document contains the software command set and advanced configuration settings for Roving Networks
Bluetooth devices. The document covers FireFly and BluePort serial adapters, all Bluetooth modules, and the
FirePlug USB dongle. Commands and settings that are specific to a single product or product family will be
identified as such in the document.
The reader should have a working knowledge of Bluetooth operation and communications. To program the
Roving Networks devices you will need a Bluetooth enabled PC (either built-in or using a USB Bluetooth
dongle). Only one device may be programmed at a time. Once programmed and configured device settings
remain (independent of power down) until they are explicitly changed or the factory defaults are restored.
Prior to getting started, power on the device and pair it with your PC. Roving Networks Bluetooth devices
can be programmed over the Bluetooth link or through the serial interface. To program the device you will
need to connect to the device by opening the COM port assigned to the Roving Network device through
either the Bluetooth or serial port interface.
Roving Networks Bluetooth devices are programmed with a simple ASCI command language which is
similar to the industry standard Hayes AT protocol.
Set
commands configure the module and
get
commands
echo the current configuration. Configuration settings modified with the
set
command do not take effect until
after the module has been rebooted, even though the get command may show otherwise.
1.1
Making a
Connection
By default the Roving Networks device shows up under the Bluetooth Devices directory as Serial Port Profile
(SPP) Service “FireFly-ABCD”, where “FireFly” is the type of Roving Networks device and “ABCD” is the
last four nibbles of the Bluetoot MAC address. The local device name can be changed. You will need to
pair
with the device by double clicking on the device name and following the menu. The firmware automatically
stores up to 8 pairings from remote hosts in a first in, first out fashion.
If the remote Bluetooth device does not require authentication, a connection can occur without the pairing
process. However the Bluetooth specification requires that if either device involved in the pairing process
requires authentication, the other device must participate to ensure a secure link. The default mode of Roving
modules is an OPEN mode, such that the module does NOT require authentication. However most PC’s will
require authentication.
The pass key is a string of alpha or numeric chars, 1 to 16 chars in length. During the initial pairing process,
this code is entered on both sides of the Bluetooth connection, and must match to complete the pairing. This
passkey is used to create a secure link-key, which is then stored on both devices. Upon subsequent
connection attempts, the link-keys are compared and must match before the connection can continue. The
default Passkey is “1234”.
To connect to FireFly, browse for services, you should see: “SPP” profile with a virtual COM port. Open this
virtual COM port to create a Bluetooth connection. Once connected, the device will be in
data mode
allowing data to flow in both directions as if the serial port were locally attached to the PC. The device must
be in
command mode
for configuration and programming. To enter command mode type “$$$” (three
809 University Avenue
•
Los Gatos, CA 95032
•
Tel (408) 395-6539
• info@RovingNetworks.com
~
3
~
Advanced User Manual
www.rovingnetworks.com
rn-bluetooth-um Version 4.77 2/3/2011
dollar signs) from either the remote Bluetooth connection or the local serial port connection. You must enter
command mode within 60 seconds (configurable by setting the config timer).
NOTE: Only one client can make connection to FireFly slave at a time. As a master, it is possible to make
multiple connections from FireFly, but only in a point-to-point, serialized fashion. At this time Roving
Networks devices do not support multipoint master mode.
2
Modes of Operation
Operational modes can be set using the
SM
command
Slave mode (SM,0)
This is the default mode, whereby other Bluetooth devices can discover and connect to the device.
Outbound connections can also be made in this mode.
Master Mode (SM,1)
This mode is useful when the device wants to initiate connections (not receive them). In this mode
the device will NOT be discoverable or connectable.
Trigger Master Mode (SM,2)
In this mode, the device will automatically connect to the pre configured remote slave address when
a character (or characters) are received on the local UART. Connection will remain open until a
configurable idle timer (1 to 255 seconds) expires with no data being received, or a configurable
BREAK character is seen.
Auto-connect (Master Mode) (SM,3)
This mode can be set by command, or by setting the external dip switch 3 during power up by the
on the FireFly and BluePort serial adapter or setting high PIO6 on the Bluetooth modules. If this
mode is set, the device will initiate a connection to the pre-stored remote address immediately upon
power up. If no address is stored, an inquiry process will be attempted and the first device found
that matches the COD will be stored. In this mode, data is passed without being interpreted by the
Blueport (high speed), hence the connection cannot be broken via command. If disconnect occurs,
the device will attempt to re-connect until successful.
Auto-connect (DTR Mode) (SM,4)
This mode must be set by command. This mode operates like Auto-Connect Master mode, except
that the connection and disconnection are controlled by the external dip switch 3 on the FireFly and
BluePort serial adapter and PIO6 on the Bluetooth modules. Setting the Switch ON/PIO6 high
will initiate auto-connect process, and OFF/PIO6 low will cause a disconnect.
Auto-connect ANY Mode (SM,5)
This mode must be set by command. This mode operates like Auto-connect DTR mode, except that
each time the Switch/PIO is set, an inquiry is performed and the first device found is connected.
The stored address is NOT used, and the found address is never stored.
3
Configuration
809 University Avenue
•
Los Gatos, CA 95032
•
Tel (408) 395-6539
• info@RovingNetworks.com
~
4
~
Advanced User Manual
www.rovingnetworks.com
rn-bluetooth-um Version 4.77 2/3/2011
3.1
Command Mode vs. Data mode
Upon power up the device will be in data mode. To enter command mode, send the characters “$$$” through
the serial port or from the remote Bluetooth connection. The device will respond with “CMD”. To exit
command mode, send “---<cr>”. The device will respond with “END”.
While in command mode, the device will accept ASCII bytes as commands.
A quick check to see if you are in command mode is to type the “D” and “E” commands after entering
command mode. This will show the parameters, such as the
Bluetooth
Name, Class of Device and Serial Port
settings. To access configuration, the device must be in command mode by issuing “$$$”.
You must enter command mode with in the 60 second configuration window or the module will go into fast
data mode where all characters are ignored including the “$$$”. If the configuration timer expires while in
command mode the device will not go into fast data mode after exiting command mode.
You can not enter command mode from the remote Bluetooth connection if the device is in Master Mode.
3.2
Local Configuration (via serial port)
Use a normal RS-232 pass through cable from PC to send ASCII characters through the terminal to the
Roving Networks device. The serial port settings must match the Roving Networks serial port configuration.
By default these are set to:
•
Baud rate 115,200
•
8 bits
•
No Parity
•
1 stop bit
•
Hardware flow control enabled
Local configuration works at any time when the device does NOT have a Bluetooth connection, and also
works under certain conditions. If the device is in configuration mode and a connection occurs, the device
will exit configuration mode, and data will pass back and forth from the remote device.
Run your favorite terminal emulator, HyperTerminal or other program. Type
“$$$”
on your screen. You
should see “CMD” returned to you. This will verify that your cable and comm. settings are correct. Valid
commands will return an “AOK”, response, and invalid ones will return “ERR “. Commands that are not
recognized will return a “?”.
To exit command mode, type
“---“<cr>.
(three minus signs).
NOTE: You can enter command mode locally over the serial port at any time when not connected.
Once a connection is made, you can only enter command mode if the config timer has not expired.
To remain in configuration mode set the config timer to 255. Also, if the device is in Auto Master mode 3, you
will NOT be able to enter command mode when connected over Bluetooth.
3.3
Remote Configuration (via Bluetooth)
809 University Avenue
•
Los Gatos, CA 95032
•
Tel (408) 395-6539
• info@RovingNetworks.com
~
5
~