-
Notifications
You must be signed in to change notification settings - Fork 780
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
Support for Bluetooth Connectivity with the new XBOX One S Controller #252
Comments
@vickylance if you donate a controller, I would be happy to do so. |
Any update on the support for the XBOX One S controller over Bluetooth? |
No, as I do not own the controller. |
Hi, own both is it implemented know? If not may someone can help me to develop? |
@TheRob87 no I haven't worked on it since I don't own the controller. |
@Lauszus is it correct that Xbox one s Controller over USB are supported? So Only problem is the connection between Bluetooth and the Seriell in? |
I'm actually not sure. Can anybody with a Xbox One S controller test #298? |
@TheRob87 let me clarify that: I'm not sure if it works via USB or not, Bluetooth is currently not supported. |
I can confirm this works via USB. But it will not work via Bluetooth Any update on the Bluetooth part? |
@nathanRamaNoodles no. If you want me to work on it, then please donate a controller. |
If I donate money, will you buy the controller yourself? |
@nathanRamaNoodles yes, that would be great! Could you please contact me at lauszus@gmail.com so we can work out the details? |
Hi, any updates? Did you get the money? Otherwise I also would donate a Controller. |
@TheRob87 dude, just get a raspberry pi zero w. It's cheaper($5) and has way more USB host support than an Arduino. |
@TheRob87 no I never got any donations. |
A controller has now been sent to @Lauszus . |
@alostsandwich thank you! I'll let you know once I receive it. |
@Lauszus Delivery was missed for some reason by UPS and it's available for pickup at the local collection point. I sent a few emails to you but haven't heard back. Is there any issue with picking it up? It'll have to be picked up before June 21 otherwise they'll send the package back. |
@alostsandwich sorry I have been super busy at work. I'll pick up the package today. |
I finally took the time to look into the code. It turns out the controller only works with "simple paring" mode. I'm lacking a dongle that supports it, so I can get any further. I hope to buy a new dongle this week and continue the work. In the meantime anyone that wants to test it can download the code here: https://github.com/felis/USB_Host_Shield_2.0/archive/XBOXONES.zip. Please post the output from the serial monitor in this thread. |
Btw please run the BTHID.ino example. |
Wow thanks! Unfortunately the Xbox USB wireless adapter doesn't seem to have built-in Bluetooth so I can only test with an old Bluetooth 2.0 dongle that I have around. I don't expect it to work, but this is what I got just in case it helps: HID Bluetooth Library Started |
@Mixinu yes, that is the expected output with a Bluetooth 2.0 dongle. Any change you can test at least a 2.1 dongle? |
Here's the output using an Xbox One S white controller and an IOGEAR GBU521.
|
@alostsandwich interesting you dongle actually supports simple paring, but the controller still ask for a pin. I have logged what my laptop does and in that case the controller does not ask for a pin, but instead it sends out a "User Confirmation Request", thus running the simple paring procedure. I'll look into it. |
@alostsandwich I just pushed a changed. Could download the code again and see if it made any difference? |
@alostsandwich could you try one more time? I just want to confirm that simple paring gets enabled in your dongle. If that is the case, then I probably need to setup a L2CAP connection. |
If I'm reading it right then it looks like simple pairing is enabled.
|
@alostsandwich I wrote some initial code for the SDP communication. Could you try it and post the output again? |
|
Does it make any difference if you change: hci_read_remote_extended_features(0); // "Requests the normal LMP features as returned by the HCI_Read_Remote_Supported_Features command"
//hci_read_remote_extended_features(1); // Read page 1 to: //hci_read_remote_extended_features(0); // "Requests the normal LMP features as returned by the HCI_Read_Remote_Supported_Features command"
hci_read_remote_extended_features(1); // Read page 1 in BTD.cpp? |
Same result.
|
I just tried with a Bluetooth 4.0 dongle but it failed to upload BTHID.ino because "Sketch uses 31940 bytes (111%) of program storage space. Maximum is 28672 bytes" (I'm using an Arduino Leonardo). It was ok when I disabled serial debugging on settings.h, but apparently the dongle didn't get to connect to the controller. Do you think I could disable some of the included libraries, just to save some space to enable debugging and see what's going on? |
@alostsandwich I just updated the PR, could you run it again and post the output? My current symptoms are: It just connects and opens a SDP channel it then disconnects the SDP channel and I get a "Paring Faild: 05 (Authentication Failure)". For some reason I never receive the "IO Capability Request" event. Here's the full log:
|
@Lauszus here you go.
|
Not sure that it matters but the controller firmware that I'm using is 3.1.1221.0 which is the latest from Microsoft. |
@alostsandwich thanks. It's the exact same as I am getting. For some reason it never receives the "IO Capability Request" event... |
There is no IO capability probably because it's filtered out. Clearing the event filter and setting an event mask did the trick on my own project. |
I do not have the controller, could someone perform following command "sdptool browse [controller_hw_addr]" in order to retrieve sdp record database? |
Tested and works flawless. Thanks HisashiKato! |
Hi I have tried @HisashiKato's library but it seems I'm having more luck with the stock library in terms of what appears on the serial monitor. I ran the BTHID.ino example. When I used:
When I enabled Any input on this is highly aprreciated. |
@Jc7tee looking into the datasheet of your adapter it seems that only BLE is supported up to version 4.0. Classic Bluetooth is only supported up to v2.1, but you need classic bluetooth v4.0 or higher for the controller as far as I know. |
@HisashiKato I uncommented the debugging/reporting definitions in BTDSSP.cpp, BTXBOX.cpp and settings.h but still no output on my serial monitor except It only says
That's why I went back to the original files. Your code didn't trigger my dongle to search for devices (the LED is not blinking). I'm not sure if this related but I'm using atmega2560 with MegaCore bootloader installed. |
The bootloader should not affect it. The Bluetooth plugged into the USB has
to be smart all on its own and not require any firmware uploading. if it
requires firmware uploading then you need to get a different one.
…On Mon, Aug 24, 2020, 5:36 AM July Choo ***@***.***> wrote:
@HisashiKato <https://github.com/HisashiKato> I uncommented the
debugging/reporting definitions in BTDSSP.cpp, BTXBOX.cpp and settings.h
but still no output on my serial monitor except It only says
Start
XBOX Bluetooth Library Started
That's why I went back to the original files. Your code didn't trigger my
dongle to search for devices (the LED is not blinking). I'm not sure if
this related but I'm using atmega2560 with MegaCore bootloader installed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#252 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5SJTGVPO2HGDOMPVKEXI3SCIYDTANCNFSM4CLL66RA>
.
|
This is my Bluetooth dongle, just in case it helps: Working perfectly. I just had to update the controller firmware. |
The following is the process by which the BTD.cpp function I modified (I named it "BTDSSP.cpp" ) to connect to the Xbox One S Controller via bluetooth establishes an SSP connection. Bluetooth USB Adapter <-> USB Host Shield <- HCI_Reset_Command Start scanning the device. <- HCI_Authentication_Requested_Command -> HCI_IO_Capability_Request_Event : -> HCI_User_Confirmation_Request_Event(Value) -> HCI_Simple_Pairing_Complete_Event -> HCI_Link_Key_Notification_Event(new Link Key) //Notification of generated new link key. : -> HCI_Authentication_Complete_Event <- HCI_Set_Connection_Encryption_Command(on) The pairing process is complete. |
If you send a command to set such an HCI_Set_Event_Mask, you can receive HCI_IO_Capability_Request event.
|
Here is the repository of the library that I modified based on USB_Host_Shield_Library_2.0. https://github.com/HisashiKato/USB_Host_Shield_Library_2.0_BTXBOX If you have any questions about the modified library, please ask my repository. |
@HisashiKato thanks a lot! I've now added support for the controller: #471. I'll merge the PR into master once the Travis build has finished. |
@HisashiKato support Xbox Series X controller (Model 1914) and CSR bluetooth 5.0 or 4.0 ...? |
@Thammaraj (Translated from Japanese to English using a translation site) |
Ok, I understand why my new device won't connect. I also have an Xbox Model 1708 joystick used for testing. thanks for the answer |
@HisashiKato |
@GGKTL |
@HisashiKato |
Please Add support for the new Xbox one S controller to connect to Arduino using Bluetooth Shield.
The text was updated successfully, but these errors were encountered: