jvpernis / esp32-ps3

Control your ESP32 projects with a PS3 controller!
319 stars 86 forks source link

Ps3 get Address Compiling Error #72

Open Droopy2024 opened 7 months ago

Droopy2024 commented 7 months ago

Good evening,

Wondering if you can help me please, I am currently getting the below list of errors in details tab from verying the getaddres code with an Error at compiling for board XIAO_ESP32C3.

#include <Ps3Controller.h>

void setup()
{
    Serial.begin(115200);
    Ps3.begin();

    String address = Ps3.getAddress();

    Serial.print("The ESP32's Bluetooth MAC address is: ");
    Serial.println(address);
}

void loop()
{

}
Details

Arduino: 1.8.19 (Windows 10), Board: "XIAO_ESP32C3, Enabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 160MHz (WiFi), QIO, 80MHz, 4MB (32Mb), 921600, None, Disabled" C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c: In function 'ps3_l2cap_init_services': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c:77:29: warning: passing argument 1 of 'ps3_l2cap_init_service' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] ps3_l2cap_init_service( "PS3-HIDC", BT_PSM_HIDC, BTM_SEC_SERVICE_FIRST_EMPTY ); ^~~~~~~~~~ C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c:27:43: note: expected 'char *' but argument is of type 'const char *' static void ps3_l2cap_init_service( char *name, uint16_t psm, uint8_t security_id); ~~~~~~^~~~ C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c:78:29: warning: passing argument 1 of 'ps3_l2cap_init_service' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] ps3_l2cap_init_service( "PS3-HIDI", BT_PSM_HIDI, BTM_SEC_SERVICE_FIRST_EMPTY+1 ); ^~~~~~~~~~ C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c:27:43: note: expected 'char *' but argument is of type 'const char *' static void ps3_l2cap_init_service( char *name, uint16_t psm, uint8_t security_id); ~~~~~~^~~~ C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c: In function 'ps3_l2cap_deinit_services': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c:92:31: warning: passing argument 1 of 'ps3_l2cap_deinit_service' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] ps3_l2cap_deinit_service( "PS3-HIDC", BT_PSM_HIDC ); ^~~~~~~~~~ C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c:28:45: note: expected 'char *' but argument is of type 'const char *' static void ps3_l2cap_deinit_service( char *name, uint16_t psm ); ~~~~~~^~~~ C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c:93:31: warning: passing argument 1 of 'ps3_l2cap_deinit_service' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] ps3_l2cap_deinit_service( "PS3-HIDI", BT_PSM_HIDI ); ^~~~~~~~~~ C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src\ps3_l2cap.c:28:45: note: expected 'char *' but argument is of type 'const char *' static void ps3_l2cap_deinit_service( char *name, uint16_t psm ); ~~~~~~^~~~ c:/users/white/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\PS3_Controller_Host\ps3_l2cap.c.o: in function `ps3_l2cap_config_ind_cback': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_l2cap.c:244: undefined reference to `L2CA_ConfigRsp' c:/users/white/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\PS3_Controller_Host\ps3_l2cap.c.o: in function `ps3_l2cap_connect_ind_cback': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_l2cap.c:197: undefined reference to `L2CA_ErtmConnectRsp' c:/users/white/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\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_l2cap.c:200: undefined reference to `L2CA_ErtmConnectRsp' c:/users/white/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\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_l2cap.c:203: undefined reference to `L2CA_ConfigReq' c:/users/white/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\PS3_Controller_Host\ps3_l2cap.c.o: in function `ps3_l2cap_init_service': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_l2cap.c:152: undefined reference to `L2CA_Register' c:/users/white/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\PS3_Controller_Host\ps3_l2cap.c.o: in function `ps3_l2cap_deinit_service': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_l2cap.c:78: undefined reference to `L2CA_Deregister' c:/users/white/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\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_l2cap.c:178: undefined reference to `L2CA_Deregister' c:/users/white/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\PS3_Controller_Host\ps3_l2cap.c.o: in function `ps3_l2cap_send_hid': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_l2cap.c:122: undefined reference to `L2CA_DataWrite' c:/users/white/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\PS3_Controller_Host\ps3_spp.c.o: in function `ps3_spp_callback': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_spp.c:145: undefined reference to `esp_bt_gap_set_scan_mode' c:/users/white/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\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_spp.c:150: undefined reference to `esp_spp_start_srv' c:/users/white/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\PS3_Controller_Host\ps3_spp.c.o: in function `ps3_spp_init': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_spp.c:68: undefined reference to `esp_spp_register_callback' c:/users/white/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\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_spp.c:74: undefined reference to `esp_spp_init' c:/users/white/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\PS3_Controller_Host\ps3_spp.c.o: in function `ps3_spp_deinit': C:\Users\white\OneDrive\Documents\Arduino\libraries\PS3_Controller_Host\src/ps3_spp.c:77: undefined reference to `esp_spp_deinit' collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board XIAO_ESP32C3. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.