Navigation

    LILYGO

    • Register
    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Incompatibility with BluetoothSerial library on LilyGo T-Display-S3

    Technical Discussion
    2
    5
    337
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      thebeardedgarage last edited by

      i am working on similar project and when i attempting to use the BluetoothSerial library with the LilyGo T-Display-S3 board results in compilation errors. The same code compiles and runs as expected on a standard ESP32 board, indicating the issue is specific to the LilyGo T-Display-S3 board.

      Here is the code:

      #include "BluetoothSerial.h"

      BluetoothSerial SerialBT; // Object for Bluetooth

      void setup() {
      Serial.begin(115200); // Start the built-in serial port, possibly to communicate with the host computer
      //SerialBT.begin("ESP32test"); // Start BluetoothSerial with the name "ESP32test"

      Serial.println("Bluetooth device is ready to pair");
      }

      void loop() {
      if (SerialBT.available()) { // Check if we receive anything from Bluetooth
      Serial.write(SerialBT.read()); // Send what we receive to the built-in serial port
      }

      if (Serial.available()) { // Check if anything is coming from the built-in serial port
      SerialBT.write(Serial.read()); // Send what we receive to Bluetooth
      }
      }

      Here is the error:

      c:/users/talha/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o:(.literal._ZL8_stop_btv+0x18): undefined reference to esp_spp_disconnect' c:/users/talha/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o:(.literal._ZL8_stop_btv+0x1c): undefined reference to esp_spp_deinit'
      c:/users/talha/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function _stop_bt()': C:\Users\Talha\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\BluetoothSerial\src/BluetoothSerial.cpp:714: undefined reference to esp_spp_disconnect'
      c:/users/talha/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: C:\Users\Talha\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\BluetoothSerial\src/BluetoothSerial.cpp:715: undefined reference to `esp_spp_deinit'
      collect2.exe: error: ld returned 1 exit status
      exit status 1
      Error compiling for board LilyGo T-Display-S3.

      teastain2 1 Reply Last reply Reply Quote 0
      • teastain2
        teastain2 @thebeardedgarage last edited by teastain2

        Well I get the same results on my setup!
        So i'm sorry but use this as you may!

        BTW Did you know that you can use three "`" single back quotes at the start of your code-paste to create this cool effect of your code?
        Also put three of them at the end.

        #include "BluetoothSerial.h"
        
        BluetoothSerial SerialBT; // Object for Bluetooth
        
        void setup() {
        Serial.begin(115200); // Start the built-in serial port, possibly to communicate with the host computer
        //SerialBT.begin("ESP32test"); // Start BluetoothSerial with the name "ESP32test"
        
        Serial.println("Bluetooth device is ready to pair");
        }
        
        void loop() {
        if (SerialBT.available()) { // Check if we receive anything from Bluetooth
        Serial.write(SerialBT.read()); // Send what we receive to the built-in serial port
        }
        
        if (Serial.available()) { // Check if anything is coming from the built-in serial port
        SerialBT.write(Serial.read()); // Send what we receive to Bluetooth
        }
        }
        

        -Terry

        T 1 Reply Last reply Reply Quote 1
        • T
          thebeardedgarage last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • T
            thebeardedgarage @teastain2 last edited by

            @teastain2
            Thanks Terry, what im finding is esp32-s3 doesnt support classic bluetooth like bluetoothserial. Looks like you have to use BLE on the S3

            teastain2 1 Reply Last reply Reply Quote 0
            • teastain2
              teastain2 @thebeardedgarage last edited by

              @thebeardedgarage Good to know!
              Thanks -Terry

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB | Contributors