Stand-alone bluetooth low energy modules (42 pages)
Summary of Contents for Ublox NINA-B31 Series
Page 1
Stand-alone Bluetooth 5 low energy modules Getting Started Abstract This document describes how to set up and use the NINA-B31 series Bluetooth 5 low energy module with the u-blox connectivity software. It also provides a technical overview of the NINA-B31 series. www.u-blox.com...
NINA-B31 series - Getting Started Document Information Title NINA-B31 series Subtitle Stand-alone Bluetooth 5 low energy modules Document type Getting Started Document number UBX-18022394 Revision and date 13-Sep-2018 Disclosure Restriction This document applies to the following products: Product name Type number...
NINA-B31 series - Getting Started Contents Document Information ..........................2 Contents ................................3 Introduction ............................. 5 1.1 Key features ..............................5 1.2 Modes of operation ............................. 5 1.3 u-blox Low Energy Serial Port Service (SPS) ..................6 1.4 NFC ................................6 Configuration ............................
Page 4
NINA-B31 series - Getting Started 4.14.1 Connect using default physical layer ....................21 4.14.2 Define CODED phy using extended advertising and scanning ..........22 4.15 Change Device Information values of NINA-B31 ................22 4.16 Write NINA-B31 GPIO pin and read NINA-B31 GPIO pin ..............22 Appendix ...............................
NINA-B31 series - Getting Started Introduction The NINA-B31 series are small stand-alone Bluetooth 5 low energy modules featuring full Bluetooth 5 support, a powerful Arm ® Cortex ® -M4 with FPU, and state-of-the-art power performance. The embedded low power crystal improves power consumption by enabling optimal power save modes.
For more information, see the u-blox Low Energy Serial Port Service Protocol Specification [10]. 1.4 NFC The NINA-B31 series includes NFC (Near Field Communication), which can be used to “touch” NINA-B31 to an NFC reader device to perform actions. NFC can simplify the connection process to a module and reduce the number of steps when provisioning an NINA-B31 module.
NINA-B31 series - Getting Started Configuration You can configure the NINA-B31 module according to your specific requirements by means of AT commands (see u-blox Short Range Modules AT Commands Manual [1]). The easiest way to get started is to use the u-blox s-center, which is a graphical user interface for sending the AT-commands (see s-center Product Summary [4]).
NINA-B31 series - Getting Started Example • sps://0012f3000001 A peer can be set up using either the default remote peer command AT+UDDRP or dynamically created using the connect peer command AT+UDCP. A connection is closed using AT+UDCPC. ☞ The Bluetooth low energy SPS service is enabled by default in NINA-B31 and it accepts incoming connections by default.
NINA-B31 series - Getting Started 2.6 Command mode, data mode, and extended data mode By default, NINA-B31 enters command mode and has to be reconfigured to start up in data mode or extended data mode. From the data mode or extended data mode, it is possible to enter the command mode by transmitting escape sequence to the module.
Page 10
NINA-B31 series - Getting Started Figure 4: Data mode The extended data mode is a simple protocol for the UART, which enables transmission of data to one specific remote device and also informs the remote device from where the data originated. It is also possible to execute AT commands as part of the extended data mode protocol.
NINA-B31 series - Getting Started 2.7 Multipoint It is possible to configure a module to support up to 8 parallel Bluetooth connections. These connections can be to 1 central and 7 peripherals in a multirole configuration. The AT+UBTCFG command is used to set the maximum number of Bluetooth connections.
NINA-B31 series - Getting Started 2.8 Bluetooth security There are six different security modes that support all kinds of use cases regarding the pairing procedure. All security modes use encryption. The encryption algorithm is a 128-bit cipher called E0. Security mode 1 and 2 are implemented to keep the same or similar behavior as for previous versions of u-blox Bluetooth products.
NINA-B31 series - Getting Started Evaluation board There are two NINA-B31 evaluation boards: • EVK-NINA-B311 has a NINA-B311 module with u-blox connectivity software and an antenna connector for connecting to external antennas. • EVK-NINA-B312 has a NINA-B312 module with u-blox connectivity software and an internal antenna (a unique 2.4 GHz metal sheet antenna soldered on to the module).
NINA-B31 series - Getting Started 3.2 Restore default serial settings If the SW2 button is pressed during power on, the module resets the serial settings and escape sequence to the default values. • Default serial settings are 115.2 kbps, 8N1 and HW flow control enabled •...
NINA-B31 series - Getting Started Use case examples ☞ Reset your devices to factory mode using the following AT commands before executing all use cases • Store configuration AT+UFACTORY • Restart NINA-B31 AT+CPWROFF 4.1 Connect two NINA-B31 using Bluetooth low energy Connect two NINA-B31 modules using Bluetooth low energy Serial Port Service (SPS), which connects automatically.
NINA-B31 series - Getting Started order. Together with the Major (2 bytes), Minor (2 bytes) and the Tx power (1 byte), it builds up the iBeacon advertise packet. Apple recommends the Local Name in the Scan Response packet. See for more information about iBeacon.
NINA-B31 series - Getting Started AT+UBTLN="u-blox NINA-B31" NINA-B31 (Device B) as a Central • Set Central Role on NINA-B31 AT+UBTLE=1 • Store configuration AT&W • Restart NINA-B31 AT+CPWROFF • Make a Device Discover to find Device A AT+UBTD +UBTD:112233445566p,-70,"u-blox NINA-B31",1,0F09752D626C6F78204E494E412D...
NINA-B31 series - Getting Started • Create an ACL connection AT+UBTACLC=112233445566 +UUBTACLC:0,0,112233445566p Use the connection handle 0 from the +UUBTACLC and Discover Services • AT+UBTGDP=0 +UBTGDP:0,1,9,1800 +UBTGDP:0,10,13,1801 +UBTGDP:0,14,22,180A +UBTGDP:0,23,29,01D7E9014FF344E7838FE226B9E15624 +UBTGDP:0,30,65535,180D After finding the “Heart Rate service” (180 D), use the start handle 30 and end handle 65535 from •...
NINA-B31 series - Getting Started AT+CPWROFF • Change escape character from default ‘+’ (ASCII 43) to ‘-‘ (ASCII 45) to make the escape sequence pass through Device A without getting detected as an escape sequence at Device B ATS2=45 •...
NINA-B31 series - Getting Started • Enable NFC OOB pairing AT+UNFCEN=1 • Touch the NFC antenna of NINA-B31 with the smart phone to initiate the pairing 4.12 Pair two NINA-B31 using Out-of-Band security mode Generate an OOB Temporary Key in NINA-B31. Another NINA-B31 can then use this OOB Temporary Key to authenticate during the pairing procedure.
NINA-B31 series - Getting Started • and for Rx AT+UBTLECFG=28,3 Connect two NINA-B31 according to the use case in section 4.1. When the connection is established, request a new PHY configuration for the connection (Device B) • Go to AT mode by sending the escape sequence: 1.
NINA-B31 series - Getting Started • If the remote device (Device B) accepts the request, a successful event will be received +UUBTLEPHYU:0,0,4,4 • Go to data mode (on both devices) ATO1 4.14.2 Define CODED phy using extended advertising and scanning Set up Extended advertising and scanning on both devices (Device A + Device B) •...
Page 23
NINA-B31 series - Getting Started Configure, write, and read GPIO pin using AT command. See NINA-B3 System Integration Manual [11] for GPIO pin id mapping. Preconditions • Connect GPIO pin 2 on NINA-B31 (Device A) to GPIO pin 25 on NINA-B31 (Device B) Set up NINA-B31 (Device A) GPIO pin •...
NINA-B31 series - Getting Started Appendix A Glossary Abbreviation Definition Asynchronous Connection-Less Basic Rate Data Set Ready Data Terminal Ready Extended Data Mode Enhanced Data Rate GATT Generic Attributes GPIO General Purpose Input/Output HTTP Hypertext Transfer Protocol Light-Emitting Diode Near Field Communication...
NINA-B31 series - Getting Started Related documents [1] u-blox Short Range Modules AT Commands Manual, Document No. UBX-14044127 [2] NINA-B3 series Data Sheet, Document No. UBX-17052099 [3] EVK- NINA-B3 User Guide, Document No. UBX-17056481 [4] s-center Product Summary, Document No. UBX-15020022 https://developer.apple.com/ibeacon/...
NINA-B31 series - Getting Started Contact For complete contact information, visit us at www.u-blox.com. u-blox Offices North, Central and South America Headquarters Asia, Australia, Pacific Europe, Middle East, Africa u-blox America, Inc. u-blox Singapore Pte. Ltd. u-blox AG Phone: +1 703 483 3180...
Need help?
Do you have a question about the NINA-B31 Series and is the answer not in the manual?
Questions and answers