Closed NguyenTrongPhuc552003 closed 1 year ago
Seems like an ESP-IDF compatibility variable needs to be changed depending what esp version you have. I'll update the readme accordingly. Thanks!
Hi, thank you for your response and solving my problem. Your library is awesome, I love it!
Hello, i followed all the instructions on google as well as updated Board esp32 (Board Manager) in the latest version but the errors below still happen. Can you help me for this error? Thanks
c:\Users\TrongPhuc\OneDrive - VNU-HCMUS\Documents\Arduino\libraries\ps5-esp32-main\src\ps5_spp.c: In function 'sppCallback': c:\Users\TrongPhuc\OneDrive - VNU-HCMUS\Documents\Arduino\libraries\ps5-esp32-main\src\ps5spp.c:89:30: error: **'ESP_BT_SCAN_MODE_CONNECTABLE' undeclared (first use in this function); did you mean 'ESP_BT_NON_CONNECTABLE'? esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE); ^
~~~~~~~ ESP_BT_NONCONNECTABLE c:\Users\TrongPhuc\OneDrive - VNU-HCMUS\Documents\Arduino\libraries\ps5-esp32-main\src\ps5_spp.c:89:30: note: each undeclared identifier is reported only once for each function it appears in c:\Users\TrongPhuc\OneDrive - VNU-HCMUS\Documents\Arduino\libraries\ps5-esp32-main\src\ps5_spp.c:89:5: error: _too few arguments to function 'esp_bt_gap_set_scan_mode' esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODECONNECTABLE);** ^~~~~~~~ In file included from c:\Users\TrongPhuc\OneDrive - VNU-HCMUS\Documents\Arduino\libraries\ps5-esp32-main\src\ps5_spp.c:4: C:\Users\TrongPhuc\AppData\Local\arduino15\packages\esp32\hardware\esp32\2.0.5/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h:480:11: note: declared here esp_err_t esp_bt_gap_set_scan_mode(esp_bt_connection_mode_t c_mode, esp_bt_discovery_mode_t d_mode); ^~~~~~~~exit status 1
Compilation error: exit status 1
=> UPDATE: I fixed this error in the ps5_spp.c file by correcting it as shown in the image![image](https://user-images.githubusercontent.com/88880664/191566681-50a79da2-9901-4120-b842-aae9c72225d2.png)