Skip to main content

GLYPH BLE SERVER

BLE Server Image This guide will help you configure the GLYPH board as a Bluetooth server and send data to your GLYPH board through a Smart Phone, assuming you are using GLYPH-C3 (but any GLYPH development board from the ESP32 Series should work)

Step 1: Code Setup

  1. Open Arduino IDE
  2. Enter the following code into the Arduino IDE
This code is derived and modified from SeeedStudio Xiao ESP32C3
If your Arduino ESP32 Core is not upgraded to version 3.0.0 or above, make sure to update the code:
  • Change String value = pCharacteristic->getValue(); to std::string value = pCharacteristic->getValue();

Step 2: Upload the Code

  1. Connect the Board
    • Connect your GLYPH board to your computer
  2. Select the Board and Port Do the following setting in your Arduino IDE,
    • Tools > Board and select the appropriate board.
    • Tools > Port and select the port connected to your GLYPH.
    • Tools > USB CDC on Boot and select Enabled
If USB CDC on BOOT not enabled, you won’t be seeing any serial data on Arduino IDE.
  1. Upload the Code
    • Click the upload button (➡️ icon) or use the shortcut CRTL + U in Arduino IDE to upload the code to the board.

Step 3: Download & Install LightBlue App

  1. Install the App

Step 4: Connect to the Bluetooth Device

  1. Open Bluetooth on Your Phone
    • Ensure Bluetooth is enabled on your smartphone.
  2. Scan for Devices
    • Bring your phone close to the GLYPH board.
    • Scan for devices and locate the GLYPHC3 device.
      PCBCUPID_available_devices

Step 5: Open LightBlue App and Connect

  1. Open the LightBlue App
    • Launch the LightBlue app on your smartphone.
  2. Scan Tab
    • Click on the scan tab.
  3. Connect to Device
    • Click CONNECT next to GLYPHC3.
    PCBCUPID_connect
  4. Select Readable, Writable Section
    • Click on the section at the very bottom which says Readable, Writable.
    PCBCUPID_READABLE_WRITABLE
  5. Set Data Format
    • Under the Data format drop-down menu, select UTF-8 String.
    PCBCUPID_format
  6. Send a Message
    • Type any text that you like to send to your GLYPH Board, In this case let’s try “PCBCUPID-GLYPHC3” under WRITTEN VALUES and click WRITE.
    PCBCUPID_WRITE_VALUE

Step 6: View the Output

  1. Check the Serial Monitor
    • You will see the text string “Hello” output on the Serial Monitor of Arduino IDE.
    PCBCUPID_output_bluetooth_result