Comments (6)
There are no immediate plan to support l2cap.
PR is welcome.
from esp32-nimble.
I have implemented a simple feature of L2CAP.
Are there any additional functions required?
from esp32-nimble.
To be honest, I don't really understand how it works. I was trying to connect a Sony controller to an ESP32, and I found that it communicates via L2CAP. My first attempt was trying to use this library, but it didn't work.
Then, in the end, I found a reference code here in C (https://github.com/jvpernis/esp32-ps3/blob/master/src/ps3.c), and since it calls the ESP-IDF framework, I was able to translate the C code to unsafe Rust more or less one-to-one and get the controller working.
Certainly, it would have been much simpler and easier if I could have done all the integration directly with this library. Much of the initialization code was mostly copy/pasted from here:
esp32-nimble/src/ble_device.rs
Lines 54 to 87 in 1a12b5b
from esp32-nimble.
The ps3 controller does not seem to use BLE communication, but bluetooth classic communication.
Unfortunately, the nimble library is available for BLE only, so it cannot be used for communication with ps3 controllers.
from esp32-nimble.
Yeah, that was what I found as well. None of the newer ESP chips worked either because they don't support classic Bluetooth. Only an old ESP32 worked out.
I have ordered a ps5 controller which does support BLE, I found this: https://github.com/rodneybakiskan/ps5-esp32 once I get the controller I will try to port the classic code to the ble version and see how it goes.. l2cap still required
from esp32-nimble.
The ps5 controller also seem to use bluetooth classic communication.
https://bluepad32.readthedocs.io/en/latest/supported_gamepads/#bluetooth-gamepads-and-their-protocol
from esp32-nimble.
Related Issues (20)
- BLEServer disconnect HOT 1
- Add Accessor Functions
- Adding Characteristics after Advertising has already been started
- Cleanup BLEServer on BLEDevice::deinit HOT 2
- Wrong error mapping for BLE_ERR_INV_HCI_CMD_PARMS on set_raw_data HOT 1
- ble_gatt_chr_def missing `cpfd` on ESP-IDF version 5.2.1
- Change branch HOT 3
- Make use of `esp_idf_svc::eventloop::EspSystemEventLoop` instead of `loop`? HOT 3
- ble_keyboard example doesn't work HOT 2
- Support original NimBLE as well HOT 1
- Support v5.2.1 esp-idf HOT 2
- ble_gatt_chr_def, Required fields/characteristics in struct? HOT 4
- NimBLE: GAP procedure initiated: stop advertising. HOT 1
- Reflect new build args propagation in `build.rs`
- Add hint for potential increase of CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE HOT 3
- How do handle large reads (larger than MAX MTU)? HOT 4
- Build errors HOT 1
- Creating a new BLEAddress is confusing because it reverses the bytes. HOT 3
- Memory Leak When Looping Scan HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp32-nimble.