Direct Bluetooth gamepad support

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

Eiji
Atarian
Atarian
Posts: 3
Joined: Mon Apr 01, 2019 8:58 pm

Re: Direct Bluetooth gamepad support

Postby Eiji » Mon Apr 08, 2019 10:39 pm

Newsdee wrote:Just to confirm, this allows using multiple controllers on one dongle, right? That would be pretty good to save space.
.


Yes :)

Locutus73
Captain Atari
Captain Atari
Posts: 351
Joined: Wed Feb 07, 2018 6:13 pm

Bluetooth blues

Postby Locutus73 » Tue Apr 09, 2019 12:15 pm

My ancient Rome ancestors used the “Nomen omen” expression for someone/something with its own fate conveyed in its name… this is especially true for Bluetooth and this is my series of unfortunate events.

As I wrote I bought an ASUS USB-BT400 dongle (https://www.amazon.it/dp/B00CM83SC0), a Logitech M720 Triathlon Mouse (https://www.amazon.it/dp/B01KZVQB42) and a Logitech K380 Keyboard (https://www.amazon.it/dp/B013SL2050). My goal was to use the dongle with MiSTer and the keyboard and mouse both on my gaming PC and on MiSTer (they have multi device connectivity, with a 3rd device which, in my scenario, will be an AppleTV for the keyboard and a Macbook for the mouse) and to pair several 8bitdos pad to MiSTer in macOS mode (while using X-Input mode for the gaming PC, d-input mode for the retroreceivers on Analogue consoles and Switch mode on my Nintendo Switch).

First issue: I connected the ASUS dongle and I couldn’t find any BT device… a quick look to dmesg revealed that the dongle is based on a BCM20702A1 and it needs a firmware which isn’t there. Google is my friend: downloading BCM20702A1-0b05-17cb.hcd from https://github.com/winterheart/broadcom ... 5-17cb.hcd and putting it in /lib/firmware/brcm solved the issue.

The next problem was detecting too many devices…the MiSTer pairing procedure seems (licitly) to want to find just one BT device at once, but I have many BT devices in sight when I try a scan: Smart TVs, phones, watches, PCs, whatever… and this is not under my control: I could turn off all devices but the one I want to pair, but I see BT devices from my neighbors, so there’s no way to make just one device discoverable. Easy fix: I edited /sbin/btpair in order to filter only my keyboard and mouse BT MAC addresses, but…

Next issues: the keyboard is discovered but it doesn’t pair, the mouse is never discovered. The first issue seems some sort of incompatibility between the pairing procedure and/or Bluez 4 with K380, while the second issue is related to BT4: the M720 Triathlon Mouse is BT Smart/LE and it seems Bluez 4 has a rudimental BT4 implementation.
So I tried to manually install Debian armhf bluez_5.50-1 packages and I got some success.
I managed to pair the M720 using bluetoothctl and the connection seems stable and it autoreconnects on reboot too… great!!!
I somehow managed to pair K380 too, but with may retries and on reboot I have to reconnect it manually. I see that K380 tries to connect to MiSTer, but the connection is dropped immediately after, until I try to reconnect it manually from command line.

End of the story: I ordered a Logitech K375S keyboard which, like the M720 mouse, supports both BT Smart/LE and the Logitech Unifying receiver, so I’ll use them connecting to the gaming PC (and AppleTV and Macbook) through Bluetooth and to MiSTer using the Logitech dongle (which emulates a regular USB M+K)… I’ll try to use the ASUS USB-BT400 just for the 8bitdo pads (obviously filtering their MAC addresses).

Regards.

Locutus73

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4165
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Direct Bluetooth gamepad support

Postby Sorgelig » Tue Apr 09, 2019 1:11 pm

I never advertise MiSTer supports Smart/LE devices. You need to use BREDR devices (classic Bluetooth).
BlueZ 5 has no scripts to pair the devices outside the bluetoothctl app. Do you want users to open console and use command line every time they need to pair gamepad?
Main target for BT are gamepads. Keyboards, mice are just side support. If it works then good. If no - alas. There is a great choice of RF keyboards and mouses with dongles - so you don't have to mess with pairing. RF Keyboards are less hungry for batteries unlike BT. My Logitech K400r combo keyboard works like 1 year from one set of batteries. And i use it every day.

As for paring, i don't understand why you have many BT devices in pairing mode. This is not permanent BT mode for devices, so they should not be always in pair mode..
It's possible to add selection of found devices at some stage.

Locutus73
Captain Atari
Captain Atari
Posts: 351
Joined: Wed Feb 07, 2018 6:13 pm

Re: Direct Bluetooth gamepad support

Postby Locutus73 » Tue Apr 09, 2019 2:30 pm

Sorgelig wrote:I never advertise MiSTer supports Smart/LE devices.

I never said you did. I shared my experience (giving some feedback), not saying you did something wrong or asking something.

Sorgelig wrote:You need to use BREDR devices (classic Bluetooth).

Well, yes. But with some tweaking I had some success with BTLE (but sadly not witj K380 which is EDR).

Sorgelig wrote:BlueZ 5 has no scripts to pair the devices outside the bluetoothctl app. Do you want users to open console and use command line every time they need to pair gamepad?

Nope, I'm trying to find a solution for my goal (and possibly see if it can be generalized). Anyway are you totally sure you can't issue single commands throgh bluetoothctl? IIRC yesterday I sent some commands as a single line (i.e. bluetoothctl pair <dev>), instead of with its interactive prompt, but it was late, I was sleepy and I might be wrong. Maybe it can be used as the basis for cooking a script.

Sorgelig wrote:Main target for BT are gamepads. Keyboards, mice are just side support. If it works then good. If no - alas.

Legit.

Sorgelig wrote:There is a great choice of RF keyboards and mouses with dongles - so you don't have to mess with pairing. RF Keyboards are less hungry for batteries unlike BT. My Logitech K400r combo keyboard works like 1 year from one set of batteries. And i use it every day.

Yes I have a K400 plus and a Microsoft all-in-one media keyboard too (much better than the K400 IMHO). I'm trying to consolidate all mice and keyboards to a single pair with multiple host support. In the end the M720 and the K375S (but not the K380) support both bluetooth and the propietary Logitech dongle, so I'll skip Bluetooth for M+K with MiSTer and use BT only for joypads.

Sorgelig wrote:As for paring, i don't understand why you have many BT devices in pairing mode. This is not permanent BT mode for devices, so they should not be always in pair mode..
It's possible to add selection of found devices at some stage.

I don't know, but wherever I am (office and home), if I scan I see many devices in discoverable mode, it seems to be a common behavior. i.e. yesterday I always found my Sony Bravia Android TV and my neighbor Samsung TV. I turned off Bluetooth in my TV (no option to make it not discoverable, only BT on or off), but I couldn’t turn off my neighbors’ TV ;). And I found other devices too (i.e. my neighour's phones). Maybe the pairing procedure, after scanning discoverable devices could interrogate them for the supported profile, filtering out everything which isn’t a joypad, a mouse or a keyboard... those devices seem to not be permanetly discoverable so it's easier to setup an environment with just a discoverable pad/mouse/keyboard.

Regards.

Locutus73

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4165
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Direct Bluetooth gamepad support

Postby Sorgelig » Tue Apr 09, 2019 3:58 pm

Locutus73 wrote:Nope, I'm trying to find a solution for my goal (and possibly see if it can be generalized). Anyway are you totally sure you can't issue single commands throgh bluetoothctl? IIRC yesterday I sent some commands as a single line (i.e. bluetoothctl pair <dev>), instead of with its interactive prompt, but it was late, I was sleepy and I might be wrong. Maybe it can be used as the basis for cooking a script.

Generally speaking dbus-send is the way to go. It could be a best way. If it could be an easy simple command for bluetoothctl then it would be a lot of such examples in internet.

User avatar
nathanhardie
Retro freak
Retro freak
Posts: 16
Joined: Fri Dec 07, 2018 4:39 pm

Re: Direct Bluetooth gamepad support

Postby nathanhardie » Wed Apr 10, 2019 3:38 am

I just updated to the newest version of MiSTer and Linux. My 8bitdo receiver doesn't work anymore. I use to just plug in my receiver and set the controller's buttons. Now it can't recognize anything past controller test right. :shrug: ????? Help please?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4165
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Direct Bluetooth gamepad support

Postby Sorgelig » Wed Apr 10, 2019 4:35 am

No problems with 8bitdo receivers for me.

User avatar
nathanhardie
Retro freak
Retro freak
Posts: 16
Joined: Fri Dec 07, 2018 4:39 pm

Re: Direct Bluetooth gamepad support

Postby nathanhardie » Wed Apr 10, 2019 5:39 am

Sorgelig wrote:No problems with 8bitdo receivers for me.


I use an older IO board. It's the all in one board (version 5.3 maybe?). And I use the Makerspot usb hub. Could any of that be the cause?

warham
Atari freak
Atari freak
Posts: 59
Joined: Fri Oct 12, 2018 7:17 am

Re: Direct Bluetooth gamepad support

Postby warham » Wed Apr 10, 2019 7:32 am

nathanhardie wrote:
Sorgelig wrote:No problems with 8bitdo receivers for me.


I use an older IO board. It's the all in one board (version 5.3 maybe?). And I use the Makerspot usb hub. Could any of that be the cause?



That hub is not powered is it?

User avatar
nathanhardie
Retro freak
Retro freak
Posts: 16
Joined: Fri Dec 07, 2018 4:39 pm

Re: Direct Bluetooth gamepad support

Postby nathanhardie » Wed Apr 10, 2019 1:54 pm

Nope. Could you tell me what you all use?

Locutus73
Captain Atari
Captain Atari
Posts: 351
Joined: Wed Feb 07, 2018 6:13 pm

Re: Direct Bluetooth gamepad support

Postby Locutus73 » Thu Apr 11, 2019 8:06 am

nathanhardie wrote:Nope. Could you tell me what you all use?

I use this
https://www.amazon.it/dp/B00E0NHKEM
with this
https://www.amazon.it/dp/B005HIRC9M

Regards.

Locutus73

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4165
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Direct Bluetooth gamepad support

Postby Sorgelig » Thu Apr 11, 2019 1:15 pm

Locutus73 wrote:Yes I have a K400 plus

K400 Plus is much worse than K400r. It has slim up/down cursor keys. K400r has full sized cursor keys. Seeing this rubbish move from Logitech i've bought second K400r (it was hard to find in local store - everywhere only K400plus) in case if current one will break :)

warham
Atari freak
Atari freak
Posts: 59
Joined: Fri Oct 12, 2018 7:17 am

Re: Direct Bluetooth gamepad support

Postby warham » Fri Apr 12, 2019 8:51 am

Sorgelig wrote:
Locutus73 wrote:Yes I have a K400 plus

K400 Plus is much worse than K400r. It has slim up/down cursor keys. K400r has full sized cursor keys. Seeing this rubbish move from Logitech i've bought second K400r (it was hard to find in local store - everywhere only K400plus) in case if current one will break :)



returned k400+ and got the k400r off ebay. Thanks

Locutus73
Captain Atari
Captain Atari
Posts: 351
Joined: Wed Feb 07, 2018 6:13 pm

Re: Direct Bluetooth gamepad support

Postby Locutus73 » Fri Apr 12, 2019 10:01 am

People, take a look to Microsoft all-in-one media keyboard.
It's really really nice, IMHO much better than Logitech K400 variants and uses a non BT wireless dongle like the K400.
Image

Regards.

Locutus73

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4165
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Direct Bluetooth gamepad support

Postby Sorgelig » Fri Apr 12, 2019 6:34 pm

Locutus73 wrote:People, take a look to Microsoft all-in-one media keyboard.
It's really really nice, IMHO much better than Logitech K400 variants and uses a non BT wireless dongle like the K400.
Image

Regards.

Locutus73

same problem as K400plus - slim cursor keys. It may be not so important for generic PC use as mouse today has more work than up/down cursors keys. But for retro computers it's crucial. I don't recommend this keyboard.
K400r has longer key travel than this MS keyboard. MS is more like notebook keyboard.

Locutus73
Captain Atari
Captain Atari
Posts: 351
Joined: Wed Feb 07, 2018 6:13 pm

Re: Direct Bluetooth gamepad support

Postby Locutus73 » Fri Apr 12, 2019 7:25 pm

Sorgelig wrote:same problem as K400plus - slim cursor keys. It may be not so important for generic PC use as mouse today has more work than up/down cursors keys. But for retro computers it's crucial. I don't recommend this keyboard.
K400r has longer key travel than this MS keyboard. MS is more like notebook keyboard.

Yeah, that’s the point, I love short travel “isle key” keyboards, I use an Apple wired aluminum full keyboard all day long and I love it. IMHO the typing experience/feeling on the Microsoft all-in-one is greatly superior to what I got from the Logitech one which IMHO feels cheap. The touchpad experience is much superior too, it’s bigger and more responsive (i.e. the two finger scrolling on the Logitech is laggy, but that doesn’t impact MiSTer).
I never noticed the cursor key difference, so evidently it doesn’t bother me.

P.S.: I guess you will hate my current gaming PC and MiSTer (and AppleTV) keyboard.
Image
:lol:

Regards.

Locutus73

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4165
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Direct Bluetooth gamepad support

Postby Sorgelig » Fri Apr 12, 2019 9:46 pm

That's matter of taste. Some time ago i was using Apple aluminium keyboard a-la notebook shallow travelling. After some time i've got used to it, although i always had not enough feeling of keys.
Now i'm using Cherry MX based keyboard on PC with full travel keys and i like its feeling. Logitech K400r has like 3/4 of full travelling, so it's convenient for those who like mechanical switch keyboards.

Locutus73
Captain Atari
Captain Atari
Posts: 351
Joined: Wed Feb 07, 2018 6:13 pm

Re: Direct Bluetooth gamepad support

Postby Locutus73 » Sat Apr 13, 2019 7:10 am

Sorgelig wrote:Now i'm using Cherry MX based keyboard on PC with full travel keys and i like its feeling.

I never tried a Cherry MX switches based keyboard, I always have been curious... which kind/color of Cherry MX? This opens a whole new universe of different preferences...

Regards.

Locutus73

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4165
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Direct Bluetooth gamepad support

Postby Sorgelig » Sat Apr 13, 2019 9:42 am

I like brown ones. It's not so loud and provides good feeling of press.
My PC keyboard is Ducky One S Skyline with CD32 theme - must have for Amiga fans :)
20190413_174348.jpg
You do not have the required permissions to view the files attached to this post.

Glaurung
Atariator
Atariator
Posts: 24
Joined: Sat Mar 30, 2019 6:22 am

Re: Direct Bluetooth gamepad support

Postby Glaurung » Mon Apr 15, 2019 8:32 am

Can't pair my ps4 controller.Doesn't show any controller when I press f11
I have no problem pairing with raspi-recalbox-ps4, with the same BT dongle
I have to buy a mister compatible one?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4165
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Direct Bluetooth gamepad support

Postby Sorgelig » Mon Apr 15, 2019 9:04 am

Currently i don't know any incompatible BT dongle.
May be BT signal range is noisy in your area. If you have any RF devices around you like keyboards, mice, gamepads - switch them off and unplug their dongles. And then try to pair DS4 again. Usually RF devices use the same 2.4HGz as BT and may interfere the BT.

If you use not powered USB HUB or direct connection - it may work incorrectly as well.
P.S.: I hope you use original DS4. I don't know the compatibility with any 3rd-party PS4 wireless controllers.

Glaurung
Atariator
Atariator
Posts: 24
Joined: Sat Mar 30, 2019 6:22 am

Re: Direct Bluetooth gamepad support

Postby Glaurung » Mon Apr 15, 2019 10:03 am

Sorgelig wrote:Currently i don't know any incompatible BT dongle.
May be BT signal range is noisy in your area. If you have any RF devices around you like keyboards, mice, gamepads - switch them off and unplug their dongles. And then try to pair DS4 again. Usually RF devices use the same 2.4HGz as BT and may interfere the BT.

If you use not powered USB HUB or direct connection - it may work incorrectly as well.
P.S.: I hope you use original DS4. I don't know the compatibility with any 3rd-party PS4 wireless controllers.


My usb is not powered,so I supose that this is the problem :(

guvner
Atariator
Atariator
Posts: 19
Joined: Sun Dec 09, 2018 12:32 am

Re: Direct Bluetooth gamepad support

Postby guvner » Mon Apr 15, 2019 10:20 am

registering controllers on my unpowered hub is extremely wonky as well. Try unplugging the dongle and plugging it back in, maybe try switching the usb port. Chances are, it will eventually recognize your PS4 controller and once it has, it will connect without issue in the future (at least that is how it is for me). Ultimately a powered hub is definitely needed for bluetooth to work properly, though.

WellDodgy
Atarian
Atarian
Posts: 2
Joined: Mon Apr 15, 2019 4:24 pm

Re: Direct Bluetooth gamepad support

Postby WellDodgy » Mon Apr 15, 2019 7:49 pm

I'm also having problems getting any bluetooth dongles to work, I tried 3 (all report as being CSR devices).
I am using a Inateck OTG Hub which is powered.

dmesg shows it being plugged in:
[ 319.000503] usb 1-1.1: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=88.91
[ 319.000515] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 319.000529] usb 1-1.1: Product: CSR8510 A10

But it doesn't then identify it as a bluetooth dongle.
In the F11 pairing window I never see any devices when I put them into pairing mode (I tried a PS4 DS).

Any suggestions would be gratefully received!

Locutus73
Captain Atari
Captain Atari
Posts: 351
Joined: Wed Feb 07, 2018 6:13 pm

Re: Direct Bluetooth gamepad support

Postby Locutus73 » Tue Apr 16, 2019 10:51 am

WellDodgy wrote:I'm also having problems getting any bluetooth dongles to work, I tried 3 (all report as being CSR devices).
I am using a Inateck OTG Hub which is powered.

dmesg shows it being plugged in:
[ 319.000503] usb 1-1.1: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=88.91
[ 319.000515] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 319.000529] usb 1-1.1: Product: CSR8510 A10

But it doesn't then identify it as a bluetooth dongle.
In the F11 pairing window I never see any devices when I put them into pairing mode (I tried a PS4 DS).

Any suggestions would be gratefully received!


Any output from dmesg | grep Bluetooth ?

Regards.

Locutus73


Return to “MiSTer”

Who is online

Users browsing this forum: THaase and 6 guests