background image

 

NINA-B31 series - Getting Started 

 

UBX-18022394 - R02 

Use case examples

  

Page 16 of 26 

 

 

 

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 

[5]

 for more information about 

iBeacon. 

 

To change advertise packet on NINA-B31 to include iBeacon: 

AT+UBTAD=1AFF4C000215EBEFD08370A247C89837E7B5634DF52400010001C5 

 

To change Local Name to “Bluetooth Device”: 

AT+UBTSD=1109426C7565746F6F746820446576696365 

4.3

 

Set up Eddystone on NINA-B31 

Setup NINA-B31 to advertise Google Eddystone packets: 

 

This example shows  how to send an URL inside the advertisement packet; by nature, the 
advertisement packet is limited in size and the information is also limited. 

The payload normally contains a short version of an URL, for example 

https://goo.gl/Aq18zF.

The 

link is encoded to save space, but most smartphones can use this information to navigate to the 
advertised URL. See 

[6]

 for more information about Eddystone. 

 

To change advertise packet on NINA-B31 to include the Eddystone URL (in this example the URL 
will point to the u-blox home page) : 

AT+UBTAD=0303AAFE0D16AAFE10F801752D626C6F7807 

 

To change Local Name to “Bluetooth Device”: 

AT+UBTSD=1109426C7565746F6F746820446576696365 

4.4

 

Set up Eddystone with Extended advertising on NINA-B31 

Setup NINA-B31 to advertise Google Eddystone packets with Extended advertising: 

This example shows how to send an URL inside the advertisement packet. Extended advertising is a 
Bluetooth 5 feature that allows bigger advertising packets, and in this example we will advertise a full 
URL. 

 

Enable Extended advertising on NINA-B31. This command requires a restart. 

AT+UBTLECFG=29,1 

 

Store configuration 

AT&W 

 

Restart 

AT+CPWROFF 

 

To change advertise packet on NINA-B31 to include the URL (in this example, the URL will point to 
the u-blox NINA-B3 home page) : 

AT+UBTAD=0303AAFE2616AAFE10F801752D626C6F7800656E2F70726F647563742F6E696E61

2D62332D73657269657300 

 

To change Local Name to “Bluetooth Device”: 

AT+UBTSD=1109426C7565746F6F746820446576696365 

4.5

 

Change the NINA-B31 name 

NINA-B31 (Device A) is a Peripheral 

 

Set Local Name on NINA-B31 to  

Содержание NINA-B31 Series

Страница 1: ...les 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...

Страница 2: ...may hold intellectual property rights in the products names logos and designs included in this document Copying reproduction modification or disclosure to third parties of this document or any part t...

Страница 3: ...1 LED indications and buttons 13 3 2 Restore default serial settings 14 3 3 Restore factory settings 14 3 4 Enter the bootloader 14 3 5 Flashing the module 14 4 Use case examples 15 4 1 Connect two NI...

Страница 4: ...t using default physical layer 21 4 14 2 Define CODED phy using extended advertising and scanning 22 4 15Change Device Information values of NINA B31 22 4 16Write NINA B31 GPIO pin and read NINA B31 G...

Страница 5: ...NINA B31 module to automatically setup a connection and or accept an incoming connection using AT commands For a host this means that an existing serial cable can be replaced by a wireless solution in...

Страница 6: ...e server side sends the number of credits to the client using the credit indication and the client writes the number of credits to the server The credits correspond to the number of packets the remote...

Страница 7: ...eiver of data Every sender and receiver in a setup is referred to as a peer Thus a peer is capable of either receiving or sending data There are two kinds of peer classes in the serial port adapter Lo...

Страница 8: ...server profile NINA B31 has the SPS enabled by default 2 4 2 Mbps physical layer PHY In Bluetooth 5 a new physical layer has been introduced This physical layer doubles the modulation rate as compared...

Страница 9: ...a terminal window though the characters can also be typically pasted instead The module leaves the command mode and enters data mode using the ATO1 ATO2 command It is also possible to toggle the UART...

Страница 10: ...s also possible to execute AT commands as part of the extended data mode protocol Hence it is not necessary to enter the command mode from the extended data mode Figure 5 Extended data mode No extende...

Страница 11: ...e AT UBTCFG command is used to set the maximum number of Bluetooth connections In data mode data is transmitted over air to all the connected devices and the data received from remote devices is inter...

Страница 12: ...hanged out of band Use the security mode 1 Bluetooth 2 1 auto accept security AT UBTSM 1 to start with It is highly recommended to analyze the security and if appropriate use a more secured solution f...

Страница 13: ...9 Figure 9 EVK NINA B31 Evaluation board The LED indicates what mode is currently active and what activity is currently in progress The following color indications are used See EVK NINA B3 User Guide...

Страница 14: ...seconds during power up the factory settings are restored You can also restore to the factory settings using the AT UFACTORY command followed by power off on 3 4 Enter the bootloader To enter the boot...

Страница 15: ...ss AT UDDRP 0 sps 112233445566 2 Startup NINA B31 in data mode AT UMSM 1 Store configuration AT W Restart NINA B31 AT CPWROFF Set up second NINA B31 as a Peripheral Device B NINA B31 has the u blox Se...

Страница 16: ...re information about Eddystone To change advertise packet on NINA B31 to include the Eddystone URL in this example the URL will point to the u blox home page AT UBTAD 0303AAFE0D16AAFE10F801752D626C6F7...

Страница 17: ...ces and its characteristics can be found at 8 and 9 AT UBTGSER 180D UBTGSER 30 Add a Heart Rate measurement characteristic with notification support AT UBTGCHA 2A37 10 1 1 UBTGCHA 32 33 Optionally cha...

Страница 18: ...handle 65535 from the UBTGDP and Discover all characteristic descriptors AT UBTGDCD 0 32 65535 UBTGDCD 0 32 33 2902 OK After finding the Client Characteristic Configuration descriptor 2902 use the des...

Страница 19: ...enabled smart phone when you touch the NFC antenna of NINA B31 with your smart phone Set URI to NFC tag AT UNFCURI 1 https www u blox com Enable NFC URI AT UNFCEN 2 Touch the NFC antenna of NINA B31 w...

Страница 20: ...orary Key AT UBTOTK 0 Read the random OOB Temporary Key AT UBTOTK UBTOTK 239FBA31E3A435B10AF28B5FEF47DDC1 Note the local address for pairing from Device B AT UMLA 1 UMLA D4CA6EB00613 Set up NINA B31 D...

Страница 21: ...data mode ATO1 4 14 Connect two NINA B31 using Coded PHY 4 14 1 Connect using default physical layer The default physical layer PHY is used when connecting two NINA B31 modules Set preferred PHY on bo...

Страница 22: ...ce A to Device B Create an SPS connection to Device B use AT UMLA 1 to find the address of device B AT UDCP sps 223344556677p Go to data mode on both devices ATO1 4 15 Change Device Information values...

Страница 23: ...PIOC 4 255 UGPIOC 5 255 UGPIOC 24 255 UGPIOC 25 255 UGPIOC 27 255 OK Set pin 2 as an input no resistor activated AT UGPIOC 2 1 0 Read the current value of pin 2 current value is 0 zero AT UGPIOR 2 UGP...

Страница 24: ...a Set Ready DTR Data Terminal Ready EDM Extended Data Mode EDR Enhanced Data Rate GATT Generic Attributes GPIO General Purpose Input Output HTTP Hypertext Transfer Protocol LED Light Emitting Diode NF...

Страница 25: ...cation Document No UBX 14044126 8 https www bluetooth com specifications gatt services 9 https www bluetooth com specifications gatt characteristics 10 u blox Low Energy Serial Port Service Protocol S...

Страница 26: ...onal Office China Beijing Phone 86 10 68 133 545 E mail info_cn u blox com Support support_cn u blox com Regional Office China Chongqing Phone 86 23 6815 1588 E mail info_cn u blox com Support support...

Отзывы: