-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is it possible to use bluetoothserial.h??? #111
Comments
Hi The current version of the library uses NimBLE, which unfortunately does not allow the simultaneous use of bluetoothserial An older version of my library will probably be compatible |
thanks for your fast response sir, will try to figure it out on the older version |
So, got around to investing the time (turns out it was less than 1 hour) needed to get the current v5.1 version of the library ported back to the original BT stack instead of NimBLE This should allow the use of BluetoothSerial.h, though no testing has ben done... Let me know how you go |
So, did some testing and didn't work by default Sees the timing to get both working at the same time is a bit special What I will do is make it so Classic BT is built in to my library with the begin method called where it needs to be and then you can choose to enable it and send data Did some quick testing along those lines and I was able to have the BLE Gamepad working at the same time as sending Classic BT Serial messages Will need a little more development and testing, but it looks promising |
Actually, given more testing, it seems to work fine as expected, except:
Here is a working example of a single button pressed that turns an LED on, presses button 1 on the controller, and also sends a message over Serial BT when the pin is activated
|
Depending on the code above, so the device will start with 2 instance (bleGamepad and serialBT)? Sorry replied via mobile phone, misspressed close issue button |
Yeah - one of each Here is some more code I just tested, where I connected the BT Classic to my phone, while the BLE gamepad was connected to the PC. This sketch also has serial passthrough, where all data sent from BT Classic serial is output to USB serial on Arduino and vice versa Worked perfectly. Everything I typed on my phone was sent to the Arduino serial, and everything I typed on Arduino serial was sent to the phone --> all with the BLE gamepad still functioning fine and sending notifications to the phone on button presses
|
I might even make this the default version of BLE stack so that everyone can use BT Classic, and have a seperate branch with NimBLE incase people want to have the benefit of reduced memory usage etc. There have been a number of people asking for this over the past few years |
I'll try it as soon as my work hour done, thank you very much for the response. |
Played around with it some more. When using both BLE and BT Classic, Android only sees the BT Classic and not the BLE Once it's setup, it re-pairs automatically, so I'm not really too worried about trying to track down a fix at the moment |
done rebuilding my code, will test it as soon as possible got a race to attend too this morning |
You should check this one for sim racers. This is exactly what we want to do with your library. |
Hi, |
Would it not be better to extended the library to use the Like the BLE-UART example in both nimBLE and blueDriod libraries. Would need to add the services and TX/RX Characteristic with callbacks for the incoming data. |
Finally got around to drawing up a sketch - #195 (comment) This worked in my testing between ESP32-C3 connected to my Android phone and my Mac connected via serial for debugging and monitoring, where I could send and receive data between BLE connected devices. Worked pretty well and I think adding a screen where you can pop up notices or other things on the gamepad. Just not sure how or what you might be doing with the host OS. |
hello @lemmingDev ,
just straight as the issue does, im wondering on how to make BLE-Gamepad to work with simhub read message too. since im doing some f1 wheel project for my simrig. there are some sample from my code.
The text was updated successfully, but these errors were encountered: