nRF8001 Single-chip Bluetooth® low energy solution Product Specification 1.2 Key Features • • • • • • • • Bluetooth low energy peripheral device Stack features: • Low energy PHY layer • Low energy link layer slave • Low energy host for devices in the peripheral role • Proprietary Application Controller Interface (ACI) Hardware features: • 16 MHz crystal oscillator • Low power 32 kHz ± 250 ppm RC oscillator • 32.
nRF8001 Product Specification Liability disclaimer Nordic Semiconductor ASA reserves the right to make changes without further notice to the product to improve reliability, function or design. Nordic Semiconductor ASA does not assume any liability arising out of the application or use of any product or circuits described herein.
nRF8001 Product Specification RoHS statement Nordic Semiconductor’s products meet the requirements of Directive 2002/95/EC of the European Parliament and of the Council on the Restriction of Hazardous Substances (RoHS). Complete hazardous substance reports as well as material composition reports for all active Nordic Semiconductor products can be found on our website www.nordicsemi.com. Revision History Date August 2013 Version 1.2 • • October 2012 1.1 • • • • • • January 17th 2012 Revision 1.
nRF8001 Product Specification Contents 1 Introduction .................................................................................................8 1.1 Prerequisites.........................................................................................8 1.2 Writing conventions ..............................................................................8 1.3 Bluetooth specification releases ...........................................................8 2 Bluetooth Qualification ID ...................
nRF8001 Product Specification 14.3 32.768 kHz crystal specification requirements .....................................47 14.4 Reset ....................................................................................................48 14.5 Antenna Matching and Balun................................................................48 14.6 DC/DC Converter requirements............................................................48 14.7 PCB layout and decoupling guidelines .........................................
nRF8001 Product Specification 24 System commands......................................................................................96 24.1 Test (0x01)............................................................................................96 24.2 Echo (0x02) ..........................................................................................97 24.3 DtmCommand (0x03) ...........................................................................98 24.4 Sleep (0x04) ...................................
nRF8001 Product Specification 27.1 DataCreditEvent (0x8A)........................................................................154 27.2 PipeErrorEvent (0x8D)..........................................................................155 27.3 DataReceivedEvent (0x8C) ..................................................................156 27.4 DataAckEvent (0x8B) ...........................................................................157 28 Appendix ...........................................................
nRF8001 Product Specification 1 Introduction nRF8001 is a Bluetooth® low energy solution designed for operation in the peripheral role. By integrating a Bluetooth low energy compliant radio (PHY), slave mode link controller, and host, nRF8001 offers you an easy way to add Bluetooth low energy connectivity to your application. nRF8001 offers a serial interface (ACI) for configuration and control from your microcontroller.
nRF8001 Product Specification 2 Bluetooth Qualification ID nRF8001 is listed as an EP-QDL on the Qualified listings page of the Bluetooth Special Interest Group website (https://www.bluetooth.org/tpg/listings.cfm). For details on the design qualifications, please refer to the following qualification IDs: • • B019756: EP-QDL containing core PICS. B017566: RF PHY Component QDL containing layout and schematics for the EP-QDL reference design. Revision 1.
nRF8001 Product Specification Part A: nRF8001 Physical description This section defines the physical features of nRF8001 and its electrical and mechanical specifications. It also defines the nRF8001 hardware, specifications, and provides information on operating procedures. Revision 1.
nRF8001 Product Specification 3 Product overview nRF8001’s main physical features are the Bluetooth low energy PHY and the Bluetooth low energy stack that handles the link controller and host stack. It also includes additional analog sub-systems needed for the Bluetooth low energy operation, such as power management and several oscillator options.
nRF8001 Product Specification 4 Bluetooth low energy features nRF8001 includes Bluetooth low energy protocols and profiles (see Figure 2.) that are defined in the Bluetooth Core specification v4.
nRF8001 Product Specification 4.
nRF8001 Product Specification 5 Physical product overview This section describes the physical properties of nRF8001. 5.1 Package and pin assignment nRF8001 is available in a 5 x 5 mm QFN32 package. The backplate of the QFN32 capsule must be grounded to the application PCB in order to achieve optimal performance. The physical dimensions of nRF8001 are presented in Chapter 15 on page 49.
nRF8001 Product Specification 5.2 Pin functions Pin 1 2 Pin name VDD DEC1 3 DEC2 4 XL2 5 XL1 6 7 ACTIVE TXD 8 9 10 VSS VDD RXD 11 12 SCK REQN 13 14 15 16 17 18 19 20 21 22 23 24 25 MOSI MISO N/C RDYN VSS VSS RESET VDD_PA ANT1 ANT2 VSS AVDD IREF 26 27 AVDD XC2 28 29 30 31 32 XC1 AVDD VSS VSS DCC Exposed die pad VSS Pin function Description Power Power supply (1.9 – 3.6 V) Power Regulated power supply output for decoupling purposes only.
nRF8001 Product Specification 6 Analog and physical features This chapter describes the analog and physical features of nRF8001. The following analog features are included in nRF8001: • • • • • 6.1 Bluetooth low energy RF transceiver Three on-chip reference oscillators DC/DC converter for extended battery life with coin-cell batteries Temperature sensor Battery monitor RF transceiver nRF8001 includes an integrated RF transceiver which is compliant with the Bluetooth Core specification v4.
nRF8001 Product Specification 6.2.2 16 MHz crystal oscillator The 16 MHz crystal oscillator is designed for use with an AT-cut quartz crystal in parallel resonant mode. To achieve correct oscillation frequency, the load capacitance must match the specification in the crystal datasheet. Figure 4. shows how the crystal is connected to the 16 MHz crystal oscillator. XC1 XC2 C1 C2 16 MHz crystal Figure 4.
nRF8001 Product Specification 6.2.4 32.768 kHz crystal oscillator The 32.768 kHz crystal oscillator is designed for use with a quartz crystal in parallel resonant mode. To achieve correct oscillation frequency, the load capacitance must match the specification in the crystal datasheet. Figure 5. on page 18 shows how the crystal is connected to the 32.768 kHz crystal oscillator. XL1 XL2 C1 C2 32.768 kHz crystal Figure 5. Circuit diagram of the nRF8001 32.
nRF8001 Product Specification 6.3 DC/DC converter nRF8001 incorporates linear supply voltage regulators and an optional step-down DC/DC converter. The internal linear regulators are always enabled. When enabled, the step-down DC/DC converter transforms the battery voltage to a lower internal voltage with minimal power loss. The converted voltage is then fed to the input of the linear regulators.
nRF8001 Product Specification 6.4 Temperature sensor nRF8001 incorporates an integrated temperature sensor. The temperature sensor reports the silicon temperature. The temperature sensor’s electrical specifications are defined in Chapter 12 on page 34. 6.4.1 Enabling the temperature sensor The temperature sensor is enabled through the ACI protocol, see Part B, section 24 on page 96.
nRF8001 Product Specification 7 Interfaces This chapter defines the physical interfaces for nRF8001: • • • 7.1 Application Controller Interface (ACI) Active signal Bluetooth low energy Direct Test Mode Interface Application Controller Interface (ACI) The Application Controller Interface (ACI) enables an application controller to communicate with nRF8001.
nRF8001 Product Specification The data exchanges on the ACI interface are split into two types: • • Commands – Exchanges that are initiated by the application controller, including data that is sent from the application controller to nRF8001. Events – Exchanges that are initiated by nRF8001, including data that is sent from nRF8001 to the application controller.
nRF8001 Product Specification 7.1.3.1 RDYn line The application controller must, at all times, have the RDYn line configured as input with pull-up drivers. At power on reset and wake up from sleep scenarios, the RDYn level is valid after 62 ms from reset or wake up. RESET RDYn 62 ms Not defined Figure 9. RDYn line functionality Note: The supply rise time is not included in the power up sequence shown in Figure 9. 7.1.4 ACI command exchange Figure 10.
nRF8001 Product Specification 7.1.5 ACI event exchange Figure 11. shows the signaling in an ACI event exchange from nRF8001 to the application controller. REQN RDYN SCK .... MOSI .... MISO debug byte length byte ACI byte1 .... ACI byteN End of transmission Slave ready Figure 11. Receiving an ACI event from nRF8001 The application controller receives the ACI event by performing the following procedure: 1. 2. 3. nRF8001 sets the RDYN pin to ground.
nRF8001 Product Specification 7.1.7 SPI timing The signaling and timing of each byte transaction for the nRF8001 SPI interface are shown in Figure 12. and Figure 13. on page 26. Critical timing parameters are listed in Table 4. on page 26 REQN Tcwh Trr_high RDYN ˜ T rr Tcc Tch Tcl Tcch ˜ SCK Tdh Tdc ˜ MOSI ˜ Tcd ˜ Tcsd MISO ˜ Figure 12. Application controller initiated packet SPI timing Revision 1.
nRF8001 Product Specification REQN Tcwh Trr_high ˜ RDYN SCK ˜ ˜ Tcc Tcl Tch Tcch Tdh Tdc ˜ MOSI ˜ Tcd Tcdz ˜ Tcsd MISO ˜ Figure 13.
nRF8001 Product Specification 7.2 Active signal The active signal is an information signal provided by nRF8001. It indicates that the nRF8001 radio is active. The active signal can be used for the following purposes: • • • As a trigger for the application controller to do any activity before the radio becomes active. See Figure 14. To limit activity in the application controller to maintain minimum peak current load on the battery.
nRF8001 Product Specification 7.3.1 Direct Test Mode interface characteristics The DTM UART interface features: • • • • • • 7.3.2 Two-wire UART interface (TXD/RXD) Baud rate: 19200 8 data bits No parity 1 stop bit No flow control (meaning no RTS/CTS) Functional description The DTM is activated using the Application Controller Interface (ACI), see Section 24.1 on page 96 for more information.
nRF8001 Product Specification 8 nRF8001 configuration nRF8001’s hardware and protocol parameters are configured through the nRFgo Studio (nRF8001 Configuration menu option), see Part B, Section 22.3 on page 81. These parameters may be written to non-volatile memory and are permanently stored through all power modes, see chapter 9 on page 31. These parameters are available from the Hardware Settings and the GAP Settings tabs in nRFgo Studio.
nRF8001 Product Specification Hardware settings Timing parameters Description Preferred slave connection parameters for L2CAP connection update command: • Set maximum connection interval • Set minimum connection interval • Set slave latency • Set connection supervision timeout For more information, see Bluetooth Core specification v4.0, Volum 3, Part C, Section 9.3.9 ‘Connection Parameter Update Procedure’. Minimum size of encryption key length acceptable for the Minimum application.
nRF8001 Product Specification 9 Data storage and memory retention Data stored in nRF8001 is either stored in volatile or non-volatile memory, depending on the type of data. In this document, data is differentiated into two categories; static and dynamic data. Static data: nRF8001 can be configured through the ACI to hold hardware and protocol parameters, see Part B, section 22.3 on page 81.
nRF8001 Product Specification 10 Absolute maximum ratings Maximum ratings are the extreme limits to which nRF8001 can be exposed without permanently damaging it. Exposure to absolute maximum ratings for prolonged periods of time may affect nRF8001’s reliability. Table 6. specifies the absolute maximum ratings for nRF8001. Parameter Supply voltages VDD VSS I/O pin voltage VIO Temperatures Storage temperature Minimum Maximum Unit -0.3 +3.6 0 V V -0.3 VDD+0.3 V V -40 +125 C Table 6.
nRF8001 Product Specification 11 Operating conditions The operating conditions are the physical parameters that nRF8001 can operate within. The operating conditions for nRF8001 are defined in Table 7. Symbol VDD VDDDC tR_VDD TA Parameter (condition) Supply voltage Supply voltage with DC/DC converter enabled Supply rise time (0V to 1.9 V) Operating temperature Notes Min 1.9 2.3 1 µs -40 Table 7. Operating conditions Revision 1.2 Page 33 of 161 Nominal 3.0 3.0 Max 3.6 3.
nRF8001 Product Specification 12 Electrical specifications This chapter contains electrical specifications for signal levels, radio parameters and, current consumption. The test levels referenced are defined in Table 8. Test level I Description By design (simulation, calculation, specification limit) Prototype verification at EOC Verified at EOC in accordance with JEDEC47 (3 lots x 10 samples) 100% test at NOC II III IV Table 8. Test level definitions 12.
nRF8001 Product Specification Symbol PRF P-6 P-12 P-18 BW20dB PRF1.1 PRF2.1 Test level I Parameter (condition) Maximum output power Output power setting Output power setting Output power setting 20dB signal bandwidth 1st adjacent channel power 2nd adjacent channel power Notes Min Nom Max Unit 0 -6 -12 -18 670 -25 -40 4 dBm dBm dBm dBm kHz dBc dBc Max Unit 1 I I I 1. Antenna load impedance = 15 Ω + j88 Table 11.
nRF8001 Product Specification 12.4 Current consumption parameters The nRF8001 static current consumption is defined in Table 14. and Table 15. The dynamic current consumption is defined in Figure 15. on page 37. The operating conditions are: VDD = 3.0V, TA = 40ºC to +85ºC. The numbers in the column called Reference to figures 17 and 19 in Table 14. and Table 15. refer to the numbers found in Figure 17. on page 39 and Figure 19. on page 41.
nRF8001 Product Specification Symbol Parameter (condition) IRX_DC Peak current, receiver active Peak current, transmitter active, POUT = 0 dBm Peak current, transmitter active, POUT = -6 dBm Peak current, transmitter active, POUT = -12 dBm Peak current, transmitter active, POUT = -18 dBm Peak current when switching between receive and transmit Peak current for host processing Peak current for LL processing Standby current Current drain between connection/ advertising events ACI = active mode, 32 kHz Osc
nRF8001 Product Specification Figure 16. shows the current consumption in Iidle mode with the 32.768 kHz oscillator active and in Isleep mode over the full temperature sensor range.. Figure 16. Current consumption in Iidle and Isleep with DC/DC converter not active Revision 1.
nRF8001 Product Specification 13 Dynamic current consumption To predict battery lifetime, it is important to understand how the hardware and Bluetooth low energy protocol parameters influence the overall power consumption. The connection and advertising events consist of a sequence of radio transmissions, each of which has individual current drain. The average power consumption of an event is calculated by integrating the current drain over the duration of the event.
nRF8001 Product Specification connection interval. The communication time is defined as the time that the Bluetooth low energy devices maintain the physical radio connection. It consists of one or more connection events separated in time by the connection interval. Isleep is defined as the current consumption between communication intervals. Segment b) of Figure 17. on page 39 illustrates the periodicity of the connection interval.
nRF8001 Product Specification 13.2 Current consumption - advertising Figure 19. illustrates the principle of current drain over time for a typical Bluetooth low energy device that is advertising. IVDD IRX ITX ITFS IMCU_HOST IMCU_LL IStandby Iidle 1 4 3 25 4 3 25 4 3 2 5 6 Figure 19. Current consumption over time for a typical nRF8001 advertising event Revision 1.
nRF8001 Product Specification Each advertising event consists of the following states and operations (the numbers below correspond to the numbers displayed in Figure 19. on page 41): 1. 2. 3. 4. 5. 6. Radio pre-processing period Active radio receive time Radio Inter Frame Space (T_IFS) Active transmit time Link layer post processing period Data post processing period, enabled only if data has been received Figure 20.
nRF8001 Product Specification 13.3 Current consumption calculation examples You can calculate the average current consumption using the nRFgo Studio Current Consumption Calculator. For more information on nRFgo Studio, visit www.nordicsemi.com. A set of typical profile scenario examples are presented below for different use cases based on typical profile scenarios. The current consumption values are calculated by the nRFgo Studio Current Consumption Calculator. 13.3.
nRF8001 Product Specification 13.3.2 Estimated lifetime for heart rate profile The heart rate profile typically has the following connection parameters: • • • • • • • • 1 hour per day connected. 1 second connection interval when connected. Data indicated every second, 4 bytes. Peripheral device is a server and indicates data. Pipe used: TX-Ack pipe. No encryption used. Total system sleep clock accuracy ± 300 ppm. 220 mAh coin cell battery.
nRF8001 Product Specification 13.4 Recommendations for low power operation Obtaining low power operation and long battery lifetime is a compromise between cost and performance. Here are some recommendations for obtaining suitable battery lifetimes: • • • • • Use a reference source derived from an external high accuracy 32 kHz crystal source instead of the internal 32 kHz RC oscillator. Improving the total timing accuracy within the system can significantly reduce power consumption.
nRF8001 Product Specification 14 External component requirements and recommendations The tables in this chapter specify the crystal parameters that are required for nRF8001 to function and meet the Bluetooth low energy specification. Table 18. specifies the requirements for the 16 MHz crystal. Table 19. on page 47 specifies the requirements for the 32.768 kHz crystal. 14.
nRF8001 Product Specification 14.2 External 16 MHz clock The nRF8001 may be used with an external 16 MHz clock applied to the XC1 pin. An input amplitude of 0.8 V peak-to-peak or higher is recommended to achieve low current consumption and a good signal-tonoise ratio. The DC level is not important as long as the applied signal never rises above VDD or drops below VSS. The XC1 pin will load the microcontrollers crystal with approximately 5 pF in addition to PCB routing. XC2 shall not be connected.
nRF8001 Product Specification 14.4 Reset The RESET line should be held low for a minimum duration of 200 ns for the nRF8001 to reset. 14.5 Antenna Matching and Balun The ANT1 and ANT2 pins provide a balanced RF connection to the antenna. The pins must have a DC path to VDD_PA, either through an RF choke or through the center point in a balanced dipole antenna. A load impedance at ANT1 and ANT2 of 15 Ω + j88 Ω is recommended for maximum output.
nRF8001 Product Specification 15 Mechanical specifications nRF8001 is packaged in a QFN32 5×5×0.85 mm, 0.5 mm pitch. D D2 32 31 L 1 2 E2 E 2 1 K 32 31 TOP VIEW e b BOTTOM VIEW A A1 SIDE VIEW Package QFN32 A3 A A1 A3 b D, E D2, E2 0.80 0.00 0.18 4.9 3.50 0.85 0.02 0.20 0.25 5.0 3.60 0.90 0.05 0.30 5.1 3.70 e K L 0.20 0.35 0.5 0.40 0.45 Table 20. QFN32 dimensions in mm Revision 1.
nRF8001 Product Specification 16 Ordering information 16.1 Package marking N R F D 8 0 0 1 Y Y W W L 16.2 X L Abbreviations Abbreviation 8001 D X YY WW LL Definition Product number Build Code, that is, unique code for production sites, package type and test platform "X" grade, that is, Engineering Samples (optional) Two-digit year number Two-digit week number Two-letter wafer-lot number code Table 21. Abbreviations 16.3 Product options 16.3.
nRF8001 Product Specification 17 Reference circuitry 17.1 Schematic for nRF8001 with DC/DC converter enabled C1 12pF X1 16MHz AVDD L5 15nH C2 12pF C7 1μF GND L4 10μH AVDD GND C8 1.0nF VCC_nRF GND C11 33nF GND nRF8001 AVDD VSS ANT2 ANT1 VDD_PA RESET VSS VSS GND GND 3.9nH 5.6nH GND C3 2.2nF C4 N/C U1 GND nRF8001 GND RESET RDYN C12 100nF RXD SCK REQN MOSI MISO ACTIVE TXD C6 1.2pF L2 Figure 21. nRF8001 schematic, with DC/DC converter enabled Revision 1.2 1.8pF L1 8.
nRF8001 Product Specification 17.2 Layout No components on bottom layer Top silk screen Top view 17.3 Bottom view Bill of Materials Designator C1, C2 C3 C4 C5 C6 C7 C8 C9 C10, C12 C11 L1 Value 12 pF 2.2 nF NA 1.8 pF 1.2 pF 1.0 µF 1.0 nF 4.7 µF 100 nF 33 nF 8.2 nH Footprint 0402 0402 0402 0402 0402 0603 0402 0603 0402 0402 0402 Comment NP0 ± 2% X7R ± 10% Not mounted NP0 ± 0.1 pF NP0 ± 0.1 pF X5R ± 10% X7R ± 10% X5R ± 10% X7R ± 10% X7R ± 10% High frequency chip inductor ± 5% L2 5.
nRF8001 Product Specification 17.4 Schematic for nRF8001 with DC/DC converter disabled C1 12pF X1 16MHz C2 12pF VCC_nRF GND GND C8 1.0nF GND C13 GND 5.6nH GND C4 N/C U1 GND nRF8001 GND RESET Figure 22. nRF8001 schematic, with DC/DC converter disabled Revision 1.2 C6 1.2pF L2 C12 100nF GND 1.8pF L1 8.2nH C3 2.2nF RDYN X2 32.768kHz ACTIVE TXD 15pF GND 3.
nRF8001 Product Specification 17.5 Layout No components on bottom layer Top silk screen Top view 17.6 Bottom view Bill of Materials Designator C1, C2 C3 C4 C5 C6 C8 C9, C10, C12 C11 C13, C14 L1 Value 12 pF 2.2 nF NA 1.8 pF 1.2 pF 1.0 nF 100 nF 33 nF 15 pF 8.2 nH Footprint 0402 0402 0402 0402 0402 0402 0402 0402 0402 0402 Comment NP0 ± 2% X7R ± 10% Not mounted NP0 ± 0.1 pF NP0 ± 0.1 pF X7R ± 10% X7R ± 10% X7R ± 10% NP0 ± 5% High frequency chip inductor ± 5% L2 5.
nRF8001 Product Specification Part B: The nRF8001 Application Controller Interface (ACI) The Application Controller Interface (ACI) is a bidirectional serial interface that enables generic application controllers to set up and operate nRF8001. Figure 23. illustrates how nRF8001 uses the ACI to logically connect to the application controller.
nRF8001 Product Specification 18 Operating principle Figure 24. illustrates the operating principle of the ACI in a typical application. ACI information traffic is bidirectional; control is exerted by the application controller and nRF8001 responds to ACI commands. nRF8001 may also independently send information to the application controller and all information between the two devices is structured in variable length packets.
nRF8001 Product Specification Information exchange can be divided into four typical scenarios as illustrated in Figure 24. on page 56 1. System command – System event The application controller sends a system command and receives acknowledgment from nRF8001 in the form of an event. 2. System event nRF8001 sends an event to the application controller triggered by a predefined condition. 3.
nRF8001 Product Specification 19 ACI packet types This chapter defines the packet types sent or received on the ACI. 19.1 System commands System commands are commands sent by the application controller to nRF8001. These commands control nRF8001 configuration, operating mode, and behavior. 19.2 Data commands Data commands are commands sent by the application controller to nRF8001. Data commands are used when application data traffic exchange between nRF8001 and a peer device is required.
nRF8001 Product Specification 20 Service pipes A key activity in a Bluetooth low energy application is accessing and exchanging specific application data contained in the Server setup and/or the Client. Application data can be stored locally (in the nRF8001) and remotely (in the peer device). 20.1 Functional description In nRF8001, the concept of service pipes is used to simplify access to service characteristics in a Client and/or Server.
nRF8001 Product Specification Multiple service pipes can be assigned to a specific characteristic value depending on the application. The transmit and receive service pipes are described in section 20.4 on page 61 and section 20.5 on page 66. Figure 26. on page 60 illustrates how different service pipes can be assigned to two separate characteristics. Both service pipe 1 and 2 will access the same data, but with different pipe features.
nRF8001 Product Specification 20.4 Transmit service pipes Transmit pipes enable the transfer of application data to a peer device. A transmit pipe is associated with a Characteristic declaration and a Characteristic Property defined in the service pipe configuration. When acknowledgment is enabled, a transmit is acknowledged by the peer device. A DataAckEvent is generated by nRF8001 upon receiving the acknowledgment. Table 26.
nRF8001 Product Specification SERVICE PIPE – TX or TX-ACK (Local Store) Application controller nRF8001 Peer GATT Server ATT: Write Request (Handle=Client Char. Conf., Data=0x0001) PipesStatusEvent (PipesOpen, PipesClosed) ATT: Write Response Figure 27. Transmit pipe opening; local data storage 20.4.2 Data transfer on a transmit pipe Figure 28. through Figure 31.
nRF8001 Product Specification SERVICE PIPE - ”TX-ACK” (Local store) Application controller nRF8001 Peer Local GATT Server SendData (PipeNumber, Data) ATT: Handle Value Indication (Handle=Characteristic, Data) ATT Timer Radio Acknowledgment for ATT: Handle Value Indication DataCreditEvent ATT: Handle Value Comfirmation () DataAckEvent (PipeNumber) Figure 29.
nRF8001 Product Specification SERVICE PIPE - ”TX” (Remote Store) Application controller SendData (PipeNumber, Data) nRF8001 Peer GATT Client Remote GATT Server ATT: Write Command (Handle, Data) DataCreditEvent Radio Acknowledgement for ATT:Write Command Figure 31. Data transfer on a transmit pipe; acknowledgment enabled and data stored remotely Revision 1.
nRF8001 Product Specification 20.4.3 Error events Two events can be issued and returned to the application controller in the case of data transfer failure: • • If the failure is caused by loss of connection, a DisconnectedEvent is issued and returned to the application controller. If the failure is related to the data transfer, a PipeErrorEvent is issued and returned to the application controller. Revision 1.
nRF8001 Product Specification 20.5 Receive service pipes Receive pipes enable the reception of application data from a peer device. A receive pipe is associated with a Characteristic declaration defined in the service pipe setup. When application data is received from the peer, nRF8001 sends a DataReceivedEvent to the application controller. Acknowledgment and auto acknowledgment may be enabled for receive pipes.
nRF8001 Product Specification Data location Remote Receive pipe feature Ack Request Auto No Functional description • • • Remote No Yes • • • Receive indication from Server (peer device). Upon receiving the indication, nRF8001 generates a DataReceivedEvent containing the updated value. nRF8001 will automatically respond to the peer with a Handle Value Confirmation. nRF8001 sends a Read Request to the Read Server (peer device) Peer device responds, returning the requested data.
nRF8001 Product Specification 20.5.1 Opening a receive pipe Remote receive pipes and remote receive pipes with acknowledge require opening prior to use. Opening is initiated by the application controller (see section 24.19 on page 120 for information on the OpenRemotePipe command). Once opened by the application controller, the pipe(s) will be listed in the OpenPipes bitmap returned by the PipesStatusEvent. Figure 32. shows the sequence of events required to open a remote receive pipe.
nRF8001 Product Specification SERVICE PIPE - ”RX” or RX_ACK (Remote store) Stopping data being sent from the Peer device Application Controller nRF8001 Peer GATT Server GATT Client CloseRemotePipe (PipeNumber) CommandResponseEvent (Opcode, Success) ATT: Write Request (Handle=Client Char. Conf., Data) ATT: Write Response (-) PipeStatusEvent (Service discovery completed, PipesOpen, PipesClosed) Figure 33. Receive pipe closing; data stored remotely 20.5.
nRF8001 Product Specification SERVICE PIPE - ”RX ACK” (Local Store) Appl. Controller nRF8001 Peer Local GATT Server ATT: Write Request (Handle, Data) DataReceivedEvent (PipeNumber, Data) Send Data Ack (PipeNumber) Data store ATT: Write Response () Radio acknowledgment for write response DataCreditEvent Figure 35. Data transfer on a receive pipe; acknowledgment enabled and data stored locally SERVICE PIPE - ”RX_ACK_AUTO” (Local Store) Appl.
nRF8001 Product Specification SERVICE PIPE - ”RX-ACK” (Remote store) Appl. Controller Device Peer GATT Server ATT: Handle Value Indication (Handle=Characteristic, Data) DataReceivedEvent (PipeNumber, Data) DataAck (PipeNumber) ATT: Handle Value Comfirmation (-) DataCreditEvent Radio acknowledgement for handle value confirmation Figure 38.
nRF8001 Product Specification SERVICE PIPE - ”RX_REQ” (Remote Store) Application Controller nRF8001 Peer GATT Client RequestData (PipeNumber) Remote GATT Server ATT: Read Request (Handle) ATT timer ATT: Read Response(Handle, Data) Stop ATT timer DataReceivedEvent (PipeNumber, Data) Figure 40. Data transfer on a receive pipe after data request received, data stored remotely 20.5.4 Error events No error event is ever generated on a receive pipe.
nRF8001 Product Specification Use the ACI Connect, ACI Bond or ACI Broadcast (uses non-connectable Advertising) to broadcast the Characteristic data. Note: In the nRFgo Studio tool for nRF8001 configuration, select the Service Data in the GAP Setting tab to allow the Service Data to be Advertised. Choose the Connect for using the Broadcast pipe with ACI Connect, Bond for using the Broadcast Pipe with ACI Bond and Broadcast to use the Broadcast pipe with ACI Broadcast.
nRF8001 Product Specification 20.7 Set service pipe Set pipe enables writing of application data to the nRF8001. The stored application data can then be read from the peer device. The Set pipe is assigned for a Characteristic with the Read property. The ACI SetLocalData command is used to write the application data to the nRF8001.
nRF8001 Product Specification 21 Flow control ACI commands received by nRF8001 are executed using the First In, First Out (FIFO) principle. System and Data commands differ in the flow control scheme they enforce: • System commands must be confirmed as executed by nRF8001 before a new system command can be issued by the application controller. This implies that no system command can be sent before receiving an event from nRF8001 confirming the execution of the previous command.
nRF8001 Product Specification Application processor Data Credit 0 (2) 1 (2) 1 ACI DeviceStartedEvent (2) GetDeviceVersion CommandResponseEvent (2) 1 (2) 1 (2) 1 2 Connect CommandResponseEvent ConnectedEvent PipeStatusEvent (-1) 1 (-1) 0 (+1) 1 (-1) 0 SendData SendData Data Credit Event(1) SendData SendData (-0) 0 (+2) 2 PipeErrorEvent() DataCreditEvent(2) 1 : Credits may only be used while connected (after the Connected event) Figure 44. Flow control example Revision 1.
nRF8001 Product Specification If no credit event is received within 180 seconds after issuing a data command, then the application controller should issue the disconnect command to recover from this error condition1. Table 28. lists relevant ACI commands/events and lists their effect on the data command buffer memory.
nRF8001 Product Specification 21.3 Flow control initialization Before ACI commands are issued to nRF8001, the following conditions apply: • No commands must be sent before the DeviceStartedEvent has been received by the application controller. • Service pipes must be confirmed as open before data commands are issued. No data command shall be sent from the application controller before receiving the first PipeStatusEvent containing at least one open pipe. Revision 1.
nRF8001 Product Specification 22 Operational modes nRF8001 has four modes of operation; Sleep, Setup, Active, and Test. The application controller controls the nRF8001 operating modes by means of the ACI commands: Sleep, Wakeup, Setup, and Test. Discovered Services and bonding information are retained in all modes except Setup and Test since entering these mode will clear all dynamic data. To flush dynamic data requires a power reset of nRF8001. 22.
nRF8001 Product Specification nRF8001 mode dependencies are illustrated in the state machine chart in Figure 45. Setup() nRF8001 will enter Exit to Standby mode after completing the full Setup cycle or if the setup data has been stored in NVM (lock).
nRF8001 Product Specification 22.2 Sleep mode Sleep mode is used to preserve battery power when nRF8001 is not in a connection or actively broadcasting. Before entering Sleep mode, all connections must be terminated. When in sleep mode, all active connections are disconnected and no features are available. All configuration settings are retained in memory while in Sleep mode. No reconfiguration is required in order to resume normal operation. The ACI command Sleep initiates Sleep mode.
nRF8001 Product Specification Appl. controller Device DeviceStartedEvent ( Setup) Start device setup Setup(” setup data”) CommandResponseEvent (ACI_TRANSACTION_CONTINUE) ....
nRF8001 Product Specification Setup of GATT services involves configuration of the following: • • Local Services (Server), relevant remote services (Client) Applicable service pipes 22.3.2.1 UUID configuration and format All services and characteristics are identified by a 128 bit Universally Unique Identifier (UUID). Service and Characteristic UUIDs are either defined by the Bluetooth SIG or you may define your own.
nRF8001 Product Specification 22.3.3 Hardware settings Hardware settings represent the configuration of proprietary hardware specific parameters, such as: • • • 22.4 Clock sources and settings Radio settings nRF8001 hardware feature activation and settings (Active signal, antenna EIRP, DC/DC converter and so on) Active mode Active mode handles run time operation and application data exchange. Completing nRF8001 setup is required prior to entering Active mode.
nRF8001 Product Specification When in active mode, nRF8001 will start advertising in order to establish a connection to a peer device in the central role upon receiving the ACI commands Connect or Bond. A successful connection results in a transition to the connected state. Once connected, the nRF8001 initiates the service discovery procedure when required, see section 22.4.2 on page 85 for details. A timeout value is set for advertising.
nRF8001 Product Specification To minimize power consumption, the nRF8001 service discovery procedure is only executed when the existing pipe mapping is outdated or non-existent.
nRF8001 Product Specification Once bonded, nRF8001 will generate a ConnectedEvent followed by a BondStatusEvent and one or more PipeStatusEvent(s). Appl. controller Device Peer Bond(Timeout, AdvInterval) Command Response Event (Status,...) Advertising ..... Advertising Connect Request Connection established Connected Event (Addr type, Addr, ...) Pairing algorithm: Just Works .... SMP - PairingRequest(..) SMP - PairingResponse(..) Bond Status Event (...
nRF8001 Product Specification lost if the device is reset or disconnected from the supply voltage, or if the data is overwritten with new dynamic data using the WriteDynamicData procedure. For applications that disconnect the power supply between periods of activity, dynamic data may be stored in the application controller and retrieved when the power supply is restored.
nRF8001 Product Specification 22.6 RF PHY testing RF PHY testing can be performed using the UART interface command format as specified in Bluetooth Core specification v4.0, Volume 6, Part F, ‘Direct Test Mode’. Alternatively, DTM commands can be sent over the ACI using the command DtmCommand. When in Test mode, the RF PHY Direct test mode UART interface is active and can be connected to a validated Bluetooth low energy RF PHY tester or to a proprietary RF test system.
nRF8001 Product Specification 23 Protocol reference Figure 52. illustrates the required setup and decision process required prior to application data transfer.
nRF8001 Product Specification 23.1 Command and event overview Table 30. shows how the pipe types map to the Bluetooth Attribute protocol (see Bluetooth Core specification v4.0, Vol 3, part F).
nRF8001 Product Specification Packet Link to relevant section OP code CloseRemotePipe Section 24.26 on page 131 0x1F System events DeviceStartedEvent EchoEvent HardwareErrorEvent CommandResponseEvent ConnectedEvent DisconnectedEvent BondStatusEvent PipeStatusEvent TimingEvent DisplayKeyEvent KeyRequestEvent Section 26.1 on page 139 Section 26.2 on page 140 Section 26.3 on page 141 Section 26.4 on page 142 Section 26.5 on page 143 Section 26.6 on page 145 Section 26.7 on page 146 Section 26.
nRF8001 Product Specification Command Test Sleep GetDeviceVersion Echo Wakeup Header Parameter OP code length • TestFeature (1) 0x01 2 0x04 1 0x09 1 0x02 1..30 • Data (0..29) 0x05 1 GetBatteryLevel GetTemperature Setup 0x0B 0x0C 0x06 1 1 2..
nRF8001 Product Specification Command DtmCommand ReadDynamicData WriteDynamicData Header OP code length 0x03 3 0x07 1 0x08 3..29 RadioReset SetApplicationLaten cy SetKey 0x0E 0x19 1 4 0x1A 2 or 8 OpenAdvPipe BondSecRequest DirectedConnect 0x1B 0x1D 0x1E 9 1 1 Parameter • • • • DtmCommand (2) Sequence Number (1) SetupData (1..
nRF8001 Product Specification Command SendData RequestData SetLocalData SendDataAck SendDataNack Header OP code length 0x15 2..22 0x17 2 0x0D 3..22 0x16 0x18 2 3 Parameter • • • • • • • • ServicePipeNumber (1) Successful transfer: Data (1..20) DataCreditEvent (DataAckEvent)1 Failed transfer: DataCreditEvent PipeErrorEvent ServicePipeNumber (1) Successful reception: DataReceivedEvent Failed transfer: PipeErrorEvent ServicePipeNumber (1) CommandResponseEvent Data (1..
nRF8001 Product Specification 24 System commands System commands are commands used for nRF8001 configuration, operation mode control and runtime operations. 24.1 Test (0x01) Test enables (or disables) the nRF8001 test mode. 24.1.1 Functional description When in test mode, Direct Test Mode is enabled and ready to receive test commands as specified in the Bluetooth Core Specification v4.0, Vol. 6, Part F, ‘Direct Test Mode’. The physical test interface can be UART or ACI. Refer to section 22.
nRF8001 Product Specification 24.2 Echo (0x02) Echo (0x0E) tests the nRF8001 ACI transport layer. 24.2.1 Functional description Upon receiving an Echo command, nRF8001 returns an EchoEvent containing the identical command packet data to the application controller. The reception of a loopback packet confirms a working ACI transport layer. See the operating mode during which this command can be used in Table 31. on page 92.
nRF8001 Product Specification 24.3 DtmCommand (0x03) DtmCommand sends a Direct Test Mode command to the radio module through the ACI interface. 24.3.1 Functional description This command allows DTM control through the ACI, as an alternative to the UART interface. The specified DTM operation is invoked and DTM events are returned in the format of a CommandResponseEvent. See the operating mode during which this command can be used in Table 31. on page 92.
nRF8001 Product Specification 24.3.5 Bluetooth low energy procedures used This command invokes the following Bluetooth low energy functionality: • Bluetooth Core Specification v4.0, Volume 6, Part F, ‘Direct Test’. Revision 1.
nRF8001 Product Specification 24.4 Sleep (0x04) Sleep activates the nRF8001 Sleep mode. 24.4.1 Functional description When in Sleep mode, all active connections are disconnected and no device features are available. Sleep mode should be used whenever possible in order to preserve battery power. nRF8001 will remain in Sleep mode until receiving the Wakeup command. See the operating mode during which this command can be used in Table 31. on page 92.
nRF8001 Product Specification 24.5 Wakeup (0x05) Wakeup wakes up nRF8001 from Sleep mode. 24.5.1 Functional description Upon receiving the Wakeup command, nRF8001 is set to Standby mode. See the operating mode during which this command can be used in Table 31. on page 92. The command will return a command response event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. 24.5.
nRF8001 Product Specification 24.6 Setup (0x06) Setup uploads the configuration bit pattern generated by nRFgo Studio. 24.6.1 Functional description Setup is performed by issuing a consecutive series of Setup commands. The number and contents of the Setup commands required are defined by the nRFgo Studio output. See the operating mode during which this command can be used in Table 31. on page 92.
nRF8001 Product Specification 24.7 ReadDynamicData (0x07) ReadDynamicData extracts nRF8001 dynamic data for storage in the application controller. 24.7.1 Functional description This command reads the dynamic data from the nRF8001 volatile memory. The retrieved data can be stored in the application controller while power is disconnected from the nRF8001. The dynamic data is read out as a consecutive series of read dynamic data packets.
nRF8001 Product Specification 24.8 WriteDynamicData (0x08) WriteDynamicData restores dynamic data to nRF8001 volatile memory. 24.8.1 Functional description This command writes previously saved dynamic data back to the nRF8001 volatile memory. The dynamic data is written in a consecutive series of WriteDynamicData commands. The write cycle must be repeated until all dynamic data has been written to the nRF8001 volatile memory.
nRF8001 Product Specification 24.8.5 Bluetooth low energy procedures used None Revision 1.
nRF8001 Product Specification 24.9 GetDeviceVersion (0x09) GetDeviceVersion requests nRF8001 version information. 24.9.1 Functional description This command returns the nRF8001 version and configuration information. The information returned in the CommandResponseEvent may be requested by Nordic Semiconductor technical support when this is required. See the operating mode during which this command can be used in Table 31. on page 92.
nRF8001 Product Specification 24.10 GetDeviceAddress (0x0A) GetDeviceAddress returns the address of the nRF8001 device. See the operating mode during which this command can be used in Table 31. on page 92. The command will return a command response event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. 24.10.
nRF8001 Product Specification 24.11 GetBatteryLevel (0x0B) GetBatteryLevel measures the battery supply voltage level. 24.11.1 Functional description Upon receiving the GetBatteryLevel command, the supply voltage level is sampled and reported as a 2 byte number. See the operating mode during which this command can be used in Table 31. on page 92. The command will return a command response event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. 24.11.
nRF8001 Product Specification 24.12 GetTemperature (0x0C) GetTemperature (0x13) measures the ambient temperature. 24.12.1 Functional description Upon receiving the GetTemperature command, the temperature is measured and reported as a 2 byte number. See the operating mode during which this command can be used in Table 31. on page 92. The command will return a command response event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. 24.12.
nRF8001 Product Specification 24.13 RadioReset (0x0E) RadioReset resets the radio transceiver and forcibly terminates any active connection or advertisement. 24.13.1 Functional description This command resets the radio transceiver and returns nRF8001 to Standby mode. All dynamic data is retained in memory after execution of the RadioReset command. Executing RadioReset while in a connection forcibly terminates the connection and returns nRF8001 to Standby mode without generating a DisconnectedEvent.
nRF8001 Product Specification 24.14 Connect (0x0F) Connect starts advertising and establishes a connection with a peer device 24.14.1 Functional description nRF8001 configuration must be completed before issuing this command. See the operating mode during which this command can be used in Table 31. on page 92. The command will return a command response event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. 24.14.
nRF8001 Product Specification 1. 2. CommandResponseEvent DisconnectedEvent Data returned in the CommandResponseEvent is: • • • Command code: Connect Status: Success / Status code Response data: None 24.14.5 Bluetooth low energy procedures used This command starts the following GAP procedures: • • • • General Discoverable Mode20 Non-Discoverable Mode21 Undirected Connectable Mode22 Non-Bondable Mode23 20. 21. 22. 23. Bluetooth Core specification v4.0, Vol. 3, Part C (GAP), Sect. 9.2.
nRF8001 Product Specification 24.15 Bond (0x10) Bond starts advertising with the intent of setting up a trusted relationship with a peer device 24.15.1 Functional description nRF8001 configuration must be completed before this command is issued. See the operating mode during which this command can be used in Table 31. on page 92. The command will return a command response event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. 24.15.
nRF8001 Product Specification • • • Command code: Bond Status: Success / Error code Response data: None 24.15.5 Bluetooth low energy procedures used This command starts the following GAP procedures: • • Limited Discoverable Mode24 Bondable Mode25 24. Bluetooth Core specification v4.0, Vol. 3, Part C (GAP), Sect. 9.2.3 25. Bluetooth Core specification v4.0, Vol. 3, Part C (GAP), Sect. 9.4.3 Revision 1.
nRF8001 Product Specification 24.16 Disconnect (0x11) Disconnect terminates the connection with the peer device. See the operating mode during which this command can be used in Table 31. on page 92. The command will return a command response event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. 24.16.
nRF8001 Product Specification 24.17 SetTxPower (0x12) SetTxPower sets the output power level of the Bluetooth low energy radio. See the operating mode during which this command can be used in Table 31. on page 92. The command will return a command response event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. 24.17.
nRF8001 Product Specification 24.18 ChangeTimingRequest (0x13) ChangeTimingRequest initiates the connection parameter update procedure. 24.18.1 Functional description This command is used to request the peer device to change the connection timing. The command can be given both with or without the timing parameters specified. If the command is given without any timing parameters included, the timing request will use the timing values specified in nRFgo Studio as part of the device configuration setup.
nRF8001 Product Specification 24.18.4 Returned events Events are returned in the following order: 1. 2. Command response event. Timing event. The application controller should examine the Timing Event against the requested timing to verify that the link timing was changed successfully. Revision 1.
nRF8001 Product Specification Data returned in the CommandResponseEvent is: • • • Command code: ChangeTimingRequest Status: Success / Status code Response data: None Figure 53. illustrates the communication scenarios for the ChangeTimeRequest command. Connection Parameter Update Procedure Appl.
nRF8001 Product Specification 24.19 OpenRemotePipe (0x14) OpenRemotePipe opens a remote receive pipe from a peer device for data transfer. 24.19.1 Functional description This command is used to open service pipes. The Receive (Remote) pipe and the Receive with acknowledgment (Remote) pipe types are closed by default. Data cannot be received from the peer device on these service pipes unless the pipes are opened using the OpenRemotePipe command.
nRF8001 Product Specification 24.19.4 Returned events This command returns a CommandResponseEvent. It is then followed by a PipeStatusEvent reporting the result of the procedure and an updated pipe bitmap identifying the service pipes available for data transfer. In case of a failed procedure execution, a PipeErrorEvent is returned instead of the PipeStatusEvent. Data returned in the CommandResponseEvent is: • • • Command code: OpenRemotePipe Status: Success / Status code Response data: See Figure 32.
nRF8001 Product Specification 24.20 SetApplLatency (0x19) SetApplLatency sets the application latency. It is only usable if the connection is using slave latency. 24.20.1 Functional Description SetApplLatency subrates the slave latency. nRF8001 will listen on each subrated interval and only acknowledge the received packet from the central device if it has its MD (More Data) bit set to 1 or contains data. See the operating mode during which this command can be used in Table 31. on page 92.
nRF8001 Product Specification 24.20.4 Returned events This command returns a CommandResponseEvent. Data returned in the event is: • • • Command code: SetApplLatency Status: Success / Error code Response data: None 24.20.5 Bluetooth low energy procedures used This command uses subsections of the controller specification as defined in: • • Bluetooth Core specification v4.0, Volume 6, Part B Section 4.5.1, ‘Connection events’. Bluetooth Core specification v4.0, Volume 6, Part B Section 4.5.
nRF8001 Product Specification 24.21 SetKey (0x1A) SetKey sets the passkey that is used in the pairing procedure. This command should be sent after a Key Request event has been received. 24.21.1 Functional Description SetKey command is used only if the security I/O settings (see section 22.4.5 on page 86) are set to indicate to the peer device that MITM security is required. If MITM is not required then I/O settings should be set so that the security level is Just Works security.
nRF8001 Product Specification 24.21.5 Bluetooth low energy procedures used This command uses the following GAP procedures: • Bluetooth Core specification v4.0, Vol 3, Part C, Chapter 10 Revision 1.
nRF8001 Product Specification 24.22 OpenAdvPipe (0x1B) OpenAdvPipe sets the pipes that are used for advertising data. 24.22.1 Functional Description OpenAdvPipe command configures the advertisements pipes that broadcast data. The pipes start advertising data when enabled either through the Bond command (see section 24.15 on page 113), Connect command (see section 24.18 on page 117) or, the Broadcast command (see section 24.23 on page 128).
nRF8001 Product Specification 24.22.5 Bluetooth low energy procedures used None Revision 1.
nRF8001 Product Specification 24.23 Broadcast (0x1C) Broadcast enables a pipe to start sending advertisement data on non-connectable advertisement packets. 24.23.1 Functional Description Broadcast command starts nRF8001 advertising using non-connectable advertisement packets. The type of advertisement packet used is defined in the device configuration by using the nRFgo Studio setup tool. Any broadcast pipe that is enabled will have its local data sent in the advertisement packet.
nRF8001 Product Specification 24.24 BondSecurityRequest (0x1D) BondSecurityRequest command sends the Security Manager Protocol (SMP) Security Request Command. 24.24.1 Functional Description BondSecurityRequest command allows the application controller to initiate and send the SMP Security Request Command as described in the Bluetooth Security Manager protocol. The request can be initiated by the application controller under the following conditions: • • • nRF8001 is in Bond mode (see section 24.
nRF8001 Product Specification 24.25 DirectedConnect (0x1E) DirectedConnect command initiates Directed Advertisement (see Bluetooth Core specification v4.0, Vol 6, section 4.4.2.4) in nRF8001. 24.25.1 Functional Description DirectedConnect commands can be used only when bonded with the peer device. nRF8001 will advertise using directed advertisement packets for a fixed period of 1.28 seconds. Device configuration must be completed before running the Directed Connect command.
nRF8001 Product Specification 24.26 CloseRemotePipe (0x1F) CloseRemotePipe closes a remote receive pipe (with or without acknowledgement) from a peer device. 24.26.1 Functional description This command is used to close service pipes which have been opened by the OpenRemotePipe command. This command can be used only after the OpenRemotePipe command has been successfully completed. Once the pipe has been closed, it will be listed in the PipeClosed bitmap.
nRF8001 Product Specification See section 20.5.2 on page 68 for an MSC illustrating the use of the CloseRemotePipe command. 24.26.5 Bluetooth low energy procedures used This command uses the following GATT procedures29: • • • Write Characteristic Value (CCCD configuration) Characteristic Value Notification (pipe without acknowledgment feature) Characteristic Value Indication (pipe with acknowledgment feature) 29. Bluetooth Core specification v4.0, Vol. 3, Part G, Chapter 4.2 Revision 1.
nRF8001 Product Specification 25 Data commands Data commands are commands that either aim to transfer, or receive, application data when nRF8001 is in a connected state with a peer device. 25.1 SetLocalData (0x0D) SetLocalData sets a local Characteristic Value or Characteristic Descriptor. 25.1.1 Functional description The SetLocalData command is used to set data stored in the local server (Server) through the associated service pipe.
nRF8001 Product Specification 25.1.5 Bluetooth low energy procedures used None Revision 1.
nRF8001 Product Specification 25.2 SendData (0x15) SendData sends data to a peer device through a transmit service pipe. See the operating mode during which this command can be used in Table 32. on page 92. The command will return a Command Response Event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. 25.2.1 Message format Message field/parameter Value size Data value (bytes) Description Header Length Command 1 1 Content ServicePipeNumber Data 2..
nRF8001 Product Specification 25.3 SendDataAck (0x16) SendDataAck confirms reception of data from a peer device. 25.3.1 Functional description This command is used in conjunction with the DataReceivedEvent. When data is received on a receive pipe with the acknowledgment feature enabled, the application controller shall respond with a SendDataAck command. When nRF8001 receives the SendDataAck command, a confirmation is sent to the peer device.
nRF8001 Product Specification 25.4 RequestData (0x17) RequestData requests data from a peer device through a service receive pipe. See the operating mode during which this command can be used in Table 32. on page 92. The command will return a Command Response Event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID when it is used in the incorrect mode. The command will use Credits based on Table 28, “ACI commands and events affecting command buffer memory credits,” on page 77. 25.4.
nRF8001 Product Specification 25.5 SendDataNack (0x18) SendDataNack negatively acknowledges (nacks) reception of data from a peer device. 25.5.1 Functional Description SendDataNack can be used after receiving a DataReceivedEvent. When data is received on a pipe that requires an acknowledgement, the application controller may nack the data. When nRF8001 receives the SendDataNack command it will send an attribute protocol error response to the peer device.
nRF8001 Product Specification 26 System Events System events are event packets that have been triggered by a predefined condition and are sent by nRF8001 to the application controller. 26.1 DeviceStartedEvent (0x81) DeviceStartedEvent indicates reset recovery or a state change. 26.1.1 Functional description This event is sent from nRF8001 to the external application controller when nRF8001 is reset or changing operating mode. 26.1.
nRF8001 Product Specification 26.2 EchoEvent (0x82) EchoEvent returns a copy of the Echo ACI message. 26.2.1 Functional description This event returns an identical copy of the PDU sent using the Echo command in Test mode. 26.2.2 Message format Message field/ parameter Header Length Event Content EchoMessage Value size Data value (bytes) 1 1 1..30 0x82 0..29 Description Packet length EchoEvent Echo data Table 86. ACI message structure for EchoEvent 26.2.
nRF8001 Product Specification 26.3 HardwareErrorEvent (0x83) DebugInfoEvent returns hardware error debug information. 26.3.1 Functional description This event is sent from nRF8001 to the external application controller to provide debug information. In case of firmware failure this event follows the DeviceStartedEvent. 26.3.
nRF8001 Product Specification 26.4 CommandResponseEvent (0x84) CommandResponseEvent confirms reception or execution of an ACI command. 26.4.1 Functional description This event is sent from nRF8001 to the external application controller in response to ACI commands. 26.4.2 Message format Message field/parameter Value size Data value (bytes) Description Header Length Event 1 1 Content CommandOpCode 3..30 0x84 1 Status 1 ResponseData 0..
nRF8001 Product Specification 26.5 ConnectedEvent (0x85) ConnectedEvent indicates that a connection has been established with a peer device 26.5.1 Functional description This event is sent from nRF8001 to the external application controller upon connection establishment with a peer device. 26.5.
nRF8001 Product Specification 26.5.4 Bluetooth low energy procedures used None Revision 1.
nRF8001 Product Specification 26.6 DisconnectedEvent (0x86) DisconnectedEvent indicates the loss of a connection. 26.6.1 Functional description This event is sent from nRF8001 to the external application controller to notify the application controller that connection with the peer device has been lost. 26.6.
nRF8001 Product Specification 26.7 BondStatusEvent (0x87) BondStatusEvent returns the bonding procedure execution status 26.7.1 Functional description This event is sent from nRF8001 to the application controller upon successful execution of the bonding procedure. In case of a failed bonding procedure, a DisconnectedEvent will result instead of a BondStatusEvent. 26.7.
nRF8001 Product Specification 26.7.3 Returned values Parameter BondStatusCode Data value Description 0x00 Bond suceeded 0x01..0xFF Bond Failed, see section 28.2 on page 159 for more information 0x01 Status code generated locally BondStatusSource 0x02 BondStatus-SecMode1 - BondStatus-SecMode2 - BondStatus-KeyExchSlave - BondStatus-KeyExchMaster - Status code generated by the remote peer Levels supported in LE Security Mode 1 • bit0: level 1 • bit1: level 2 • bit2: level 3 • bit3..
nRF8001 Product Specification 26.8 PipeStatusEvent (0x88) PipeStatusEvent lists the pipe connection and availability status 26.8.1 Functional description This event is sent from nRF8001 to the external application controller whenever there is a change in service pipe availability status. The PipeStatusEvent returns two pipe lists in the form of two 64-bit bitmaps: • • PipesOpen: Available service pipes on which data can be received (or transmitted) without further action.
nRF8001 Product Specification Table 98. shows an example of a bitmap returned by a PipeStatusEvent..
nRF8001 Product Specification 26.8.3 Returned values Parameter PipesOpen PipesClosed Data value - - Description Bitmap where each of the bits 1 to 62 represents the service pipes with the number 1 to 62. Bit 63 is not in use. A "1" means that the corresponding pipe is open, while a "0" means that the pipe is unavailable. Bit 0 in the first byte contains the nRF8001 service discovery procedure execution status: • When set to 1, the nRF8001 initiated service discovery procedure has completed.
nRF8001 Product Specification 26.9 TimingEvent (0x89) TimingEvent returns the current connection timing information upon change of parameters. 26.9.1 Functional description This event is sent from nRF8001 to the external application controller when nRF8001 connects to a peer device or when the connection parameters are updated by a device in the central role. 26.9.
nRF8001 Product Specification 26.10 DisplayKeyEvent (0x8E) DisplayKeyEvent requests the application controller to display the 6 digit passkey. 26.10.1 Functional Description DisplayKeyEvent is used as part of the pairing procedure. If Man In The Middle (MITM) security and applicable IO capabilities for the peripheral application as defined in Table 5. on page 30 are set then this event is generated. Device configuration must be completed before DisplayKeyEvent is available. 26.10.
nRF8001 Product Specification 26.11 KeyRequestEvent (0x8F) KeyRequestEvent requests the application controller to enter the passkey. 26.11.1 Functional Description KeyRequestEvent is used as part of the pairing procedure. If MITM security and applicable IO capabilities for the peripheral application as defined in Table 5. on page 30 are set then this event is generated. Device configuration must be completed before KeyRequestEvent is available.
nRF8001 Product Specification 27 Data Events Data events are information packets related to application data transfer sent from nRF8001 to the application controller. 27.1 DataCreditEvent (0x8A) DataCreditEvent returns data command buffer credits. 27.1.1 Functional description This returns the number of data command buffer locations (credits) freed as a result of successful data command execution(s). 27.1.
nRF8001 Product Specification 27.2 PipeErrorEvent (0x8D) PipeErrorEvent reports a pipe transmission failure/error. 27.2.1 Functional description This event is sent from nRF8001 to the external application controller in the case of transmission failure. 27.2.2 Message format Message field/parameter Value size Data value (bytes) Description Header Length Event 1 1 Content ServicePipeNo 3..30 0x8D 1 ErrorCode 1 ErrorData 0..
nRF8001 Product Specification 27.3 DataReceivedEvent (0x8C) DataReceivedEvent indicates that data has been received from the peer device 27.3.1 Functional description This event is sent from nRF8001 to the external application controller when new data is received on a receive service pipe. 27.3.2 Message format Message field/parameter Value size (bytes) Data value 1 1 2..22 0x8C Description Header Length Event Content ServicePipeNo 1 Data 0..
nRF8001 Product Specification 27.4 DataAckEvent (0x8B) DataAckEvent indicates reception of data by the peer device 27.4.1 Functional description This event is sent from nRF8001 to the application controller when an acknowledgment is received from the peer device in response to data sent to it. 27.4.
nRF8001 Product Specification 28 Appendix 28.1 ACI Status Codes Table 115. lists the generic ACI status codes applicable for nRF8001.The status code is used to indicate the general command execution status or to identify the cause of an error.
nRF8001 Product Specification Status code 0x96 0x97 0x98 Name Description ACI_STATUS_ERROR_PIPE_STATE_INVALID ACI_STATUS_ERROR_INVALID_KEY_SIZE ACI_STATUS_ERROR_INVALID_KEY_DATA Pipe Error Event: Pipe state invalid for the selected operation Invalid key size provided Invalid key data provided Table 115. nRF8001 ACI Status codes 28.2 Bonding Status Codes Table 116. lists the status codes applicable for the BondStatusEvent. The status code is used to report the bonding procedure execution status.
nRF8001 Product Specification 28.3 Error Codes Table 117. lists the status codes applicable for the PipeErrorEvent. The error code is used to report an error related to data transfer or service pipe association. Refer to the Bluetooth Core specification for the latest set of error codes.
nRF8001 Product Specification 29 Glossary Term ACI CCCD CSRK DTM EDIV EOC EP-QDL ESR HV IMD IRK LTK MD MOQ MCU MSC NOC NVM OOR PCB PDU PICS PUID RF RoHS SDK UART VM Revision 1.