Hi everybody,
I want to develop a system and want to design it with ESP32-C3-mini-1 module. I need to use Bluetooth SPP protocol to communicate with PC as serial port. I got error when I try to upload sample code.
#include "BluetoothSerial.h"
BluetoothSerial SerialBT;
void setup() {
Serial.begin(115200);
SerialBT.begin("TARNAVI");
delay(2000);
}
void loop() {
SerialBT.println("Test Mini");
delay(1000);
}
Error Output
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `.L0 ':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:713: undefined reference to `esp_spp_disconnect'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `_stop_bt':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:714: undefined reference to `esp_spp_deinit'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `.L0 ':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:189: undefined reference to `esp_spp_write'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:153: undefined reference to `esp_bt_gap_set_pin'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:650: undefined reference to `esp_bt_gap_register_callback'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `_init_bt':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:658: undefined reference to `esp_spp_register_callback'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:664: undefined reference to `esp_spp_init'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:686: undefined reference to `esp_bt_gap_set_security_param'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:691: undefined reference to `esp_bt_gap_set_cod'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `.LVL474':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:265: undefined reference to `esp_bt_gap_set_scan_mode'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `esp_spp_cb':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:271: undefined reference to `esp_spp_start_srv'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:283: undefined reference to `esp_spp_disconnect'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:364: undefined reference to `esp_spp_connect'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:391: undefined reference to `esp_spp_disconnect'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `.L0 ':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:126: undefined reference to `esp_bt_gap_resolve_eir_data'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `get_name_from_eir':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:130: undefined reference to `esp_bt_gap_resolve_eir_data'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `.L0 ':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:456: undefined reference to `esp_bt_gap_cancel_discovery'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `esp_bt_gap_cb':
C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:455: undefined reference to `esp_spp_start_discovery'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:522: undefined reference to `esp_bt_gap_pin_reply'
c:/users/htacc/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\htacc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.8\libraries\BluetoothSerial\src/BluetoothSerial.cpp:530: undefined reference to `esp_bt_gap_ssp_confirm_reply'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board ESP32C3 Dev Module.
What should I do?
