0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
RN-4677-PICTAIL

RN-4677-PICTAIL

  • 厂商:

    ACTEL(微芯科技)

  • 封装:

    模块

  • 描述:

    MODULE BLUETOOTH 4.0

  • 数据手册
  • 价格&库存
RN-4677-PICTAIL 数据手册
RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide  2015 Microchip Technology Inc. DS50002377A Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. The Embedded Control Solutions Company and mTouch are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. GestIC is a registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2015, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. ISBN: 978-1-63277-407-1 QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS 16949 == DS50002377A-page 2 Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified.  2015 Microchip Technology Inc. Object of Declaration: RN4677 Bluetooth® 4.0 Dual Mode Module  2015 Microchip Technology Inc. DS50002377A-page 3 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide NOTES: DS50002377A-page 4  2015 Microchip Technology Inc. RN4677 BLUETOOTH® 4.0 DUAL MODE MODULE USER’S GUIDE Table of Contents Preface ........................................................................................................................... 7 Chapter 1. Introduction 1.1 Overview ...................................................................................................... 11 1.2 Command Mode vs. Data Mode ................................................................... 11 1.3 Accessing the RN4677 over UART .............................................................. 12 1.4 Operating Modes .......................................................................................... 12 1.5 Making a Bluetooth Connection ................................................................... 13 1.6 Security Modes ............................................................................................. 13 Chapter 2. Command Reference 2.1 Introduction ................................................................................................... 15 2.2 Command Syntax ......................................................................................... 15 2.3 Set Commands ............................................................................................. 15 2.4 Get Commands ............................................................................................ 22 2.5 Action Commands ........................................................................................ 24 Worldwide Sales and Service .................................................................................... 31  2015 Microchip Technology Inc. DS50002377A-page 5 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide NOTES: DS50002377A-page 6  2015 Microchip Technology Inc. RN4677 BLUETOOTH® 4.0 DUAL MODE MODULE USER’S GUIDE Preface NOTICE TO CUSTOMERS All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available. Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXXXXA”, where “XXXXXXXX” is the document number and “A” is the revision level of the document. For the most up-to-date information on development tools, see the MPLAB® IDE online help. Select the Help menu, and then Topics to open a list of available online help files. INTRODUCTION This chapter contains general information that will be useful to know before using the RN4677 Bluetooth® 4.0 Dual Mode Module. Items discussed in this chapter include: • • • • • • • Document Layout Conventions Used in this Guide Recommended Reading The Microchip Web Site Development Systems Customer Change Notification Service Customer Support Revision History DOCUMENT LAYOUT This document describes how to use the RN4677 Bluetooth® 4.0 Dual Mode Module as a development tool to emulate and debug firmware on a target board. The document is organized as follows: • Chapter 1. “Introduction” – This chapter describes the operating modes of the RN4677 Bluetooth 4.0 Dual Mode Module and presents how to establish Bluetooth connection. • Chapter 2. “Command Reference” – This chapter describes the general command categories of the RN4677 Bluetooth 4.0 Dual Mode Module in detail.  2015 Microchip Technology Inc. DS50002377A-page 7 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Italic characters Initial caps Examples Referenced books MPLAB® IDE User’s Guide Emphasized text ...is the only compiler... A window the Output window A dialog the Settings dialog A menu selection select Enable Programmer Quotes A field name in a window or dialog “Save project before build” Underlined, italic text with right angle bracket A menu path File > Save Bold characters A dialog button Click OK A tab Click the Power tab Text in angle brackets < > A key on the keyboard Press , Plain Courier New Sample source code #define START Filenames autoexec.bat File paths c:\mcc18\h Keywords _asm, _endasm, static Command-line options -Opa+, -Opa- Bit values 0, 1 Constants 0xFF, ‘A’ Italic Courier New A variable argument file.o, where file can be any valid filename Square brackets [ ] Optional arguments mcc18 [options] file [options] Curly brackets and pipe character: { | } Choice of mutually exclusive arguments; an OR selection errorlevel {0|1} Ellipses... Replaces repeated text var_name [, var_name...] Represents code supplied by user void main (void) { ... } Notes DS50002377A-page 8 Represents A Note presents information that we want to re-emphasize, either to help you avoid a common pitfall or to make you aware of operating differences between some device family members. A Note can be in a box, or when used in a table or figure, it is located at the bottom of the table or figure. Note: This is a standard note box. CAUTION This is a caution note. Note 1: This is a note used in a table.  2015 Microchip Technology Inc. Preface RECOMMENDED READING This user's guide describes how to use RN4677. Other useful documents are listed below. The following Microchip document(s) are recommended as supplemental reference resources. RN4677 Bluetooth® 4.0 Dual Mode Module Data Sheet (DS50002370A) This document provides the technical specifications for the RN4677 module and is available for download from the Microchip website at www.microchip.com. THE MICROCHIP WEB SITE Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events; and listings of Microchip sales offices, distributors and factory representatives DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com, click on Customer The Development Systems product group categories are: • Compilers – The latest information on Microchip C compilers and other language tools • Emulators – The latest information on the Microchip MPLAB® REAL ICE™ in-circuit emulator • In-Circuit Debuggers – The latest information on the Microchip in-circuit debugger, MPLAB ICD 3 • MPLAB X IDE – The latest information on Microchip MPLAB X IDE, the Windows® Integrated Development Environment for development systems tools • Programmers – The latest information on Microchip programmers including the PICkit™ 3 development programmer  2015 Microchip Technology Inc. DS50002377A-page 9 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • • • • Distributor or Representative Local Sales Office Field Application Engineer (FAE) Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://www.microchip.com/support. REVISION HISTORY Revision A (May 2015) This is the initial release of this document. DS50002377A-page 10  2015 Microchip Technology Inc. RN4677 BLUETOOTH® 4.0 DUAL MODE MODULE USER’S GUIDE Chapter 1. Introduction 1.1 OVERVIEW Microchip RN4677 Certified Bluetooth Dual Mode module supports both Bluetooth Classic and Bluetooth Low Energy (BLE) communication. Under Bluetooth Classic, RN4677 implements standard Serial Port Profile (SPP) that supports serial data transfer between two Bluetooth Classic devices. In addition to SPP for Bluetooth Classic connectivity, the RN4677 introduces a private Generic Attribute Profile (GATT) service for serial data transfer between two BLE devices. This BLE data streaming service provided in the RN4677 is named “Transparent UART”. Therefore, the RN4677 is a Dual mode Bluetooth module, which supports both Bluetooth Classic and BLE serial data connectivity. RN4677 module is developed on top of Microchip's IS1677 Bluetooth IC. The primary difference between RN4677 firmware and the standard firmware in the IS1677 is that the RN4677 provides the control interface based on ASCII commands. The command interface on RN4677 is very similar to that of RN41/42/52/4020, providing an easy migration path for customers who are currently using RN modules. Interactive ASCII commands enable the RN4677 to be configured without complex and customer configuration tools. Like the other RN modules, the RN4677 also supports master/central capability, actively scanning for other connectable devices instead of waiting for incoming connection requests. 1.2 COMMAND MODE VS. DATA MODE RN4677 operates in two modes: Data mode (default) and Command mode. When RN4677 is connected to another device and in Data mode, RN4677 acts as a data pipe: anything received from UART is passed to the connected peer device through SPP if connected to a Bluetooth Classic device, or via a private GATT service if connected to a BLE device. When data is received from the peer device from SPP for Bluetooth Classic or UART Transparent for BLE, such data outputs directly to UART. RN4677 is configured or controlled, or both by setting it into Command mode and executing ASCII commands over UART. All configuration changes made by Set commands remain in Non-Volatile Memory (NVM) and survive the power cycle. Any configuration changes must take effect after a reboot. All Action commands take effect immediately, but have no effect after power cycling.  2015 Microchip Technology Inc. DS50002377A-page 11 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide 1.3 ACCESSING THE RN4677 OVER UART A terminal emulator, such as Tera Term (Windows) or CoolTerm (Mac OS-X®), can be used to control RN4677 from a computer. With RN4677 connected to a computer and a serial port enumerated for the UART port, run the terminal emulator to open the COM port with the following port settings: • • • • • Baud rate 115,200 bps 8 bits No Parity 1 stop bit Hardware flow control disabled To enter Command mode, type $$$ into the terminal emulator. Once RN4677 enters Command mode, the string CMD> must be sent to UART to indicate the start of Command mode session. Once in Command mode, valid ASCII commands can be issued to control or configure RN4677. All commands end with key (carriage return ), and are always responded by RN4677. The next command must not be issued prior receiving a response to the previous command. For Set or Action commands, the positive response is AOK and negative response is either ERR for error or ? for unknown command. By default, when the RN4677 is ready to receive the next command, the command prompt CMD> is sent to UART. Users can turn off this feature by using command S> to ensure that the interface is backward compatible with RN41/42/52/4020. To return to Data mode, type ---. RN4677 automatically enters Data mode once it connects or disconnects with another device. Note: 1.4 The module supports Fast Data mode. In this mode, the module does not enter Command mode even if it receives $$$. To enable Fast Data mode, use command F,1. OPERATING MODES RN4677 has several operating modes that the user can set using the command SM. • Slave mode (SM,0) - Default mode, in which other Bluetooth devices can discover and connect to the module. Outbound connections can be initiated in this mode. • Master mode (SM,1) - In this mode, the RN4677 module is not discoverable. The module makes a connection when a connection command C is received. Refer to command C for possible parameters for establishing connections. • Auto-Connect Master mode (SM,3) - In this mode, the module automatically makes connections on power-up and reconnects when the connection is lost. In this mode, RN4677 automatically enters Fast mode, same as issuing command F,1, therefore $$$ cannot enter Command mode. If an address is not stored, RN4677 automatically enters Master mode. • Paring mode (SM,6) - In this mode, the module attempts to connect to the remote device that matches the stored remote address. To set the remote address, use command SR. Note: DS50002377A-page 12 Any changes to the device configuration using the set S commands do not take effect until the device is rebooted using the reboot command R,1 or power cycle.  2015 Microchip Technology Inc. Introduction 1.5 MAKING A BLUETOOTH CONNECTION RN4677 can act as a master to initiate a connection to another Bluetooth device. The following steps can be used to start a Bluetooth Classic connection: 1. 2. 3. 4. Type $$$ to enter Command mode. Type + to enable echo. Type I to inquire the Bluetooth Classic devices in the neighborhood. Wait until the inquiry is finished and find the MAC address of the device to be connected. 5. Type C,, to attempt a connection with a remote device. 6. Once connected, characters entered in the terminal emulator is sent to the remote peer, and vice versa. 7. To terminate the connection, type $$$ to get into Command mode, then type command K,1. In a similar manner, the RN4677 can initiate BLE connection in Generic Access Profile (GAP) Central mode to another BLE device supporting the "Transparent UART" service. The command sequence is listed below: 1. 2. 3. 4. Type $$$ to enter Command mode. Type + to enable echo. Type IL to inquire BLE devices in the neighborhood. Wait until the inquiry is finished and find the MAC address or address type of the device to be connected. 5. Type C,, to attempt a connection with remote device, where the first parameter indicates the address type that can be found in the inquiry result: 0 for public address and 1 for private address. 6. Once connected, characters typed in the terminal emulator is sent to the remote peer, and vice versa. 7. To terminate the connection, type $$$ to get into Command mode, then type command K,1. 1.6 SECURITY MODES RN4677 supports encryption and authentication with security modes from 1 to 4. The definition of security mode are as follows: • • • • Security mode 1: Passkey Confirm Security mode 2: Just Works Security mode 3: Passkey Entry Security mode 4: Legacy Pin Code For Bluetooth Classic, all security modes are supported. For BLE, only security modes 1 to 3 are supported. For security modes 1 and 3, by default, a random 6-digit security pin is generated and displayed at one end of the connection and the other end must enter the security pin. Optionally, if both connection ends are RN4677, it is possible to fix the 6-digit security pin for BLE by supplying 6-digit pin to command SP instead of 4-digit pin for legacy Pin Code mode.  2015 Microchip Technology Inc. DS50002377A-page 13 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide NOTES: DS50002377A-page 14  2015 Microchip Technology Inc. RN4677 BLUETOOTH® 4.0 DUAL MODE MODULE USER’S GUIDE Chapter 2. Command Reference 2.1 INTRODUCTION RN4677 supports a variety of commands for controlling and configuration. This section describes these commands in detail and provides examples. 2.2 COMMAND SYNTAX The ASCII command syntax is a keyword followed by optional parameters. • ASCII commands are divided into multiple groups: - Set Commands - Get Commands - Action Commands • All commands are one, two or three case-insensitive characters • Delimit command and any argument with a comma • Text data is case sensitive such as Bluetooth name • All commands end with carriage return ('\r', \x0d) • Get commands return the value to retrieve. Most of the other commands return either AOK as a positive response or ERR as a negative response. 2.3 SET COMMANDS Set commands change RN4677 configurations and take effect after rebooting via R,1 command, hard Reset or power cycle. 2.3.1 SA, The Set Authentication command sets the authentication method when a remote device attempts to connect, where is one of the values shown in Table 2-1. Once a remote device exchanges pin codes with the RN4677 device, a link key is stored for future use. The device automatically and permanently stores up to four peer devices in flash memory using the First-In, First-Out (FIFO) method. TABLE 2-1: SET AUTHENTICATION VALUES Value 1 Description Secure Simple Pairing (SSP) Pin Code Confirm mode If this option is set when authenticating the link, a 6-digit pin is sent to UART. On the remote side, the same 6-digit pin is shown and asked to be confirmed. For BLE, if the command SP sets the 6-digit pin code, the pin code is fixed to be displayed and confirmed on the remote side; otherwise, a random 6-digit pin code is generated for confirmation. 2 (Default) SSP “Just Works” mode This mode works without any request to display or input any security pin.  2015 Microchip Technology Inc. DS50002377A-page 15 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide TABLE 2-1: SET AUTHENTICATION VALUES (CONTINUED) Value 3 Description SSP Pin Code Input mode If this mode is set when authenticating the link, a 6-digit pin is displayed at the remote device and the local RN4677 device is required to input the pin. For BLE, if the command SP sets the 6-digit pin code, the pin code is automatically provided. Ensure that the remote device supports fixed pin codes; otherwise, the authentication fails. 4 Legacy Pin Code mode This Security mode is defined in Bluetooth specification 2.0. Only Bluetooth Classic supports this Security mode. This mode requires a fixed 4-digit pin code that is configurable using command SP. Default: 2 Example: SA,2 2.3.2 // Enable "Just Works" security mode SC, This command only applies to Bluetooth Classic. This command sets the service class field in the Class of Device (COD). The service class consists of the 11 Most Significant bits in the COD. This command sets the most significant word (msw) to create the 24-bit device class number. The inquiring device interprets the service class to determine the service. A complete listing of available Bluetooth service classes is referenced on the Bluetooth SIG web site at www.bluetooth.org. Default: 0000 Example: SC,0002 2.3.3 // Set service class to 0002 SD, This command only applies to Bluetooth Classic. This command sets the class of device (COD) least significant word (lsw). The COD is a 24-bit number that is made up of the device class with major 8-bit and minor in a 16-bit word. This command is used with the Service Class command. Default: 1F00 Example: SD,8040 To set the COD to 0x1F0123, use the following commands: SC,001F SD,0123 DS50002377A-page 16  2015 Microchip Technology Inc. Command Reference 2.3.4 SE, This command only applies to Bluetooth Classic. This command sets the universally unique identifier (UUID) for service discovery process. It only supports standard 16-bit UUID. Default: 1101 Example: SE,1101 2.3.5 // Set UUID for serial port SF,1 This command restores the device to the factory defaults. Example: SF,1 // Restore factory defaults 2.3.6 SG, This command changes Bluetooth modes between Classic 2.1 + EDR (SPP) and Low Energy 4.0. It accepts one parameter with the following values: Parameter Value 0 Bluetooth Mode Dual mode 1 Only Bluetooth Low Energy 2 Only Bluetooth Classic 2.3.7 SI, This command only applies to Bluetooth Classic. The Inquiry Scan Window command sets the length of time the device spends enabling an inquiry scan (discoverability). The minimum value is 0x0012, corresponding to about a 1% duty cycle. The page scan interval is fixed at 0x1000. The default window is 0x0100. The maximum value is 0x0800. Set this parameter to 0x0000 to disable inquiry scanning and render the device undiscoverable. If the host already made the pairing, the inquiry scan is not used. Default: 0100 Example: SI,0200 2.3.8 // Set inquiry scan window to 0x0200 SJ, This command only applies to Bluetooth Classic. The Page Scan Window command sets the amount of time the device spends enabling page scanning (connectable). The minimum value is 0x0012, which corresponds to about a 1% duty cycle. The page scan interval is fixed at 0x1000. The default window is 0x0100. The maximum value is 0x800. Set this option to 0x0000 to disable page scanning and render the device nonconnectable. Default: 0100 Example: SJ,0200  2015 Microchip Technology Inc. // Set the page scan window to 0x0200 DS50002377A-page 17 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide 2.3.9 SM, This command sets the mode, where is a number as shown in Table 2-2. TABLE 2-2: MODE VALUES Value Description 0 Slave mode 1 Master mode 3 Auto-Connect Master mode 6 Pairing mode Default: 0 Example: SM,1 2.3.10 // Set the mode to Master SN, This command sets the device name, where is up to 16 alphanumeric characters. Default: N/A Example: SN,MyDevice 2.3.11 // Set the device name to "MyDevice" SO,[,] This command sets the extended status string, where and are up to four alphanumeric characters each. Setting these strings to from one to four characters permits status messages to be sent to the RN4677 UART port. The first string is the prefix to the message, and the optional second string is the postfix to the message. For instance, when a Bluetooth Classic connection is established, the device sends the string CONNECT. If the first parameter is a space, then both prefix and postfix are cleared, and no extended status string becomes an output. Default: %,% Example: SO, 2.3.12 // Set the prefix and postfix of the message to //respectively SP, This command sets the security pin code, where is either a 4-digit or a 6-digit pin. The 4-digit pin is used for legacy pin code pairing, while the 6-digit pin is used for SSP authentication in BLE if a fixed pin is desirable. The fixed 6-digit pin code in BLE is not supported by many of the Bluetooth Low Energy implementations. Default: 1234 Example: SP,0123 DS50002377A-page 18 // Set pin code to "0123"  2015 Microchip Technology Inc. Command Reference 2.3.13 SQ, This command only applies to BLE. This command sets the data streaming reliability between two RN4677 devices. If it communicates with a smart phone or tablet, the remote peer determines RN4677 data streaming reliability by either start notification (no acknowledgment) or indication (with acknowledgment). If the parameter of command SQ is 1, the data streams with acknowledgment; otherwise, the parameter 0 implies unacknowledged data streaming. Default: 0 Example: SQ,1 2.3.14 // Enable acknowledgment for data streaming SR[,] This command stores the remote address. When the MAC address is for a Bluetooth Classic device, then the only parameter is the Bluetooth MAC address, 12 hexadecimal digits (6 bytes) without space or characters between digits. For a BLE device, the first parameter is either 0 (public) or 1 (random) to indicate address type, followed by the MAC address. Additionally, this command takes special character Z to erase any stored address. Default: N/A Example: SR,00A053112233 // Set the remote Bluetooth Classic // address to 00A053112233 SR,0,00A053112233 // Set the remote BLE address to // 00A053112233 SR,Z // Clear stored address 2.3.15 SS, This command sets the service name, where is from 1 to 16 alphanumeric characters. Default: SerialPort Example: SS,SPP  2015 Microchip Technology Inc. // Service name set to SPP DS50002377A-page 19 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide 2.3.16 ST,,, This command only applies to BLE Transparent UART connections. This command sets the connection parameters for BLE connection. These connection parameters are used for establishing connection when RN4677 acts as a master. Connection parameters can be modified after connection is established by Action command T. This command expects three 16-bit hexadecimal parameters: minimum connection interval, slave latency and supervision timeout, respectively. The unit for the first parameter is 1.25 ms. The unit for the last parameter is 10 ms. Default: 0008,0000,0200 Example: ST,0010,0000,0100 2.3.17 // Set minimum connection to be 20 ms, slave // latency to be 0 and supervision timeout to be // 2.56 seconds SU, The Set UART Baud Rate command sets the baud rate where is 1200, 2400, 4800, 9600, 19.2, 28.8, 38.4, 57.6, 115K, 230K, 460K, or 921K. Only the first two characters for the desired baud rate must be specified. Default: 115,200 Example: SU,57 2.3.18 // Set the UART baud rate to 57,600 SW, This command only applies to Bluetooth Classic. This command enables low-power Sniff mode, which enables extremely low-power operation. In this mode, the device goes into a deep sleep and wakes up every 625 µs x to send/receive data. For example, the SW,0050 setting (0x50 = 80, 80 x 625 µs = 50 ms) causes the module to enter low-power sleep and wake once every 50 ms to check for RF activity. This setting is useful for applications in which the device is connected and sending data. Data is not lost, however, some delay may occur. Default: 0000 // Disable Sniff mode Example: SW,0050 2.3.19 // Enable Sniff mode with interval time of 50 ms SY, This command sets the transmit power of the module . Default: 3 Example: SY,1 DS50002377A-page 20 // Change max RF power output to be 1  2015 Microchip Technology Inc. Command Reference 2.3.20 S-, This command sets the serialized friendly name of the device, where is up to 11 alphanumeric characters. This command automatically appends the last two bytes of the Bluetooth MAC address to the name, which is useful for generating a custom name with unique numbering. Default: N/A Example: S-,MyDevice 2.3.21 // Set name to "MyDevice-ABCD" S?, This command only applies to Bluetooth Classic. The Role Switch command enables and disables the role switch, where 0 means disable role switch and 1 means enable role switch. If the switch is set when a slave mode device receives an incoming connection, the device tries to force a role switch, which enables the slave to become the master. This option is useful in situations where the local device sends high-speed data up to the remote host, and can improve performance. While connected to this device, the connecting host may not be able to make additional outbound (multi-point) connections. Default: 0 Example: S?,1 2.3.22 // Enable role switch S$, This command sets the configuration detect character string, where is a single character. This setting configures the escape character to enter Command mode ($$$) to a new character. Restoring the factory defaults returns the device to using $$$. Default: $ Example: S$,#  2015 Microchip Technology Inc. // Set ### as string to go into Command mode DS50002377A-page 21 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide 2.3.23 S:,, This command is used to change any settings in configuration EEPROM. This command expects two parameters. The first parameter is a 16-bit hex value that represents memory address of EEPROM of the first byte of data. If there is more than one byte of data to be written, the memory address automatically increases. Set the second parameter value with the following format: • Hex values up to 32 bytes. • ASCII values up to 32 characters; enclosed by a quote User must understand the mapping between EEPROM memory address and configuration parameters for the RN4677. Default: N/A Example: S:,0010,414243 // Set device name to be "ABC", where device // name is stored in EEPROM starting from // memory address 0x0010 S:,0010,"ABC" // Set device name to be "ABC", where device // name is stored in EEPROM starting from // memory address 0x0010 CAUTION Use caution when writing values to the EEPROM memory. Incorrect values can give unexpected results. It is strongly recommended to contact Microchip Technical Support before using this command. 2.3.24 S>, Command S> enable or disable command prompt. If command prompt is on whenever RN4677 is ready to receive a command, prompt CMD> is sent to UART to notify user that RN4677 is ready for next command. This feature releases the host MCU load to keep track of command response and timing requirements. Default: 1 Example: S>,0 2.4 // Turn off command prompt GET COMMANDS The Get commands retrieve and display the stored information of the device. Most of these commands do not have a keyword or character and do not take any parameters. 2.4.1 D This command displays basic settings such as the address, name, UART settings, security, pin code, bonding, and remote address. Example: D DS50002377A-page 22 // Display basic settings  2015 Microchip Technology Inc. Command Reference 2.4.2 E This command displays the extended settings of the device such as the service name, service class and device class. Example: E // Display extended settings 2.4.3 GB This command returns the Bluetooth address of the device. Example: GB // Display the device's Bluetooth address 2.4.4 GK This command returns the current connection status of the device. There are three single digit values returned, which are separated by a comma. The first digit indicates the status of the Bluetooth connection: 0 means no connection, and 1 means connected. The second digit indicates authentication status, which is shown in Table 2-3. TABLE 2-3: AUTHENTICATION STATUS Value Description 0 No BLE authentication 3 APP closed; no data transfer possible 6 BLE link authenticated The third digit indicates the type of connection, which is shown in Table 2-4. TABLE 2-4: CONNECTION TYPES Value Description 0 SPP 2 BLE Example: GK 2.4.5 // Display current connection status G:,, This command reads the settings from configuration EEPROM. This command expects two parameters. The first parameter is the 16-bit hex value of the starting memory address for configuration to read. The second parameter is the 8-bit hex value for the length of configuration to be read. This value must be less than 32, or 0x20 in hex format. Example: G:,0010,10 2.4.6 // Read the device name up to 16 bytes, which is stored // starting from address 0x0010 G This command displays the stored settings for a Set command, where is a Set command name. Example: GA  2015 Microchip Technology Inc. // Return Authentication mode set by command SA DS50002377A-page 23 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide 2.5 ACTION COMMANDS Action commands perform actions such as inquiries, connecting, and entering/exiting Command mode. Action commands do not return AOK. 2.5.1 $$$ This command causes the device to enter Command mode and display command prompt. The device passes characters as data until it sees this exact sequence. The escape character to enter Command mode can be changed with the S$ command. Example: $$$ 2.5.2 // Enter Command mode --- This command causes the device to exit Command mode, displaying END. Example: --- 2.5.3 // Exit Command mode + This command toggles the local echo on and off. If the + command is sent in Command mode, all typed characters are echoed to the output. Typing + a second time turns local echo off. Default: Off Example: + 2.5.4 // Turn local echo on A[,,] This command only applies to BLE. This command starts the advertisement. Optionally, it can take up to two parameters. The first parameter is the 16-bit hex value of the advertisement interval with the unit of 0.625 ms. The second parameter is the 16-bit hex value of the advertisement lasting time with the unit of millisecond. After this time, the advertisement stops. If the second parameter is not set but the first parameter is set, advertisement starts with interval of the parameter 1 until a connection is established. If no parameter is given, the advertisement starts with an interval of 20 ms for 10s and then increase the advertisement interval to 160 ms to save power. Example: A,0040,03E8 2.5.5 // Advertise with interval of 40 ms for 1 second B This command only applies to BLE. Command B is used to secure the connection and bond two connected devices. Command B is only effective if the two devices are already connected. Bonding can be issued from either the central or the peripheral device. Once bonded, security materials are saved in both end of the connection. Therefore, reconnection between bonded devices does not require authentication as reconnection can be done in a very short time. DS50002377A-page 24  2015 Microchip Technology Inc. Command Reference If the bonded connection is lost for any reason, reconnection does not automatically provide a secured link. To secure the connection, the user must issue another B command. However, this command is only for securing link other than saving connection information. Example: B 2.5.6 // Secure the BLE link C This command causes the device to attempt connecting to the stored remote address. Example: C 2.5.7 // Connect to stored remote address C, This command only applies to Bluetooth Classic. This command causes the device to connect to a remote address, where is specified in hex format. The address is also stored as the remote address if connection is successful. Example: C,00A053112233 2.5.8 // Connect to the Bluetooth address // 00A053112233 C,, This command only applies to BLE. This command causes the device to connect to a remote BLE address, where is specified in hex format. The address is also stored as the remote address if connection is successful. The first parameter indicates the address type: 0 for public address and 1 for private random address. Example: C,0,00A053112233 2.5.9 // Connect to the BLE address // 00A053112233 C RN4677 can store up to four paired devices. This command provides an easy way to reconnect to any paired device without typing the MAC address. To display the list of paired devices, use command Y,1. Example: C2 2.5.10 // Reconnect to the 2nd stored device CF, This command only applies to Bluetooth Classic. This command causes the device to connect to and immediately go into Fast Data mode. Example: CF,00A053112233  2015 Microchip Technology Inc. // Connect to 00A053112233 in Fast Data // mode DS50002377A-page 25 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide 2.5.11 CFR This command causes the device to connect and immediately go into Fast Data mode using the stored remote address. Example: CFR 2.5.12 F, This command puts the RN4677 into Fast Data mode. If the parameter is 1, Fast Data mode is enabled; otherwise, Fast Data mode is disabled. Fast Data mode improves data transfer throughput by disabling check for escape characters to enter Command mode. When RN4677 is connected to another device, enabling Fast Data mode exits Command mode immediately and puts the device into Fast Data mode; when RN4677 is not connected to another device, enabling Fast Data mode puts RN4677 into Fast Data mode once it connects to another device. Note: Once in Fast Data mode, it is impossible to enter Command mode unless the remote side drops the connection or hardware Reset is invoked to reboot the module. Example: F,1 2.5.13 // Leave Command mode and enter Fast Data mode H The Help command displays a list of commands and their basic syntax. Example: H 2.5.14 // Display help I,, This command only applies to Bluetooth Classic. This command performs an inquiry scan, where is the scan time in seconds and is the optional COD of the device class being scanned. The default time is 10 seconds, and the maximum is 48 seconds. If is unused or set to 0, the device looks for all device classes. When entering a COD, all six hex characters must be provided. For example, enter 0040F0 for COD 0x40F0 value. The scan returns a maximum of nine devices. As devices are found, they are displayed in the following format: ,, 00A053000123,MySerial-Port,72010C Default: 10 seconds, no COD Example: I,20,0040F0 2.5.15 // Scan for 20 seconds using the COD 0x40F0 IL[,,,] This command only applies to BLE. This command scans the neighborhood for BLE devices. This command can take up to three parameters. DS50002377A-page 26  2015 Microchip Technology Inc. Command Reference The first parameter is an 8-bit hex value for scan time in of seconds. The second parameter is a 16-bit hex value for scan interval in the unit of 0.625 ms. The third parameter is a 16-bit hex value for scan window in the unit of 0.625 ms. This parameter must be less than or equal to the second parameter. If parameters are not provided, the default scan time is 8 seconds, scan interval is 230 ms and scan window is 125 ms. Example: IL,10,0320,0190 2.5.16 // Scan BLE peripherals for 16 seconds with // scan interval 500 ms and scan window 250 ms IN, This command only applies to Bluetooth Classic. This command is similar to the I command, but it does not return the Bluetooth name, where is the scan time in seconds and is the optional COD of the device class being scanned. Example: IN10,001F00 // Scan for 10 seconds using the COD 0x1F00 2.5.17 IQ This command only applies to Bluetooth Classic. This command scans for Bluetooth devices in Pairing mode and returns the Received Signal Strength Indicator (RSSI), which is an indicator of the signal quality for remote devices. Inquiry scanning with RSSI is part of the Bluetooth specification where the TX power is held at a constant level (no power control) while sampling the RSSI. A useful application for RSSI scanning is proximity-based pairing. Example: IQ 2.5.18 IS This command only applies to Bluetooth Classic. This command performs an inquiry scan with a COD of 0x001F00, which is the default COD for Microchip Bluetooth Classic RN modules, where is the scan time in seconds. Example: IS10 // Scan for Microchip Bluetooth Classic RN devices for 10 s 2.5.19 IR This command only applies to Bluetooth Classic. This command performs an inquiry scan with a COD of 0x0055AA, where is the scan time in seconds. Microchip Bluetooth Classic RN modules use this COD for instant cable replacement. Example: IR10  2015 Microchip Technology Inc. // Scan for instant cable replacement devices for 10s DS50002377A-page 27 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide 2.5.20 K,1 The Kill command disconnects the current connection. The characters KILL are echoed to the local UART once the connection is broken. Example: K,1 2.5.21 // Disconnect the current connection N, This command removes a device from the paired device list. The RN4677 is able to store up to four devices. The paired device list can be displayed by issuing command Y. This command expects one parameter. The parameter can be letter Z, indicating to remove all devices from the paired device list, or the parameter can be hex value of a MAC address. This command removes the device with the input MAC address from the paired device list. If input MAC address is not associated with one of the devices in the paired device list, an error information is displayed. Example: N, 00A053112233 // Remove device with MAC address // 00A053112233 from paired device list N,Z // Clear paired device list 2.5.22 O This command displays other settings such as the configuration character. Example: O // Show the other settings 2.5.23 Q This command puts the device into Quiet mode, which means it is temporarily not discoverable or connectable. When this command is issued, the device responds Quiet. This command does not survive a power cycle or Reset. The Q command settings with different responses include: • Q - The module is undiscoverable for both Bluetooth Classic and BLE • Q,0 - The module is discoverable and able to connect for both Bluetooth Classic and BLE. Response is AOK. • Q,1 - The module is not discoverable and not able to connect for both Bluetooth Classic and BLE • Q,2 - The module is able to connect but is not discoverable in Bluetooth Classic • Q,3 - The module is not discoverable in BLE • Q,? - Displays the current quiet mode Example: Q // Make module undiscoverable 2.5.24 R,1 This command forces a complete device reboot (similar to power cycle). Note: Any changes to the device configuration using the Set commands do not take effect until the device is rebooted. Example: R,1 DS50002377A-page 28 // Reboot device  2015 Microchip Technology Inc. Command Reference 2.5.25 T,,,, This command only applies to BLE. This command adjusts the connection parameters after establishing the BLE connection. The first parameter is a 16-bit hex value for minimum connection interval with unit of 0.625 ms. The second parameter is a 16-bit hex value for maximum connection interval with unit of 0.625 ms. The third parameter is slave latency. The fourth parameter is supervision timeout with unit of 10 ms. Example: T,0010,0020,0000,0100 // // // // // Adjust the connection parameter to be min_conn_interval: 10 ms max_conn_interval: 20 ms slave_latency: 0 supervision timeout: 2.56 seconds 2.5.26 V This command displays the firmware version. Example: V 2.5.27 // Display the firmware version W This command is the same as command Q,0. It is implemented for backward compatibility. This command enables discovery and connection after it has been disabled with the Q command. It reloads the stored value of the inquiry and page window to re-enable. Example: W 2.5.28 // Turn on discovery and connections X This command is a combination of commands D, E and O to display configurations. Example: X 2.5.29 // Display configurations Y[,1] Command Y displays the MAC addresses of devices in the paired device list. Optionally, if parameter 1 is provided, the indexes of the MAC address of devices in the paired device list are also displayed. The index is useful if the user plans to use command C to reconnect device in the stored device list. Example: Y  2015 Microchip Technology Inc. // Display MAC addresses of devices in // the stored device list DS50002377A-page 29 RN4677 Bluetooth® 4.0 Dual Mode Module User’s Guide 2.5.30 Z This command only applies to BLE. Command Z cancels attempt to establish a BLE connection by C command before a connection is established. Example: Z DS50002377A-page 30 // Cancel attempt to establish a BLE // connection.  2015 Microchip Technology Inc. Worldwide Sales and Service AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.com Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 Germany - Dusseldorf Tel: 49-2129-3766400 Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Hong Kong Tel: 852-2943-5100 Fax: 852-2401-3431 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8569-7000 Fax: 86-10-8528-2104 Austin, TX Tel: 512-257-3370 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Novi, MI Tel: 248-848-4000 Houston, TX Tel: 281-894-5983 Indianapolis Noblesville, IN Tel: 317-773-8323 Fax: 317-773-5453 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 New York, NY Tel: 631-435-6000 San Jose, CA Tel: 408-735-9110 Canada - Toronto Tel: 905-673-0699 Fax: 905-673-6509 China - Dongguan Tel: 86-769-8702-9880 China - Hangzhou Tel: 86-571-8792-8115 Fax: 86-571-8792-8116 India - Pune Tel: 91-20-3019-1500 Japan - Osaka Tel: 81-6-6152-7160 Fax: 81-6-6152-9310 Japan - Tokyo Tel: 81-3-6880- 3770 Fax: 81-3-6880-3771 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 China - Hong Kong SAR Tel: 852-2943-5100 Fax: 852-2401-3431 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 China - Shenzhen Tel: 86-755-8864-2200 Fax: 86-755-8203-1760 Taiwan - Hsin Chu Tel: 886-3-5778-366 Fax: 886-3-5770-955 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 Taiwan - Kaohsiung Tel: 886-7-213-7828 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Germany - Pforzheim Tel: 49-7231-424750 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Italy - Venice Tel: 39-049-7625286 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Poland - Warsaw Tel: 48-22-3325737 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 Sweden - Stockholm Tel: 46-8-5090-4654 UK - Wokingham Tel: 44-118-921-5800 Fax: 44-118-921-5820 Taiwan - Taipei Tel: 886-2-2508-8600 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 01/27/15 DS50002377A-page 31  2015 Microchip Technology Inc.
RN-4677-PICTAIL 价格&库存

很抱歉,暂时无法提供与“RN-4677-PICTAIL”相匹配的价格&库存,您可以联系我们找货

免费人工找货