NINA-B31 series - Getting Started
UBX-18022394 - R02
Use case examples
Page 15 of 26
4
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.
Set up first NINA-B31 as a Central (Device A)
•
Enable Central Role
AT+UBTLE=1
•
Default peer to Serial Port Service and always connected (use the address of Device B, if not known
execute
AT+UMLA=1
on Device B to find the local address)
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 Serial Port Service enabled by default:
•
Startup in data mode
AT+UMSM=1
•
Store configuration
AT&W
•
Restart
AT+CPWROFF
Now the blue LED on both devices should indicate that they are connected via SPS. You can test by
typing characters on one console and see them appear on the other console.
4.2
Set up iBeacon on NINA-B31
Set up NINA-B31 to advertise Apple iBeacon packets:
☞
This is only an example use case. Apple requires iBeacon license agreement if it is used in a
product.
iBeacon is a Manufacturer-specific event, and contains an 128 bit UUID such as D9B9EC1F-3925-
43D0-80A9-1E39D4CEA95C. Note that the byte order for the AT command use the reverse byte