STM32WB Bluetooth® LE – AT command server Project

Revision as of 11:36, 21 April 2022 by Registered User (→‎ACI-HCI commands)

1. STM32WB - Extended advertising configuration for applications

M0: stm32wb5x_BLE_Satck_full_extended_fw.bin @0x080c7000 (CubeWB package v1.14.0)

M4: M4: BLE_p2pServer_Ext and BLE_p2pClient_Ext v1.14.0

The BLE_p2pServer_Ext and BLE_p2pClient_Ext application are available by downloading STM32CubeWB[1] release.

Application is compiled with following options in app_conf.h:  CFG_BLE_OPTIONS: default flags + SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV SHCI_C2_BLE_INIT_OPTIONS_CS_ALGO2 (mandatory in Extended Advertising PDUs) New parameters are defined in v1.14.0: CFG_BLE_MAX_ADV_SET_NBR and CFG_BLE_MAX_ADV_DATA_LEN. They are transmitted to the stack through ble_init_cmd_packet. 


New Scatter file to use (provided in M4 projects): Shared RAM for M4 has been reduced Part of SRAM2B is now used for M4, mailbox buffers


2. Applications description


3. Auxiliary packet introduction

The PDU payload of primary advertising channels can vary in length from 6 to 37 bytes. (6 bytes for addresses, remaining 31 bytes for data)
In Extended Advertising, secondary advertising channels are used to offload data

  • Up to 1650 bytes
  • Multiple and agnostic adverting sets

The advertising packets on primary channels contain the information in which secondary advertising channel and the offset to the start time the auxiliary data will be transmitted

Aux packet


4. Adv Extended NoConn_NoScan

Primary and auxiliary segments-NO SCANNABLE/NO CONNECTABLE
Segments timing implementation:

  • Both primary/auxiliary segments belong to the same scheduled slot for all fragmentations policy (length depends on data size)
  • Channel of AUX_ADV_IND (+request and response) are randomly selected when set is ACTIVATED
  • Chained channels follow a hopping of 1 increment
Example of no scannable/no connectable set


5. Adv Extended Scannable

Primary and auxiliary segments-SCANNABLE
The scannable undirected event type using the ADV_EXT_IND PDU allows any scanner to respond with a scan request to receive scan response data on the secondary advertising physical channel

  • Only Auxiliary segment could be scanned, and Data could only be contained in the scan response.
  • A scanner may send a scan request using the AUX_SCAN_REQ PDU on the same secondary advertising channel index as the received AUX_ADV_IND
Example of scannable set


6. Adv Extended Connectable

Primary and auxiliary segments- CONNECTABLE
The connectable directed advertising event type using ADV_EXT_IND allows an initiator to respond with a connect request on the secondary advertising physical channel to establish an ACL connection

  • After every AUX_ADV_IND PDU related to this event it sends, the advertiser shall listen for AUX_CONNECT_REQ PDUs on the same secondary advertising channel index.
Example of connectable set


7. ACI-HCI commands

Command Comment Use in application
aci_gap_adv_set_configuration Set the extended advertising configuration for one advertising set BLE_p2pServer_Ext
aci_gap_adv_set_adv_data Set the data used in extended advertising PDUs that have a data field BLE_p2pServer_Ext
aci_gap_adv_set_scan_resp_data Provide scan response data used during extended advertising BLE_p2pServer_Ext
aci_gap_adv_set_enable Enable or disable one or more extended advertising sets BLE_p2pServer_Ext
hci_le_read_maximum_advertising_data_length read the maximum length of data supported by the Controller for use as advertisement data or scan response data in an extended advertising event BLE_p2pServer_Ext
hci_le_read_number_of_supported_advertising_sets read the maximum number of advertising sets supported by the Controller at the same time during extended advertising BLE_p2pServer_Ext
aci_gap_adv_set_random_address Set the random device address of an advertising set configured to use specific random address BLE_p2pServer_Ext
aci_gap_adv_remove_set Remove an advertising set from the controller Not used
aci_gap_adv_clear_sets Aci_gap_adv_clear_sets Not used
hci_le_set_extended_scan_parameters set the extended scan parameters to be used on the advertising physical channels BLE_p2pClient_Ext
hci_le_set_extended_scan_enable enable or disable extended scanning BLE_p2pClient_Ext


8. HCI events

Command Comment Use in applications
hci_le_extended_advertising_report_event Indicate that a Bluetooth device has responded to an active scan or has broadcast advertisements that were received during a passive scan BLE_p2pClient_Ext
hci_le_advertising_set_terminated_event Indicate that the Controller has terminated advertising in the advertising sets specified by the Advertising_Handle parameter Not used
hci_le_scan_request_received_event Indicate that a SCAN_REQ PDU or an AUX_SCAN_REQ PDU has been received by the advertiser BLE_p2pClient_Ext
hci_le_scan_timeout_event Indicates that scanning has ended because the duration has expired Not used


9. GAP commands

9.1. GAP command - advertising set parameters – BLE_ADV_PARAM

Sets advertising parameters of the device:

entry_nb:
  • 1: 0,20ms,30ms,0
  • 2: 0,180ms,200ms,0
  • 3: 0,1s,2.5s,0
  • 0, <adv_type>, <adv_int_min>, <adv_int_max>
adv_type:
  • 0: connectable undirected advertising
  • 1: connectable directed advertising
  • 2: scannable undirected advertising
  • 3: not connectable undirected advertising
adv_int_min:
  • From 20 ms to 10240 ms (must be multiple of 0.625 ms)
adv_int_max:
  • From 20 ms to 10240 ms (must be multiple of 0.625 ms)

SET operation: <entry_nb>

AT+BLE_ADV_PARAM=2
OK
AT+BLE_ADV_PARAM=0,0,32,48
OK

QUERY operation: <entry_nb> <adv_type>, <adv_int_min>, <adv_int_max>, <own_addr_type>

AT+BLE_ADV_PARAM?
+BLE_ADV_PARAM:2,0,180.0,200.0,0
OK
AT+BLE_ADV_PARAM?
+BLE_ADV_PARAM:0,0,32.0,48.0,0
OK

9.2. GAP command - start/stop advertising – BLE_ADV

Start/stop advertising:

  • 0: stop advertising
  • 1: start advertising

If no param entered, use default values (config 1)
If predefined config, use (1,2 or 3)
If param entered, use the new parameters

SET operation: <enable>

AT+BLE_ADV=1
OK

QUERY operation: <enable>

AT+BLE_ADV?
+BLE_ADV:1
OK

9.3. GAP command - connection update – BLE_CONN_INT

Connection interval values:

conn_int_min: From 7,5 ms to 4000 ms (must be multiple of 1.25 ms)
conn_int_max: From 7,5 ms to 4000 ms (must be multiple of 1.25 ms) 

SET operation: <conn_int_min>,<conn_int_max>

AT+BLE_CONN_INT=125,150 
OK

QUERY operation: <conn_int_min>,<conn_int_max>

AT+BLE_CONN_INT?	 
+BLE_CONN_INT:125.00,150.00
OK

9.4. GAP command - clear the security database – BLE_CLEAR_DB

SET operation: <1>

AT+BLE_CLEAR_DB = 1
OK	

QUERY operation: no query for this command, it returns an error.

9.5. GAP command - sends a peripheral security request to the central – BLE_PERIPH_SEC_REQ

SET operation: <1>

AT+BLE_PERIPH_SEC_REQ = 1
OK

QUERY operation: No query for this command, it returns an error.

9.6. GAP command - confirms or not the numeric comparison value in secure Connection - BLE_PAIRING_CONFIRM

Confirms or not the numeric comparison value in secure connection:

  • 0: to not confirm the numeric comparison value
  • 1: to confirm the numeric comparison value

SET operation: <confirm_yes_no>

AT+BLE_PAIRING_CONFIRM=1
OK

QUERY operation: no query for this command, it returns an error.

On reception of BLE_EVT_VALUE_CONFIRM event, send AT+BLE_PAIRING_CONFIRM=<confirm_yes_no>, see example here.

9.7. GAP command - sends the passkey to use during the pairing process in legacy pairing - BLE_PASSKEY_RESP

Passkey value is between 0 and 999999.
SET operation: <passkey>

AT+BLE_PASSKEY_RESP=0000
OK

QUERY operation: no query for this command, it returns an error.

On reception of BLE_EVT_PASSKEY_REQ, send AT+BLE_PASSKEY_RESP=<passkey>, see example here.

When the pairing is complete, reception of BLE_EVT_PAIRING event with two parameters: status, reason.

Status:
  • 0: pairing status success
  • 1: pairing status timeout
  • 2: pairing failed
  • 3: encryption failed
Reason:
  • 1: passkey entry failed
  • 2: OOB not available
  • 3: authentication request cannot be met
  • 4: confirm value failed
  • 5: pairing not supported
  • 6: insufficient encryption key size
  • 7: command not supported
  • 8: unspecified reason
  • 9: very early next attempt
  • 10: invalid parameters
  • 11: SC DHKEY check failed
  • 12: SC numeric comparison failed

10. GATT commands

10.1. GATT command - custom service creation - BLE_SVC

For the creation of a custom service, the command BLE_INIT is mandatory. Use a phone with ST BLE ToolBox to connect with WB55 and a custom service.
Custom service parameters:

svc_id:
  • 0: no service
  • 3 to 5: custom service
svc_uuid_type:
  • 1: 16 bits
  • 2: 128 bits
uuid_16b: 
  • 16 bits service uuid
max_attr_record: 
  • 2 * nb_of_char + 1

SET operation: <svc_id>, <svc_uuid_type>, <uuid_16b>, <max_attr_record>

AT+BLE_SVC=3,1,0xAABB,10
OK

QUERY operation: <svc_id>

AT+BLE_SVC?
+BLE_SVC:3
OK

If svc_uuid_type = 1, a range of UUID values has been pre-allocated, it is the Bluetooth base UUID and it has the value 00000000-0000-1000-8000- 00805F9B34FB.
If svc_uuid_type = 2, the user enters 16 bits service uuid. The 128 bits service uuid is completed in BLE_AT_SERVER application with the following value 00000000-CC7A-482A-984A-7F2ED5B3E58F.

Example 1:

AT+BLE_INIT=1
OK
AT+BLE_SVC=3,1,0xAABB,10
AT+BLE_ADV=1
OK
Custom service creation 1
Connectivity Custom service1.png

Example 2:

AT+BLE_INIT=1
OK
AT+BLE_SVC=3,2,0xAABB,10
AT+BLE_ADV=1
OK
Custom service creation 2
Connectivity Custom service2.png
AT_SERVER: default complete local name
00:80:E1:26:F6:5B: default public BD address

Up to three custom services can be defined.

10.2. GATT command - characteristic creation - BLE_CHAR_ADD

Characteristic parameters:

svc_id: 
  • 3: service id on which characteristic is added
char_id: 
  • 1 to 5: characteristic id
char_uuid_type:
  • 1: 16 bits
  • 2: 128 bits
char_uuid_16b:
  • 16 bits char uuid
char_value_len:
  • 1 to 245
char_prop:
  • 0x00: CHAR_PROP_NONE
  • 0x01: CHAR_PROP_BROADCAST
  • 0x02: CHAR_PROP_READ
  • 0x04: CHAR_PROP_WRITE_WITHOUT_RESP
  • 0x08: CHAR_PROP_WRITE
  • 0x10: CHAR_PROP_NOTIFY
  • 0x20: CHAR_PROP_INDICATE
  • 0x40: CHAR_PROP_SIGNED_WRITE
  • 0x80: CHAR_PROP_EXT
sec_permission:
  • 0x00: None
  • 0x01: AUTHEN_READ
  • 0x02: AUTHOR_READ
  • 0x04: ENCRY_READ
  • 0x08: AUTHEN_WRITE
  • 0x10: AUTHOR_WRITE
  • 0x20: ENCRY_WRITE
gatt_evt_mask:
  • 0x00: GATT_DONT_NOTIFY_EVENTS
  • 0x01: GATT_NOTIFY_ATTRIBUTE_WRITE
  • 0x02: GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP
  • 0x04: GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP

SET operation: <svc_id>, <char_id>, <char_uuid_type>, <char_uuid_16b>, <char_value_len>, <char_prop>, <sec_permission>, <gatt_evt_mask>

AT+BLE_CHAR_ADD=3,1,1,0x3344,2,26,0,1
OK
	

QUERY operation: no query for this command, it returns an error.

If char_uuid_type = 1, a range of UUID values has been pre-allocated, it is the Bluetooth Base UUID and has the value 00000000-0000-1000-8000- 00805F9B34FB

If char_uuid_type = 2, the user enters 16 bits characteristic uuid. The 128 bits service uuid is completed in BLE_AT_SERVER application with the following value 00000000-8E22-4541-9D4C-21EDAE82ED19.

Example 1:

AT+BLE_CHAR_ADD=3,1,1,0x3344,2,26,0,1
OK
Custom characteristic example 1
Connectivity Custom char1.png

Example 2:

AT+BLE_CHAR_ADD=3,1,2,0x3344,2,10,0,1
OK
Custom characteristic example 2
Connectivity Custom char2.png

10.3. GATT command - setting of the characteristic value to notify - BLE_NOTIF_VAL

Parameters of BLE_NOTIF_VAL command:

svc_id: 
  • 1 to 5: service id corresponding to the characteristic to be notified
char_id: 
  • 1 to 5: characteristic id to be notified
char_val:
  • value to be notified

SET operation: <svc_id>, <char_id>, <char_val>

  • Sets heart rate measurement characteristic value to 70 for heart rate service:
AT+BLE_NOTIF_VAL=2,1,70
OK

By default, energy expended value is set to 0, it is not displayed on the phone.

  • Sets button control characteristic status, 0 and 1 are displayed alternatively (char_val = 0 has no effect) for P2P service:
AT+BLE_NOTIF_VAL=1,2,1
OK	

QUERY operation: no query for this command, it returns an error.

10.4. GATT command - setting of the characteristic value to indicate - BLE_INDIC_VAL

Parameters of BLE_INDIC_VAL command:

svc_id: 
  • 1 to 5: service id corresponding to the characteristic to be notified
char_id: 
  • 1 to 5: characteristic id to be notified
char_val:
  • value to be notified

SET operation: <svc_id>, <char_id>, <char_val>

AT+BLE_INDIC_VAL=3,1,10
OK	

QUERY operation: no query for this command, it returns an error.

11. Events generation

An event is an information received either from the remote device or from the local device to inform the application about the status change or the data received.

Events description
Connectivity Events generation.png

12. Security

The BLE security model includes five security features:

  • Pairing: process for creating one or more shared secret keys.
  • Bonding: act of storing the keys created during pairing for use in subsequent connections in order to form a trusted device pair.
  • Device authentication: verification that the two devices have the same keys.
  • Encryption: provides message confidentiality.
  • Message integrity: protects against fake messages.(4 bytes message integrity check MIC)

BLE uses two security levels:

  • Legacy pairing – short temporary key (STK). STK is created to encrypt connection. Then, if bonding, LTK is used for subsequent connections.
  • Secure connection – long term key (LTK). LTK is created to encrypt connection.

12.1. Legacy pairing and no fixed pin (initiated by the central)

Default initialization values can be changed when no link is established with:

BLE_IO_CAPA=4
BLE_SET_AUTHEN_REQ=0,1,0,1,111111 (fixed pin is not used)
Legacy pairing with no fixed pin exchange sequence
Connectivity LP nofixedpin1.png
Connectivity LP nofixedpin2.png

12.2. Legacy pairing and fixed pin (111111) (initiated by the central)

Default initialization values can be changed when no link is established with:

BLE_IO_CAPA=0
BLE_SET_AUTHEN_REQ=0,0,0,0,111111 (fixed pin = 111111 is used)
Legacy pairing with fixed pin exchange sequence
Connectivity LP fixedpin1.png
Connectivity LP fixedpin2.png

12.3. Secure connection (initiated by the central)

Use of default values when BLE_INIT is sent:

io_capability = 4
bonding_mode = 0
mitm = 1
sc_support = 1
use_fixed_pin = 1
fixed_pin = 111111
identity_address_type = 0
Secure connection (initiated by the central) exchange sequence
Connectivity SecureConnection1.png
Connectivity SecureConnection2.png

13. Flow sequences for examples

13.1. First demonstration using predefined applications

13.1.1. BLE_SVC=1 P2P_server

Steps to use P2P_server application:

  • Power on your board running BLE_AT_Server application
  • Open a terminal emulator to send data to STM32WB LPUART1 interface.
  • Send AT+BLE_SVC=1 command : creates P2P_server service and starts advertising. OK is received
  • Then, open ST BLE Sensor smartphone application and connect to P2PSRV1 device
  • Events are received over LPUART:
    • BLE_EVT_CONN=1
    • BLE_EVT_UPD_CONN=1
    • BLE_EVT_UPD_CONN=1
  • Play with the light on the smartphone, events are received over LPUART:
    • BLE_EVT_WRITE=1,2,x with x = 0 led off, x = 1 led on
  • Send over the LPUART AT+BLE_NOTIF_VAL=1,2,1 command – toggles button characteristic status, (AT+BLE_NOTIF_VAL=1,2,0 has no effect), on the smartphone "Button pressed: hh:mm:ss {status}" is displayed. OK is received


P2P Server exchange sequence
Connectivity P2P server.png
Connectivity P2P sequence debug trace.png

13.1.2. BLE_SVC=2 heart rate

Steps to use the heart rate application:

  • Power on your board running BLE_AT_Server application
  • Open a terminal emulator to send data to STM32WB LPUART1 interface
  • Send AT+BLE_SVC=2 command : creates Heart Rate service and starts advertising. OK is received
  • Then, open ST BLE Sensor smartphone application and connect to HRSTM device
  • Events are received over LPUART:
    • BLE_EVT_CONN=1
    • BLE_EVT_UPD_CONN=1
    • BLE_EVT_UPD_CONN=1
  • Send over the LPUART AT+BLE_NOTIF_VAL=2,1,70 command – sets heart rate measurement characteristic value to 70. OK is received
Heart Rate exchange sequence
Connectivity HeartRate.png
Connectivity HR sequence debug trace.png

13.2. Second demonstration: creating a custom service

13.2.1. BLE_SVC=3 Custom service

Steps to create custom service:

  • Power on your board running BLE_AT_Server application
  • Open a terminal emulator to send data to STM32WB LPUART1 interface
  • Send AT+BLE_INIT=1 command, initialization. OK is received
  • Send AT+BLE_SVC=3,2,0xaabb,10 command, creation of a custom service. OK is received
  • Send AT+BLE_CHAR_ADD=3,1,1,0x3344,2,26,0,1 command, creation of a characteristic with properties: read, write, notify. OK is received
  • Send AT+BLE_CHAR_ADD=3,2,1,0x5566,2,40,0,1 command, creation of a second characteristic with properties: write, indicate. OK is received
  • Send AT+BLE_ADV=1, starts advertising. OK is received
  • Then, open ST BLE ToolBox smartphone application and connect to AT_SERVER device, discover service and characteristics.
  • Events are received over LPUART:
    • <BLE_EVT_CONN=1
    • <BLE_EVT_UPD_CONN=1
    • <BLE_EVT_UPD_CONN=1
Creation of custom service exchange sequence
Connectivity newcustom.png
ST BLE ToolBox Custom service
Connectivity ST BLE ToolBox Custom Service.jpg

Write characteristics, enable notification and indication:

  • On the first writable characteristic, click on the write button, enter the value to write for example 0x1122 and click on send. Value is written on service 3, characteristic 1.
  • Event is received over LPUART:
    • <BLE_EVT_WRITE=3,1,0x1122
  • Same thing on the second writable characteristic, write 0x3344 value.
  • Event is received over LPUART:
    • <BLE_EVT_WRITE=3,2,0x3344
  • On notifiable characteristics, click on Notify for characteristic 1 to enable notification and click on Indicate for characteristic 2 to enable indication.
  • Send AT+BLE_NOTIF_VAL=3,1,1 command, OK is received. Notification received on the smartphone.
  • Send AT+ BLE_INDIC_VAL=3,2,1 command, OK is received. Indication received on the smartphone.
Characteristic management exchange sequence
Connectivity writechar1.png
Connectivity writechar2.png

Initialization sequence with specific parameters, change of connection interval:

  • Send AT+BLE_PUB_ADDR=0x112233445566 command, configuration of public address. OK is received
  • Send AT+BLE_INIT=1 command, initialization. OK is received
  • Send AT+BLE_ADV_PARAM=0,0,20,25 command, configuration of advertising parameters. OK is received
  • Send AT+BLE_ADV_PARAM? command to check advertising parameters.
    • +BLE_ADV_PARAM:0,0,20.0,25.0,0 is received
    • OK is received
  • Send AT+BLE_ADV=1 command, starts advertising. OK is received
  • Then, open ST BLE ToolBox smartphone application and connect to AT_SERVER device, discover service and characteristics.
  • Events are received over LPUART:
    • <BLE_EVT_CONN=1
    • <BLE_EVT_UPD_CONN=1
    • <BLE_EVT_UPD_CONN=1
  • Send AT+BLE_CONN_INT=125,150 command, change connection interval. OK is received
  • Events are received over LPUART:
    • <BLE_EVT_UPD_CONN=1
  • Send AT+BLE_CONN_INT? command to check connection interval.
    • +BLE_CONN_INT:150.00,150.00 is received
    • OK is received
Initialization sequence with specific parameters, change of connection interval
Connectivity conninterval1.png
Connectivity conninterval2.png

Initialization sequence with random address defined by the user:

  • Send AT+BLE_RAND_ADDR=0xee2233445566 command, configuration of random address. OK is received
  • Send AT+BLE_RAND_ADDR? command to check random address.
    • +BLE_RAND_ADDR:0xee2233445566 is received
    • OK is received
  • Send AT+BLE_INIT=1 command, initialization. OK is received
  • Send AT+BLE_ADV_PARAM=0,0,20,25 command, configuration of advertising parameters. OK is received
  • Send AT+BLE_ADV_PARAM? command to check advertising parameters.
    • +BLE_ADV_PARAM:0,0,20.0,25.0,0 is received
    • OK is received
  • Send AT+BLE_ADV=1 command, starts advertising. OK is received
  • Then, open ST BLE ToolBox smartphone application and connect to AT_SERVER device, discover service and characteristics.
  • Events are received over LPUART :
    • <BLE_EVT_CONN=1
    • <BLE_EVT_UPD_CONN=1
    • <BLE_EVT_UPD_CONN=1
Initialization sequence with random address defined by the user
Connectivity random addr1 1.png
Connectivity random addr1 2.png

Initialization sequence with default random address (CFG_STATIC_RANDOM_ADDRESS defined in app_conf.h):

  • Send AT+BLE_CFG_RAND_ADDR=1 command, configuration of random address. OK is received
  • Send AT+BLE_RAND_ADDR? command to check random address.
    • +BLE_RAND_ADDR:0x000000000000 is received
    • OK is received
  • Send AT+BLE_INIT=1 command, initialization. OK is received
  • Send AT+BLE_RAND_ADDR? command to check random address.
    • +BLE_RAND_ADDR:0xc122aabbccdd is received
    • OK is received
  • Send AT+BLE_ADV_PARAM? command to check advertising parameters.
    • +BLE_ADV_PARAM:0,0,20.0,30.0,0 is received
    • OK is received
  • Send AT+BLE_ADV=1 command, starts advertising. OK is received
  • Then, open ST BLE ToolBox smartphone application and connect to AT_SERVER device, discover service and characteristics.
  • Events are received over LPUART:
    • <BLE_EVT_CONN=1
    • <BLE_EVT_UPD_CONN=1
    • <BLE_EVT_UPD_CONN=1
Initialization sequence with default random address
Connectivity random addr2 1.png
Connectivity random addr2 2.png

Initialization sequence with default random address generated with random generator (CFG_STATIC_RANDOM_ADDRESS not defined in app_conf.h):

  • Send AT+BLE_CFG_RAND_ADDR=1 command, configuration of random address. OK is received
  • Send AT+BLE_RAND_ADDR? command to check random address.
    • +BLE_RAND_ADDR:0x000000000000 is received
    • OK is received
  • Send AT+BLE_INIT=1 command, initialization. OK is received
  • Send AT+BLE_RAND_ADDR? command to check random address.
    • +BLE_RAND_ADDR:0xe7257d5fd350 is received
    • OK is received
  • Send AT+BLE_ADV=1 command, starts advertising. OK is received
  • Send AT+BLE_ADV_PARAM? command to check advertising parameters.
    • +BLE_ADV_PARAM:0,0,20.0,30.0,1 is received
    • OK is received
  • Then, open ST BLE ToolBox smartphone application and connect to AT_SERVER device, discover service and characteristics.
  • Events are received over LPUART :
    • <BLE_EVT_CONN=1
    • <BLE_EVT_UPD_CONN=1
    • <BLE_EVT_UPD_CONN=1
Initialization sequence with default random address
Connectivity random addr3 1.png
Connectivity random addr3 2.png

Initialization sequence with a new name:

  • Send AT+BLE_NAME=WB_ATCMD command, configuration of device name. OK is received
  • Send AT+BLE_NAME? command to check random address.
    • +BLE_NAME:WB_ATCMD is received
    • OK is received
  • Send AT+BLE_INIT=1 command, initialization. OK is received
  • Send AT+BLE_ADV=1 command, starts advertising. OK is received
  • Then, open ST BLE ToolBox smartphone application and connect to WB_ATCMD device, discover service and characteristics.
  • Events are received over LPUART :
    • <BLE_EVT_CONN=1
    • <BLE_EVT_UPD_CONN=1
    • <BLE_EVT_UPD_CONN=1
Initialization sequence with a new name
Connectivity name1.png
Connectivity name2.png

14. References