Dinsdale
Posts: 12
Joined: Sat Feb 02, 2019 4:33 pm

!!!ATTENTION: DOUGLAS6!!! Error connecting HC-06 gamepad

Sun Feb 17, 2019 9:07 pm

Hey guys

Had a problem for weeks and I am no further forward. I've been seeking help here, Reddit, RetroPie forums, Facebook, and Twitter - and nobody seems to be able to help. It's extremely frustrating. In a nutshell - the issue I am having is I can't pair a Bluetooth gamepad controller to my Rasperry Pi 3B+. It is an HC-06 module.

Code: Select all

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/dbud/connection.py", line 604, in msg_reply_handler
reply_handler(*message.get.args_list(**get_args_opts))
File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluez-simple-agent", line 118, in pair_reply dev_connect(dev_path)
File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluez-simple-agent", line 38, in dev_connect dev.Connect()
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
 **keywords)
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.NotAvailable: Operation currently not available
Here's the things I've tried.

- Connected to Android device - controller works perfectly!
- Updated bluez from 5.43 to 5.48 - still same issue
- Updated bluez from 5.48 to 5.50 - still same issue
- Tried connecting via Raspi Config - (pairing works, trusting works, connecting gives error described above "Failed to connect: org.bluez.Error.NotAvailable. Operation not available")
- Tried connecting manually via bluetoothctl - (pairing works, trusting works, connecting gives error "Failed to connect: org.bluez.Error.NotAvailable")
- Tried connecting via sudo "rfcomm connect hci0 00:18:E4:34:FD:B5" - this works but doesn't allow me to use this is an input device and isn't recognised as a controller using cat /proc/bus/input/devices
- Tried following this thread: https://www.raspberrypi.org/forums/view ... 1&start=25

So, can someone PLEASE help me with this issue? It is driving me INSANE! I've been searching these forums and the user Douglas6 seems to know alot about HC-06 but I have tried messaging him but I don't have the option.
Last edited by Dinsdale on Fri Feb 22, 2019 7:00 pm, edited 1 time in total.

Dinsdale
Posts: 12
Joined: Sat Feb 02, 2019 4:33 pm

Re: Error connecting HC-06 gamepad

Fri Feb 22, 2019 5:15 pm

Anyone? Please! :-(

Dinsdale
Posts: 12
Joined: Sat Feb 02, 2019 4:33 pm

Re: Error connecting HC-06 gamepad

Fri Feb 22, 2019 6:44 pm

@Douglas6, where art thou?

User avatar
Douglas6
Posts: 4853
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: !!!ATTENTION: DOUGLAS6!!! Error connecting HC-06 gamepad

Fri Feb 22, 2019 9:50 pm

So, I'm a little confused. You say you have a Bluetooth game pad, but the you say it's an HC-06. An HC-06 is a serial communications module, nothing like a game pad or HID. You would also need some software on the Pi monitoring the virtual serial port and creating key press or joystick events.

You also say that you can connect to the device with rfcomm, so it sounds like it's not a hardware issue. If you could provide a make/model/link to the device, and also what software/game you are trying to use it with, that might help someone to make a more informed reply.

Dinsdale
Posts: 12
Joined: Sat Feb 02, 2019 4:33 pm

Re: !!!ATTENTION: DOUGLAS6!!! Error connecting HC-06 gamepad

Fri Feb 22, 2019 10:53 pm

Douglas6 wrote:
Fri Feb 22, 2019 9:50 pm
So, I'm a little confused. You say you have a Bluetooth game pad, but the you say it's an HC-06. An HC-06 is a serial communications module, nothing like a game pad or HID. You would also need some software on the Pi monitoring the virtual serial port and creating key press or joystick events.

You also say that you can connect to the device with rfcomm, so it sounds like it's not a hardware issue. If you could provide a make/model/link to the device, and also what software/game you are trying to use it with, that might help someone to make a more informed reply.
Firstly, THANK YOU for replying. You’ve got no idea how much I’ve wantwd you to reply - as every single thing I’ve Google’d lead me to posts by you.

Secondly, let me explain in order to give some background. I got in touch with a guy (who spoke Russian) about a modification he did to an original Sega Mega Drive control pad to convert it to Bluetooth.

He agreed to convert two pads if I sent them. He had only tested them on a Mega Drive emulator running Android. He did this, and sent them back. It runs fine with Android - but the problem is, I naively and ignorantly thought they would work with Pi too. He said he guaranteed it would work on Android, and to be fair - it does.

I’m trying to connect it to a Raspberry Pi that is using Retropie. I have other controllers that work perfectly - so I think you’re along the right lines when you say I am missing something fundamental to get it to work.

All I know is that it’s an HC-06 module and he put a YouTube video you testing a “HID gamepad”.

This is a link to another video that explains how he is doing this with Adriano. Unfortunately, he’s speaking in Russian, but this might give you some insight: https://youtu.be/4w8EWIbK0kE

Can you help? I can run commands via SSH, and consider myself somewhat tech-savvy - but I really think I am missing something here.

Thank you again for your reply.

User avatar
Douglas6
Posts: 4853
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: !!!ATTENTION: DOUGLAS6!!! Error connecting HC-06 gamepad

Fri Feb 22, 2019 11:44 pm

That's a tough one. A game controller hacked together by a Russian guy, with a how-to video in a language I don't understand. I've never heard of 'Adriano', and a Google search only returns references to a Brazilian footballer. He appears to be using a microprocessor which could be an Arduino tho I don't recognize the board offhand.

I still maintain that he's using some sort of (custom?) app on the phone that translates serial input to HID events. Or, it could be built into the emulator, I suppose. That would probably need to be duplicated to run on a Pi. That would exceed my knowledge of HID programming. If you want to go down that road, I would begin by inspecting the results of various button presses using minicom or another serial terminal program on the Pi.

Sorry I couldn't be of further help.

Dinsdale
Posts: 12
Joined: Sat Feb 02, 2019 4:33 pm

Re: !!!ATTENTION: DOUGLAS6!!! Error connecting HC-06 gamepad

Sat Feb 23, 2019 11:08 am

Douglas6 wrote:
Fri Feb 22, 2019 11:44 pm
That's a tough one. A game controller hacked together by a Russian guy, with a how-to video in a language I don't understand. I've never heard of 'Adriano', and a Google search only returns references to a Brazilian footballer. He appears to be using a microprocessor which could be an Arduino tho I don't recognize the board offhand.

I still maintain that he's using some sort of (custom?) app on the phone that translates serial input to HID events. Or, it could be built into the emulator, I suppose. That would probably need to be duplicated to run on a Pi. That would exceed my knowledge of HID programming. If you want to go down that road, I would begin by inspecting the results of various button presses using minicom or another serial terminal program on the Pi.

Sorry I couldn't be of further help.
Sorry, my mistake. It is Ardiuno.

So are you saying I’m unlucky then? There’s nothing I need to switch on that you know of that will help with this?

User avatar
scruss
Posts: 3155
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: !!!ATTENTION: DOUGLAS6!!! Error connecting HC-06 gamepad

Sat Feb 23, 2019 12:52 pm

It's apparently possible to customize the HC-06 firmware so it behaves as a HID device, so these might not be strictly serial.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Dinsdale
Posts: 12
Joined: Sat Feb 02, 2019 4:33 pm

Re: !!!ATTENTION: DOUGLAS6!!! Error connecting HC-06 gamepad

Sat Feb 23, 2019 2:52 pm

scruss wrote:
Sat Feb 23, 2019 12:52 pm
It's apparently possible to customize the HC-06 firmware so it behaves as a HID device, so these might not be strictly serial.
Thanks, and he may have done just that because he uploaded another video yesterday entitled “testing Bluetooth HID gamepad” but I can’t find it now...

So what can I do to attempt to get this to work? It pairs and trusts just fine, and will only connect with rfcomm but it isn’t listed as an input device when I do this.

Return to “Troubleshooting”