SWRU580 April   2021 CC2564C , CC2564MODA , CC2564MODN

 

  1.   Trademarks
  2. Introduction
  3. A2DP (AUD) Demo Guide
    1. 2.1 Demo Overview
    2. 2.2 Demo Application
    3. 2.3 Application Commands
  4. A3DP Sink Demo Guide
    1. 3.1 Demo Overview
    2. 3.2 Demo Application
    3. 3.3 Sink Reference Board Demo Application
    4. 3.4 Multiple Source Demo
    5. 3.5 Application Commands
  5. A3DP Source Demo Guide
    1. 4.1 Demo Overview
    2. 4.2 Demo Application
    3. 4.3 Application Commands
  6. HFP Demo Guide
    1. 5.1 Demo Overview
    2. 5.2 Demo Application
    3. 5.3 Application Commands
  7. HFP Audio Gateway Demo Guide
    1. 6.1 Demo Overview
    2. 6.2 Demo Application
    3. 6.3 Application Commands
  8. HID Demo Guide
    1. 7.1 Demo Overview
    2. 7.2 Demo Application
    3. 7.3 Application Commands
  9. HSP Demo Guide
    1. 8.1 Demo Overview
    2. 8.2 Demo Application
    3. 8.3 Application Command
  10. Map Demo Guide
    1. 9.1 Demo Overview
    2. 9.2 Demo Application
    3. 9.3 Application Command
  11. 10PBAP Demo Guide
    1. 10.1 Demo Overview
    2. 10.2 Demo Application
    3. 10.3 Application Commands
  12. 11SPP Demo Guide
    1. 11.1 Demo Overview
    2. 11.2 Demo Application
    3. 11.3 Application Commands
  13. 12SPPLE Demo Guide
    1. 12.1 Demo Overview
    2. 12.2 Demo Application
    3. 12.3 Demonstrating SPP LE on an iOS Device with the LightBlue App
    4. 12.4 Demonstrating SPP LE on an iOS Device with the SPPLE Transfer App - LEGACY
    5. 12.5 SPP Demo
    6. 12.6 Application Commands
  14. 13SPPDMMulti Demo Guide
    1. 13.1 Demo Overview
    2. 13.2 Demo Application
    3. 13.3 Application Commands
  15. 14ANP Demo Guide
    1. 14.1 Demo Overview
    2. 14.2 Demo Application
    3. 14.3 Application Commands
  16. 15HFP Demo Guide
    1. 15.1 Demo Overview
    2. 15.2 Demo Application
    3. 15.3 Application Commands
  17. 16HTP Demo Guide
    1. 16.1 Demo Overview
    2. 16.2 Demo Application
    3. 16.3 Application Commands
  18. 17PASP Demo Guide
    1. 17.1 Demo Overview
    2. 17.2 Demo Application
    3. 17.3 Application Commands
  19. 18HOGP Demo Guide
    1. 18.1 Demo Overview
    2. 18.2 Demo Application
    3. 18.3 Application Commands
  20. 19PXP Demo Guide
    1. 19.1 Demo Overview
    2. 19.2 Demo Application
    3. 19.3 Applications Commands
  21. 20FMP Demo Guide
    1. 20.1 Demo Overview
    2. 20.2 Demo Application
    3. 20.3 Application Commands
  22. 21CSCP Demo Guide
    1. 21.1 Demo Overview
    2. 21.2 Demo Application
    3. 21.3 Application Commands
  23. 22Revision History

Demo Application

This section provides a description on how to use the demo application to connect two or more configured boards and communicate over bluetooth (BR/EDR and LE). We will setup one of the boards as a central device over LE and Master over BR/EDR and the other board as a peripheral device over LE and Slave over BR/EDR. We will then initiate the connections from the first device to the other. Once connected, we will show how to use the new features over the connection.

Establish Connection
Connection over LE

Peripheral device initialization and advertising

  1. We will setup the first board as a Peripheral device. Note the bluetooth address of the server; we will later use this to initiate a connection from the client
    GUID-20210311-CA0I-PFZS-Z5N8-1WRQDMKW7B8N-low.png Figure 13-2 SPPDMMulti Demo Local BT Address
  2. The first command we need is RegisterSPPDMMULTI, this command will register the SPP-LE service and initiate the Server, type RegisterSPPDMMULTI.
    GUID-20210311-CA0I-5BF6-K0QQ-GZT031QVJR12-low.png Figure 13-3 SPPDMMulti Demo Register SPPDMMulti
    Note: The following steps describe how to configure the Advertising operation, you can change any value that you want and jump to step g to start advertising with the changed values or the default values for the values that weren't changed and follow the instructions.

    The default values are:

    • Discoverability Mode
    • General Discover-able Connectability Mode
    • Connectable Own Address Type
    • Public address Advertising Intervals
    • Minimum interval = 100, Maximum interval - 200
  3. In order to configure the Discoverability mode, we need to use the SetDiscoverabilityMode command and the mode that can be:

    0 = Non Discoverable, 1 = Limited Discoverable, 2 = General Discoverable

    For this example we will use General Discoverable mode (The same as in the default values).

    GUID-20210311-CA0I-V3G9-CRHX-WXMF7D3CMLGZ-low.png Figure 13-4 SPPDMMulti Demo Set Discoverability Mode
  4. In order to configure the Connectability mode, we need to use the SetConnectabilityMode command and the mode that can be:

    0 = Non Conectable, 1 = Connectable, 2 = Direct Connectable, 3 = Low Duty Cycle Direct Connectable.

    For this example we will use Low Duty Cycle Direct Connectable which is a new feature from specification 4.1.

    GUID-20210311-CA0I-BL2G-F52Z-T9LJ2FWSFHH7-low.png Figure 13-5 SPPDMMulti Demo Set Connect Mode
  5. In order to configure the Advertising Intervals, we need to use the SetAdvertisingInterval command and the minimum and maximum intervals that their range can be between 20..10240 in ms
    Note: When using High Duty Cycle Direct Connectable this command won't have any affect.
    GUID-20210311-CA0I-DRGL-CGHK-7115NNV2P8WN-low.png Figure 13-6 SPPDMMulti Demo Set Advertising Interval
  6. In order to configure the Own Address Type, we need to use the SetRandomAddress command and the type that can be:

    0 = Static, 1 = Resolvable, 2 = Non-Resolvable

    For this example we will use Static random address type.

    GUID-20210311-CA0I-6GQG-1GGL-CFG05NJPNXTB-low.png Figure 13-7 SPPDMMulti Demo Set Random Address
  7. Now, after we configured the different values we can use the AdvertiseLE command in order to start advertising.

    The AdvertiseLE command has multiple options to advertise:

    GUID-20210311-CA0I-QV8N-5HXK-XL1CWBZLPX5M-low.png Figure 13-8 SPPDMMulti Demo AdvertiseLE Command
  1. Option 1: Disable advertising

    AdvertiseLE 0

  2. Option 2: Advertising without any Direct Connectable mode and with own address type public

    AdvertiseLE 1 or AdvertiseLE 1 0

  3. Option 3: Advertising without any Direct Connectable mode and with own address type Random

    AdvertiseLE 1 1 [Own Random BD_ADDR]

  4. Option 4: Advertising with any Direct Connectable mode and with own address type public and peer type public

    AdvertiseLE 1 0 0 0 [Peer Public BD_ADDR]

  5. Option 5: Advertising with any Direct Connectable mode and with own address type Random and peer type public

    AdvertiseLE 1 1 [Own Random BD_ADDR] 0 [Peer Public BD_ADDR]

  6. Option 6: Advertising with any Direct Connectable mode and with own address type Random and peer type public

    AdvertiseLE 1 1 [Own Random BD_ADDR] 1 [Peer Random BD_ADDR]

For this example we will use option 5, The device is on Low Duty Cycle Direct Connectable, Own Address type - Random address and the peer device use Public address.

GUID-20210311-CA0I-72SP-FGSJ-SCZHZV6XWKC5-low.png Figure 13-9 SPPDMMulti Demo Enable BLE Advertising

Now the peripheral is advertising and waiting for connection request from the central device.

Central device connection creation and configuration

The Central can initiate the connection request and when the peripheral will advertise the connection will be created.

[Steps 1 and 2 are optional if you already know the Bluetooth address of the device that you want to connect to]

  1. The Central device can try to find which LE devices are in the vicinity using the command: StartScanning 0.
    Note: When using Public address as Own address type, you can only use StartScanning 0
  2. Once you have found the device, you can stop scanning by using the command: StopScanning
    GUID-20210311-CA0I-D4VP-2V5F-G47N8BMPQ1NM-low.png Figure 13-10 SPPDMMulti Demo Scanning Commands
  1. Retrieve the Bluetooth address of the first board that was configured as a peripheral.
  2. Issue a ConnectLE command in the central terminal in order to start the connection procedure.

The ConnectLE command has multiple options to connect:

GUID-20210311-CA0I-TPF9-ZBZH-L5FMJ8JT0BQ5-low.png Figure 13-11 SPPDMMulti Demo Connect LE Command
  • Option 1: Connect to Remote device using public address type and own address type is also public.

    ConnectLE [Peer Public BD_ADDR]

    ConnectLE [Peer Public BD_ADDR] 0

    ConnectLE [Peer Public BD_ADDR] 0 0

  • Option 2: Connect to Remote device using random address type and own address type is public.

    ConnectLE [Peer Random BD_ADDR] 1

    ConnectLE [Peer Random BD_ADDR] 1

  • Option 3: Connect to Remote device using random address type and own address type is random.

    ConnectLE [Peer Random BD_ADDR] 1 1

  • Option 4: Connect to Remote device using public address type and own address type is random.

    ConnectLE [Peer Public BD_ADDR] 1 1

For this example we will use option 2, The peripheral using Random address type and the central device using Public address type.

GUID-20210311-CA0I-4FCC-BPLZ-HDHKVHTLGXLF-low.png Figure 13-12 SPPDMMulti Demo Connect Successful
  1. When a central successfully connects to the peripheral , both the central and peripheral will output LE_Connection_Complete and information about the current connection.
    GUID-20210311-CA0I-8NXL-V61J-SWMKBJNF9FS4-low.png Figure 13-13 SPPDMMulti Demo Connection and Features
    Note: The Supported features may change according to the Bluetooth device. For this example we used CC2564C for both sides.

    Now we have a connection established and both devices are ready to send data to each other. Before the information can be sent we must first discover and configure the service in the Central terminal.

  2. In order to discover the service handles we use the DiscoverLEService Command, type DiscoverLEService [BD_ADDR or Connection ID] [UUID Type] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)]. The handles that are discovered will be displayed in the terminal.

    The DiscoverLEServicecommand has multiple options to discover:

    GUID-20210311-CA0I-ZCZ0-P08N-2SXBXVNSJTBN-low.png Figure 13-14 SPPDMMulti Discover Services Command
    • Option 1: Discover SPPDMMulti service which is using custom 32bit UUIDs a new feature from specification 4.1.

      This option will store the SPPDMMulti handles.

      DiscoverLEServicecommand [Peer BD_ADDR] [1]

      DiscoverLEServicecommand [Peer BD_ADDR] [1] [0]

      DiscoverLEServicecommand [Connection ID] [1] [1]

    • Option 2: Discover SPPLE service which is using custom 128bit UUIDs.

      This option will store the SPPLE handles.

      DiscoverLEServicecommand [Peer BD_ADDR] [2]

      DiscoverLEServicecommand [Peer BD_ADDR] [2] [0]

      DiscoverLEServicecommand [Connection ID] [2] [1]

    • Option 3 - Discover Generic services which are using 16/32/128bit UUIDs.

      This option will only print the handles.

      DiscoverLEServicecommand [Peer BD_ADDR] [16 or 32 or 128]

      DiscoverLEServicecommand [Peer BD_ADDR] [16 or 32 or 128] [0]

      DiscoverLEServicecommand [Peer BD_ADDR] [16 or 32 or 128] [1]

    For this example we will use option 1, The peripheral is advertising with SPPDMMulti Handles so we need to store them and we will use the Connection ID method.

    GUID-20210311-CA0I-G9JK-RHQH-TLQ1VBBM3KMC-low.png Figure 13-15 SPPDMMulti Demo Disocver LE Service Command
  3. In order to configure the service we use the ConfigureLEService Command, type ConfigureLEService [BD_ADDR or Connection ID] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].
    GUID-20210311-CA0I-PVVX-VDHT-FRL1T1GKQQDC-low.png Figure 13-16 SPPDMMulti Demo Configure LE Service
    GUID-20210311-CA0I-JLX3-MSB4-M4PMRVCVCSNJ-low.png Figure 13-17 SPPDMMulti Demo Configure LE Results
  4. After the LE connection is complete and configured we can use the ConnectedDevices command in order to receive a list of connected LE and/or BR/EDR devices (More information on this command can be found in paragraph 2.5.1.1b).
    GUID-20210311-CA0I-5H8X-MDJ8-TJTSMVNRXJBR-low.png Figure 13-18 SPPDMMulti Demo Connected Devices
    Note: The list above is from the Central side.
Connection over BR/EDR
Slave device initialization

We will setup the one of the boards (In our example, the one that we are running as a Peripheral device) as a slave so we need to open a SPP port on this device.

  1. In order to open a SPP port, use OpenServer command with the port number that you want to open.

    For this example we will use port number 10.

    GUID-20210311-CA0I-F7HK-8NXS-3JFJ03HVKMQ4-low.png Figure 13-19 SPPDMMulti Demo Open Server Port
    Note: Although the Server port number that was opened is 10, the Serial Port ID that will be used is 1. We allow only one BR/EDR connection so if you will open more than one ports, when the device will connect to a SPP port all the opened ports will close automatically
Master device connection creation

Now that the Slave device opened the SPP port, the Master can initiate the connection.

[Step 1 is optional if you already know the Bluetooth address of the device that you want to connect to]

  1. The Master device can try to find which BR/EDR devices are in the vicinity using the command: Inquiry.
    GUID-20210311-CA0I-KMFD-TKKX-6QQCQGDTNV3G-low.png Figure 13-20 SPPDMMulti Demo Inquiry Results
    1. Retrieve the Bluetooth address of the first board that was configured as a slave.
    2. In order to start the connection procedure type in the slave terminal OpenClient [Inquiry Index or BD_ADDR] [Server Port Number] [0 when using Inquiry Index (optional) or 1 when using BD_ADDR (Mandatory)].
      GUID-20210311-CA0I-7QBK-RB75-679DXDVMXMVB-low.png Figure 13-21 SPPDMMulti Demo Open Client Command
    3. When a master successfully connects to the slave , both the master and slave will output the information about the current connection and will try to initiate role switch
      GUID-20210311-CA0I-N4X4-GCQS-733WM04NFDSW-low.png Figure 13-22 SPPDMMulti Demo Switching Roles

      Now we have a connection established and both devices are ready to send data to each other.

    4. After the BR/EDR connection is complete also we can use the ConnectedDevices command in order to receive a list of connected LE and/or BR/EDR devices (More information on this command can be found in paragraph 2.5.1.1b).
      GUID-20210311-CA0I-0KGW-FGPV-CRXBJT6CGQQD-low.png Figure 13-23 SPPDMMulti Demo Connected Devices Command 2
      Note: The list above is from the LE Central terminal, the BR/EDR role is slave and not master because of the role switch. You can see 2 devices because the LE connection was to Random address type and the BR/EDR connections was to public address type if both connections were to the same address type you will see only 1 device.
Disconnect Connection
Disconnect over LE
  1. In order to disconnect the connection, we use the DisconnectLE Command, type DisconnectLE [BD_ADDR or Connection ID] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].
    GUID-20210311-CA0I-7RCM-M3SF-VBBZNT844NSC-low.png Figure 13-24 SPPDMMulti Demo Disconnect BLE Command
Disconnect over BR/EDR
  1. In order to disconnect the connection, in this case close the RFCOMM that was opened there are two options:

    Option 1, we use the CloseServer command from the slave , type CloseServer [Serial Port ID], if no Serial Port ID will be entered all opened ports will be closed.

    Option 2, we use the CloseClient command from the slave , type CloseClient Server [Serial Port ID], if no Serial Port ID will be entered all opened ports will be closed.

    For this example we will use option 2.

    GUID-20210311-CA0I-BB1Q-5ZN7-8HCHQVCXGGNJ-low.png Figure 13-25 SPPDMMulti Demo Close Client Command
Pairing devices
LE Pairing
Note: The following steps describe how to configure the LE pairing operation, you can change any value that you want and jump to step c to start the LE pairing procedure with the changed values or the default values for the values that weren't changed and follow the instructions.

The default values are:

Pairability Mode - Pairable

I/O Capability - No Input/Output

Bonding Type - Bonding

MITM Requirement - Yes

SC Enable - Yes

P256 debug - No

  1. In order to configure the Pairability mode, we need to use the SetPairabilityMode command and the mode that can be:

    0 = Non Pairable, 1 = Pairable

    For this example we will use Pairable mode (The same as in the default values).

    GUID-20210311-CA0I-SGQW-66F7-N33NPPV3QVF5-low.png Figure 13-26 SPPDMMulti Demo Set Pair Mode
    Note: After changing the pairability mode you will be able to see that default values.
  2. In order to change the pairing parameters we can use the ChangePairingParameters Command, type ChangePairingParameters [I/O Capability] [Bonding Type] [MITM Requirement] [SC Enable] [P256 debug] where the options for this parameters are:

    I/O Capability (0 = Display Only, 1 = Display Yes/No, 2 = Keyboard Only, 3 = No Input/Output, 4 = Keyboard/Display)

    Bonding Type (0 = No Bonding, 1 = Bonding)

    MITM Requirement (0 = No, 1 = Yes)

    SC Enable (0 = No, 1 = Yes)

    P256 debug (0 = No, 1 = Yes)

    GUID-20210311-CA0I-DX4M-XFTQ-FLWMXVGQZFWD-low.png Figure 13-27 SPPDMMulti Demo Set Pairing Params

    For this example we will use the default values.

    GUID-20210311-CA0I-DQVL-HJZ5-KQ4PSPXT5CLR-low.png Figure 13-28 SPPDMMulti Demo Change Pairing Params

    The LE Pairing procedure require an active LE connection, so after running the instructions in paragraph 2.1.1 you can start the LE pairing procedure.

  3. In order to start the LE pairing procedure we need to use the PairLE command, so type PairLE [BD_ADDR or Connection ID] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].
    GUID-20210311-CA0I-VMMJ-GPM6-MDV3MLSH7RSW-low.png Figure 13-29 SPPDMMulti Demo Pair BLE Command
  4. When a central successfully paired to the peripheral , both the central and peripheral will output LE_Authentication and information about the current connection.
    GUID-20210311-CA0I-FFX4-RFRK-710TWBCKX7KD-low.png Figure 13-30 SPPDMMulti Demo Secure Connection and Bonding
SPPDMMulti Demo Secure Connection and Bonding
Note: The following steps describe how to configure the BR/EDR pairing operation, you can change any value that you want and jump to steps c to start the BR/EDR pairing procedure with the changed values or the default values for the values that weren't changed and follow the instructions.

The default values are:

Pairability Mode - Pairable

I/O Capability - No Input/Output

MITM Requirement - Yes

  1. In order to configure the Pairability mode, we need to use the SetCBPairabilityMode command and the mode that can be:

    0 = Non Pairable, 1 = Pairable, 2 = Pairable (Secure Simple Pairing

    For this example we will use Pairable mode (The same as in the default values).

    GUID-20210311-CA0I-VNG7-KXMW-JSZTRH9JCK0C-low.png Figure 13-31 SPPDMMulti Demo Set CB Pair Mode
  2. In order to change the pairing parameters we can use the ChangeSimplePairingParameters Command, type ChangeSimplePairingParameters [I/O Capability] [MITM Requirement] where the options for this parameters are:

    I/O Capability (0 = Display Only, 1 = Display Yes/No, 2 = Keyboard Only, 3 = No Input/Output)

    MITM Requirement (0 = No, 1 = Yes)

    GUID-20210311-CA0I-XVRK-QKPD-L9RQMR595VLH-low.png Figure 13-32 SPPDMMulti Change Simple Pairing Params

    For this example we will use the default values.

    GUID-20210311-CA0I-M5V5-GP0D-LGHJLZNKBTXJ-low.png Figure 13-33 SPPDMMulti Demo Change Simple Pairing Params Command Response

    The BR/EDR Pairing procedure require a non-active BR/EDR connection, so after running this instructions, run the instructions in paragraph 2.1.2.

  3. In order to start the BR/EDR pairing procedure we need to use the Pair command, so type Pair [BD_ADDR or Connection ID] [Pairing type (0 = Dedicated - (Default), 1 = General)] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].
    GUID-20210311-CA0I-40ZQ-P2F6-PHPDSCLMZM7B-low.png Figure 13-34 SPPDMMulti Demo Pair Command

    For this example we will use BD_ADDR and General pairing type.

    GUID-20210311-CA0I-JKD6-XGSQ-9JH6894X7THC-low.png Figure 13-35 SPPDMMulti Demo Pair Command Response
  4. When a central successfully paired to the peripheral , both the central and peripheral will output GAP_Authentication_Response and information about the current connection.
    Note: if your devices weren't paired before, you may need to do additional steps - in this example we need to enter PINCodeResponse in both devices.
    GUID-20210311-CA0I-VQK6-B6JD-B3CC1WXSBNC0-low.png Figure 13-36 SPPDMMulti Demo PinCodeResponse
Un-Pairing devices
LE Un-Pairing
  1. When there is no need any longer for the LTK stored in the device, you can delete it with the UnPairLE command with the following parameters [BD_ADDR or Connection ID] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].
    Note: Connection ID can be used only when the devices are connected, the LTK will be deleted but the connection will stay paired until disconnection procedure is requested.
    GUID-20210311-CA0I-WQDR-RTQ2-Q9L6MLHXNQ6S-low.png Figure 13-37 SPPDMMulti Demo BLE Unpair Command
BR/EDR Un-Pairing
  1. When there is no need any longer for the Link Key stored in the device, you can delete it with the EndPairing command with the following parameters [Inquiry Index or BD_ADDR] [Server Port Number] [0 when using Inquiry Index (optional) or 1 when using BD_ADDR (Mandatory)].
    Note: Using the EndPairing command will cancel the bonding between the devices and delete the Link Key, when using only Pair command with General method, the connection that was created will be disconnected, but if you had additional connection like RFCOMM port connected, the EndPairing command will not disconnect you.
    GUID-20210311-CA0I-S2DM-WNR4-W7ZFKGC1K3GL-low.png Figure 13-38 SPPDMMulti Demo BT Unpair
Send and read Data
LE Data
  1. In order to send data over LE, we need to use the LESend command with the following parameters [BD_ADDR or Connection ID] [Number of bytes to send] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].
    GUID-20210311-CA0I-XVRK-QKPD-L9RQMR595VLH-low.png Figure 13-39 SPPDMMulti Demo BLE Send
    For this example we will send 100 bytes and we will use the connection ID option.
    GUID-20210311-CA0I-PR9G-2JFM-Q7WDX38P2V2R-low.png Figure 13-40 SPPDMMulti Demo BLE Send and Receive
  2. In order to read the data that was sent, we need to use the LERead command with the following parameters [BD_ADDR or Connection ID] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].
    Note: The connection ID can be found easily in the Data Indication Event.
    GUID-20210311-CA0I-KD0X-SCBT-1XNZLN9HNCL6-low.png Figure 13-41 SPPDMMulti Demo BLE Read
BR/EDR Data
  1. In order to send data over BR/EDR, there are two options to send the data.

    Option 1: Write command, This command will send only 10 bytes every use. To use this command type, Write [Serial Port ID].

    GUID-20210311-CA0I-RHT5-FVRS-F0CG2JTJKLQH-low.png Figure 13-42 SPPDMMulti Demo BT Write Command

    Option 2: CBSend command, This command will send the user input amount of bytes, This function can also disable or enable the sniff mode. To use this command type, CBSend [Number of Bytes to send] [Serial Port ID] [0 - Enable Automatic Sniff (Default) or 1 - Disable Automatic Sniff].

    GUID-20210311-CA0I-NNFR-5MTP-SLXTSQW8BDT5-low.png Figure 13-43 SPPDMMulti Demo CBSend Command

    For this example we will use option 1 and send 10 bytes.

    GUID-20210311-CA0I-LL9P-NJNC-FWDDPXQGX2MR-low.png Figure 13-44 SPPDMMulti Demo BT Send and Receive
  2. In order to read the data that was sent, we need to use the Read command with the following parameter [Serial Port ID].
    Note: The Serial Port ID can be found easily in the SPP Data Indication event.
    GUID-20210311-CA0I-8N2H-5LMR-SKNMTHB7TMXT-low.png Figure 13-45 SPPDMMulti Demo BT Read
Additional Command
Note: The following paragraphs describe how to specific functions and are optional to use.
Generic features
LE Commands
Note: The following step describe how to change the connection parameters, you can change the values in the valid range or use the default parameters.

The default values are:

Connection_Interval_Min - 50ms (Range: 8..4000 in ms)

Connection_Interval_Max - 200ms (Range: 8..4000 in ms)

Minimum_Connection_Length - 0ms (Range: 0..65535 in ms)

Maximum_Connection_Length - 10000ms (Range: 0..65535 in ms)

Slave_Latency - 0ms (Range: 0..500 in ms)

Supervision_Timeout - 20000ms (Range: 100..32000 in ms)

ScanInterval - 100ms (Range: 3..10240 in ms)

ScanWindow - 100ms (Range: 3..10240 in ms)

  1. In order to configure the connection parameters, we need to use the SetConnectionParameters command and fill the following parameters [Connection_Interval_Min] [Connection_Interval_Max] [Minimum_Connection_Length] [Maximum_Connection_Length] [Slave_Latency] (Range: 0..500 in ms)[Supervision_Timeout] [ScanInterval] [ScanWindow]
    GUID-20210311-CA0I-PTRC-F1FK-GKKTM2WK1JBT-low.png Figure 13-46 SPPDMMulti Demo Set Connection Parameters
    Note: This command only stores the new connection parameters, in order to change the connection parameters you need to use additional command. ConnectLE when you want to create new connection (Paragraph 2.1.1) or LEUpdateConnectionParameters for existing connection (Paragraph 2.6.2a).
  2. When the device is connected to multiple devices you can use ConnectedDevices in order to see the details of each connection.

    This command has two options to work.

    Option 1: List the contains only connected devices, For this option type ConnectedDevices with or without the parameter 0.

    In the Image below you can see that we are connected to three devices: To the first we are connected as a Master in LE (Central) and Slave in BR/EDR (Because of the role switch). To the second we are connected as a Master in LE (Central). To the third we are connected as a Slave in LE (Peripheral).
    GUID-20210311-CA0I-NRVJ-2GGN-W38HG15PLKLT-low.png Figure 13-47 SPPDMMulti Demo Connected Devices List

    Option 2: List of all devices in the list, that means devices that was previously LE paired or opened SPP server ports.

    In the Image below you can see the difference between option 1 and option 2. Option 1 shows that we are connected only to one device (Connection ID 2). Option 2 shows the full list. The green color shows devices that are not connected but we are paired with them (LTK is stored). The yellow color shows the device that is connected (Connection ID 2). The light blue color shows the opened SPP Server ports that are waiting to be connected.
    Note: We allow only one BR/EDR connection so if you will open more than one ports, when the device will connect to a SPP port all the opened ports will close automatically.
    GUID-20210311-CA0I-Q7R9-MRWN-CD8DXRWQGWQS-low.png Figure 13-48 SPPDMMulti Demo Connected Devices Options
BR/EDR Commands

This sample application has Sniff mechanism that is used to free the baseband when BR/EDR connection is being used.

when using our sample and enabling this mode, when reading and writing over BR/EDR the device will exit and enter sniff automatically.

Note: The following step describe how to change the sniff parameters, you can change the values or use the default parameters.

The default values are:

MaxInterval - 600ms

MinInterval - 400ms

Attempts - 4

Timeout - 1

  1. In order to configure the sniff parameters, we need to use the SetSniffParameters command and fill the following parameters [SerialPortID] [MaxInterval (ms)] [MinInterval (ms)] [Attempt] [Timeout].
    Note: This command only stores the new sniff parameters for a specific Serial Port ID, that means that the device must be connected over BR/EDR (Paragraph 2.1.2).
    GUID-20210311-CA0I-WKMF-LK7G-QSKVMSHR4LPF-low.png Figure 13-49 SPPDMMulti Demo Set Sniff Params
    Note: This parameters that are stored, are stored only in the device that run this command and are not stored on the other device, you will need to run this command again on the other device as well or you can jump to step b if you want to initiate the sniff mode from the second device and enter the parameters directly.

  2. In order to enter to sniff mode, we need to use the SniffMode command with the parameter [SerialPortID] all the following parameters are optional [MaxInterval (ms)] [MinInterval (ms)] [Attempt] [Timeout].
    Note: If you set the optional parameters in step a they will be sent automatically when you will you Sniffmode [SerialPortID], if not and if you didn't filled them the default values will be sent.
    GUID-20210311-CA0I-GKB1-FZN2-CSZZ5XQMTX1J-low.png Figure 13-50 SPPDMMulti Demo Sniff Mode Command
    Note: The Interval in HCI Mode Change Event is in baseband units and will displayed on both devices.
  3. In order to exit the sniff mode, we need to use the ExitSniffMode command with the parameter [SerialPortID].
    GUID-20210311-CA0I-MN59-3PDP-6SFPN9K9KRDK-low.png Figure 13-51 SPPDMMulti Demo Sniff Mode Option
    Note: The HCI Mode Change Event will displayed on both devices.
New 4.1 and 4.2 Features
  1. Until Bluetooth specification 4.1 only the central could send update connection parameters, in specification 4.1 the peripheral can request update connection parameters. While the connection is active, the central or the peripheral can ask to change the connection parameters after changing them in paragraph 2.6.1.1a. In order to send this request, use the LEUpdateConnectionParameters command with the following parameters [BD_ADDR or Connection ID] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].
    GUID-20210311-CA0I-JMQ6-DLLL-9M9DJ9P1XPLC-low.png Figure 13-52 SPPDMMulti Demo Update Connection
    Note: In the image you can see that the Central return status accepted to the peripheral and changed the parameters.

    Both following command need the devices to be paired over LE, see paragraph 2.3.1 for instructions.

  2. The SetAuthenticatedPayloadTimeout allows us to change the Authenticated Payload Timeout parameter from the default value that is 30 seconds to the user input value. In order to change it, type SetAuthenticatedPayloadTimeout with the following parameters [BD_ADDR or Connection ID] [Authenticated Payload Timeout] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].

    The value Authenticated Payload Timeout is in ms units.

    GUID-20210311-CA0I-BFCF-8057-3VNG7QNVVQ8R-low.png Figure 13-53 SPPDMMulti Demo Set Authentication Payload Timeout
  3. The QueryAuthenticatedPayloadTimeout allows us to query the Authenticated Payload Timeout parameter of the connection. In order to query it, type QueryAuthenticatedPayloadTimeout with the following parameters [BD_ADDR or Connection ID] [0 when using BD_ADDR (optional) or 1 when using Connection ID (Mandatory)].
    GUID-20210311-CA0I-HBN7-RHPB-WHMG35DDNSF1-low.png Figure 13-54 SPPDMMulti Demo Query Authencation Payload Timeout