User Guide RN24, RN25, RN41, RN42, RN41XV, RN42XV, RN220XP, RN240, RN270, RN274 (Microchip) - 6

ManufacturerMicrochip
DescriptionRN-BT-DATA-UG Bluetooth Data Module Command Reference & Advanced Information
Pages / Page83 / 6 — RN-BT-DATA-UG. 1.3. COMMAND MODE VS. DATA MODE. FIGURE 1-1:. DATA & …
File Format / SizePDF / 1.4 Mb
Document LanguageEnglish

RN-BT-DATA-UG. 1.3. COMMAND MODE VS. DATA MODE. FIGURE 1-1:. DATA & COMMAND MODES

RN-BT-DATA-UG 1.3 COMMAND MODE VS DATA MODE FIGURE 1-1: DATA & COMMAND MODES

Model Line for this Datasheet

Text Version of Document

link to page 6 link to page 8 link to page 8
RN-BT-DATA-UG
For more information on available evaluation boards and reference designs, refer to the Roving Networks web site.
1.3 COMMAND MODE VS. DATA MODE
The Bluetooth module operates in two modes: data mode (default) and command mode. While in data mode, the module operates as a data pipe. When the module receives data, it strips the Bluetooth headers and trailers and passes the user data to the UART port. When data is written to the UART port, the module constructs the Blu- etooth packet and sends it out over the Bluetooth wireless connection. Thus, the entire process of sending/receiving data to the host is transparent to the end microprocessor. See Figure 1-1.
FIGURE 1-1: DATA & COMMAND MODES
Host Bluetooth User Data Bluetooth A B UART Bluetooth Interface Module A B $$$ $$$ Command Mode The default configuration for the Bluetooth module is: • Bluetooth slave mode • Bluetooth pin code 1234 • Serial port 115,200 Kbps baud rate, 8 bits, no parity, 1 stop bit • Serial port flow control disabled • Low power mode off You configure the module by putting it into command mode (see “Enter Command Mode” on page 8) and sending ASCII commands over the UART port or the Bluetooth link. You reboot the module so that the settings take effect. Once you change the con- figuration parameters, they persist until you change them or you perform a factory reset. There are two ways to configure the Bluetooth module: • Local configuration using your computer’s serial port • Via Bluetooth www.rovingnetworks.com Version 1.0r 3/26/13 page 6 Advanced Information Document Outline Chapter 1. Introduction 1.1 Overview 1.2 Evaluation Boards & Reference Designs 1.3 Command Mode vs. Data Mode Figure 1-1: Data & Command Modes 1.3.1 Configuring the Module over the UART Port 1.3.2 Remote Configuration Using Bluetooth 1.3.3 Enter Command Mode Table 1-1: Serial Port Settings Figure 1-2: View Current Settings 1.4 Operating Modes 1.5 Using Dipswitches & GPIO Pins for Configuration Table 1-2: Dipswitch & GPIO Settings Table 1-3: GPIO Assignments 1.6 Making a Bluetooth Connection 1.6.1 Discovery Figure 1-3: Discover the Bluetooth Module 1.6.2 Pairing Figure 1-4: Pair with the Bluetooth Module Figure 1-5: Bluetooth COM Port Settings 1.6.2.1 Pairing with a Computer or Smart Phone 1.6.3 Connecting Figure 1-6: PC’s Bluetooth Radio MAC Address Figure 1-7: Terminals A & B 1.6.4 Security Modes Chapter 2. Command Reference 2.1 Command Syntax Table 2-1: Command Types 2.2 SET Commands 2.2.1 S7,<flag> Table 2-2: 7-Bit Data Mode Values 2.2.2 SA,<value> Table 2-3: Set Authentication Values 2.2.3 SB,<value> Table 2-4: Set Break Values 2.2.4 SC,<value> 2.2.5 SD,<value> 2.2.6 SE,<value> 2.2.6.1 Firmware version 5.40 & Higher 2.2.6.2 Firmware Prior to Version 5.40 Table 2-5: Set Encryption Enable 2.2.7 SF,1 2.2.8 SH,<value> Table 2-6: HID Flag Register Bits 2.2.9 SI,<hex value> 2.2.10 SJ,<hex value> 2.2.11 SL,<char> Table 2-7: UART Parity Values 2.2.12 SM,<value> Table 2-8: Mode Values 2.2.13 SN,<string> 2.2.14 SO,<string> 2.2.15 SP,<string> 2.2.16 SQ,<mask> Table 2-9: Special Configuration Settings Values 2.2.17 SR,<hex value> 2.2.18 SS,<string> 2.2.19 ST,<value> Table 2-10: Configuraion Timer Settings 2.2.20 SU,<value> 2.2.21 SW,<value> 2.2.22 SX,<flag> Table 2-11: Bonding Values 2.2.23 SY,<hex value> Table 2-12: Power Settings (August 2012 and Later) Table 2-13: Power table (before August 2012) 2.2.24 SZ,<value> 2.2.25 S~,<value> Table 2-14: Profile Values 2.2.26 S-,<string> 2.2.27 S?,<flag> Table 2-15: Role Switch Values 2.2.28 S$,<char> 2.2.29 S|,<value> 2.3 GET Commands 2.3.1 D 2.3.2 E 2.3.3 GB 2.3.4 GF 2.3.5 GK 2.3.6 GR 2.3.7 G& 2.3.8 G<char> 2.4 Change & Action Commands 2.4.1 $$$ 2.4.2 --- 2.4.3 + 2.4.4 & 2.4.5 C 2.4.6 C,<address> 2.4.7 CF,<address> 2.4.8 CFI 2.4.9 CFR 2.4.10 CT,<address>,<value> 2.4.11 F,1 2.4.12 H 2.4.13 I,<value 1>,<value 2> 2.4.14 IN<value 1>,< value 2> 2.4.15 IQ 2.4.16 IS<value> 2.4.17 IR<value> 2.4.18 J 2.4.19 K, 2.4.20 L 2.4.21 M 2.4.22 O 2.4.23 P,<char> 2.4.24 Q 2.4.25 R,1 2.4.26 T,<flag> Table 2-16: T Command Values 2.4.27 U,<value 1>,<value 2> 2.4.28 V 2.4.29 W 2.4.30 Z 2.5 GPIO Commands 2.5.1 S@,<hex value> 2.5.2 S&,<hex value> 2.5.3 S%,<hex value> 2.5.4 S^,<hex value> 2.5.5 S*,<hex value> 2.5.6 Controlling the GPIO Pins 2.5.7 Setting GPIO Pin Power-Up Values 2.5.8 Setting GPIO8, GPIO9, GPIO10 & GPIO11 Chapter 3. Advanced Topics 3.1 Power Management Table 3-1: Power Management Methods 3.1.1 Optimizing Inquiry (Discovery) & Page (Connection) Windows 3.1.2 Sniff Mode 3.1.3 Enabling Deep Sleep 3.1.4 Disabling Output Drivers 3.1.5 Lowering Transmit Power Table 3-2: Power Settings 3.2 Configuration Timer Settings Table 3-3: Configuration Timer Settings 3.3 Interfacing to a Microprocessor 3.3.0.1 How do I know the module is ready for command mode? 3.3.0.2 Which hard signals should I connect? 3.4 HCI Mode 3.4.1 HCI over UART 3.4.2 HCI over USB 3.5 Profile Settings & Features Table 3-4: Profile Change Values 3.6 Using GPIO Pins as Modem Control Signals 3.7 Design Concerns 3.7.1 Hardware Signals 3.7.1.1 Reset Circuit 3.7.1.2 Factory Reset GPIO4 3.7.1.3 Connection Status Table 3-5: GPIO5 Status Table 3-6: GPIO2 Status 3.7.1.4 Using the SPI Bus for Flash Upgrades 3.7.1.5 Hardware Connections & Power 3.7.2 LED Status Table 3-7: Green LED Status 3.7.3 Optimizing for Latency or Throughput 3.7.4 Limitations of 7-Bit Data Mode 3.7.5 Common Issues 3.7.5.1 My Bluetooth client can see the FireFly module and its serial service, but I can’t connect 3.7.5.2 How do I change the client’s COM port? 3.7.5.3 How do I connect to more than one FireFly module from the same client at the same time? 3.7.6 Discovery & Connection Example Sequence 3.7.7 Auto-Pairing/Auto-Connection Table 3-8: GPIO Pin/Dipswitch Settings for Auto-Pairing/Connection 3.8 Serial Adapter Configuration Figure 3-1: DB9 Connector Pins Table 3-9: DB9 Connector Pin-Out 3.9 Null Modem & Flow Control Jumpers Figure 3-2: RN422, RN240, RN270 & RN274 Jumpers Figure 3-3: RN220XP Jumpers 3.10 Dipswitch Settings Figure 3-4: DipSwitches Table 3-10: Switch Functions Chapter 4. Applications 4.1 Instant Cable Replacement 4.1.1 Hardware Pairing Using Dipswitches Figure 4-1: Cable Replacement DipSwitch Settings for Pairing Figure 4-2: Setting DipSwitch 2 for Deployment 4.1.2 Software Pairing Using Commands Chapter 5. HID Profile 5.1 Overview Figure 5-1: Typical HID Environments 5.2 HID Firmware Overview 5.2.1 Operational Modes 5.2.2 Profile Configuration 5.2.3 Device Discovery & Pairing 5.2.4 HID Flag Register Table 5-1: HID Flag Register Bits 5.2.4.1 Bit 9 5.2.4.2 Bit 8 5.2.4.3 Bits 7-4 5.2.4.4 Bit 3 5.2.4.5 Bits 2-0 5.3 HID Reports Table 5-2: Data Interpretation 5.3.1 Translation Mode 5.3.2 Keyboard Shorthand Mode 5.3.3 Raw Report Mode 5.3.4 Special Reports & Modes 5.3.4.1 Output Reports Table 5-3: Status Byte Definitions 5.3.4.2 Apple Virtual Keyboard 5.3.4.3 Key Map Register 5.3.4.4 Disconnect Key 5.3.4.5 Consumer Report Table 5-4: Data Byte Format 5.3.4.6 Scan Code Tables: UART (ASCII) to HID Report Table 5-5: UART-to-HID Scan Code Table 5-6: ASCII to HID Report (to Host) Scan Codes 5.4 HID References Appendix A. Factory Defaults Table A-1: Factory Default Settings Appendix B. Command Quick Reference Guide Table B-1: Set Commands Table B-2: Get (Display) Commands Table B-3: Action Commands (Part 1 of 2) Table B-4: GPIO Commands Appendix C. Firmware Revision History C.1 Version 6.15 (3/26/2013) C.2 Version 6.12 (Limited Release) C.3 Version 6.11 C.4 Version 6.10 C.4.1 HID Firmware Known Issues C.5 Version 4.77 (8/10/2009) C.6 Version 4.74 (3/7/2009) Appendix D. Document Information Conventions Used in this Guide Recommended Reading Document Revision History