jvpernis / esp32-ps3

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

Does not work on platform-espressif32 4.0.0 or more. #49

Open asukiaaa opened 2 years ago

asukiaaa commented 2 years ago

This library does not work on PlatformIO with using platform-espressif32 4.0.0 (arduino v2.0.0) or more(4.1.0, 4.2.0 and 4.2.0) but works with 3.5.0. Is there any way to work on 4.0.0 or more?

Thank you.

julian-weinert commented 2 years ago

Hi @asukiaaa! I've had to modify the CMakeList.txt for the ps3 component There is also a fork and an open pull request for 4.0 support, you may simply use that.

I had connection trouble, so maybe it's some incompatibility thing, but I've not had any look searching / reaching out.

idf_component_register(SRCS "src/ps3.c"
                            "src/ps3_spp.c"
                            "src/ps3_parser.c"
                            "src/ps3_l2cap.c"
                        REQUIRES nvs_flash bt
                        PRIV_REQUIRES bt
                        INCLUDE_DIRS src/include
                        PRIV_INCLUDE_DIRS   ${IDF_PATH}/components/bt/common/include/
                                            ${IDF_PATH}/components/bt/host/bluedroid/common/include/
                                            ${IDF_PATH}/components/bt/host/bluedroid/stack/include)
asukiaaa commented 2 years ago

Thank you for the response.

I've had to modify the CMakeList.txt for the ps3 component There is also a fork and an open pull request for 4.0 support, you may simply use that.

Can you show some urls for them?

julian-weinert commented 2 years ago

Oh, sorry for the late response. You can go to the pull requests tab and then navigate to the fork. Here is the direct link https://github.com/rrooding/esp32-ps3/tree/feature/esp-idf-4-support

julian-weinert commented 2 years ago

It might be worth mentioning that the fork of rrooding uses a pre-release bluetooth GAP API that is not supported by 4.0 anymore. I would recommend using this original fork and add the CMakeList.txt as I have it above. There is another change in rroodings fork, in the src/ps3_spp.c:150. It appears that ESP-IDF now supports the use of ESP_SPP_SEC_AUTHORIZE instead of ESP_SPP_SEC_NONE but I'm not sure how important it is.

No matter what I do I can't seem to be able to get it connecting. It might be necessary to go over the project again and maybe convert it to the new official gap API if it supports the needed functionality.