7.4 Module to Module Connection

In Accessing the GATT Service Using UART Commands and the Microchip Bluetooth Data Application, the RNBD350 module acts as a Bluetooth Low Energy peripheral and connects with a mobile phone, which acts as the Bluetooth Low Energy central. This section explains establishing a connection and data transfer between two RNBD350 modules. When the board is powered up, by default, the RNBD350 module is in the Data mode doing the Bluetooth Low Energy advertisement. To establish a module-to-module connection, one of the devices must be in the Central state initiating a scan request to capture the nearby Bluetooth Low Energy advertisement.
Figure 7-34. Module to Module Connection

The user can achieve the central configuration on the RNBD350 module by configuring the device into Command mode and issuing the F command. With this, the device shifts its Operating mode from peripheral to central device and starts scanning.

The test setup consists of two RNBD350 evaluation boards (both can either be connected to the same PC or a different PC via microUSB cable).

The command sequence is as follows:

  1. Power ON the RNBD350 module by connecting the RNBD350 evaluation board using a USB Type-C cable to the host PC.
  2. Using the terminal emulator, open the COM port associated with the RNBD350 module with the following settings.
    Figure 7-35. Module to Module Connection Setup
  3. By default, this device is in Peripheral mode doing advertisements at a regular interval.

  4. Power ON another RNBD350 evaluation board using a USB Type-C cable to the host PC. Open another instance of the terminal emulator on the host PC for the RNBD350 module that needs to be configured in Central mode for the associated COM port of the RNBD350 module with the following settings.
    Figure 7-36. TeraTerm Serial Port Setup
  5. Type $$$ to enter the Command mode.
  6. Type + to enable echo.
  7. Issue command F to initiate an active scan. The F command puts the RNBD350 module into the Central mode and initiates scanning. The scanning operation captures all the available Bluetooth Low Energy packets in the nearby surrounding.
  8. Wait until the inquiry finishes and finds the MAC address/address type of the device to be connected.
  9. Issue the X command to terminate the scanning.
  10. Enter C,<0,1>,<MAC address> to attempt a connection with the remote device, where the first parameter indicates the address type that is available in the inquiry result:
    • 0’ – Public address
    • 1’ – Private address

After connection, both RNBD350 modules are in the Data mode and data can be transferred between the devices. The remote peer device receives characters typed in the terminal emulator and vice versa.

To terminate the connection, type $$$ to return to the Command mode, then type command K,1.
Figure 7-37. Terminating the Connection