ricardoquesada / bluepad32

Bluetooth gamepad, mouse and keyboard support for ESP32 and PicoW
https://bluepad32.readthedocs.io/
Other
566 stars 59 forks source link

Conflict with SerialBluetooth.h? #34

Open tbo711 opened 1 year ago

tbo711 commented 1 year ago

Hello. Great work, this is amazing! I am trying to add the use of SerialBluetooth to my sketch but it won't work. I'm new to this but after hours of looking, my best guess is that it might be because Bluedroid mode is needed?

My end goal is to be able to connect my controller with Bluepad32 but also be able to connect to an Android phone to use something like the MIT App Inventor.

THANK YOU! Blake

ricardoquesada commented 1 year ago

Yes. BluetoothSerial is disabled.

See: https://gitlab.com/ricardoquesada/esp-idf-arduino-bluepad32-template/-/blob/main/sdkconfig.defaults#L56

this is because it doesn't use Bluedroid. Instead it uses the BTstack stack (different one).

I would add Arduino APIs for BTstack, but you will need to implement the "serial" part yourself.

tbo711 commented 1 year ago

Thank you for the fast reply! I think I understand now. Do you think it would make it easier if used to wifi to connect with the phone? Any conflicts with the wifi functionality?

ricardoquesada commented 1 year ago

not sure... just try with regular ESP32 Arduino core.... create a very simple example that uses BT and WiFi... if that works, then it should work with ESP32-Bluepad32 Arduino core

ste2425 commented 1 year ago

@tbo711

This may not be of any help but i created an example using BTStack (the Bluetooth lib BluePad32 uses) to fire up a ATT Server and communicate with a web app. This was for me to build a web app that could perform OTA Updates on the EPS32 whilst using BluePad32.

It is possible to communicate with the ATT server via a mobile app or dekstop app if cofigured for BLE.

Obviously depends on what your are wanting to do but thought i would share as it may provide you an option.

https://github.com/ricardoquesada/bluepad32/issues/37#issuecomment-1720803083