NINA-B31 series - Getting Started
UBX-18022394 - R02
Use case examples
Page 18 of 26
•
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
OK
•
After finding the “Heart Rate service” (180 D), use the start handle
30
and end handle
65535
from
the
+UBTGDP
, and Discover all characteristics of service
AT+UBTGDCS=0,30,65535
+UBTGDCS:0,31,10,32,2A37
OK
•
After finding the “Heart Rate Measurement characteristics” (2A37), use the value handle
32
from
the
+UBTGDCS
and end 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 descriptor
handle
33
from the
+UBTGDCD
and subscribe to notifications of Heart Rate measurement value
changes
AT+UBTGWC=0,33,1
OK
Update and notify new value of Heart Rate measurement (Device A):
•
We can now set a new value (
50
) and send a notification from Device A (the GATT Server)
AT+UBTGSN=0,32,50
New value is notified to Device B:
•
An event is received when the remote side (Device A) sends a notification
+UUBTGN:0,32,50
4.8
Configure NINA-B31 over air
Set up NINA-B31 (Device A) that should be configured over air
•
Enable remote configuration through the SPS server
AT+UDSF=0,1
•
Enter data mode
ATO1
Set up NINA-B31 (Device B)
•
Enable Central Role
AT+UBTLE=1
•
Store configuration
AT&W
•
Restart