mitxela.com forum
Welcome. Please log in or register.

« PreviousPages: 1 [2]

Bluetooth HID gamepad using HC-05 module: Test and Software
thepolish Posted: 6 Jun 2018, 02:35 AM
Avatar


Member
Posts: 5
Joined: 24-May 18
The jig worked as I hoped. Only have to solder 4 wires now (Gnd, VCC, TX and RX) and I would have to solder 3 of the 4 anyway.

I used your code - built it in Atmel Studio and then used the hex file it creates (same as bin rodrigomx mentioned above) and imported it into minipro as intel hex, set fuse bits to 0xE4/0xDF/0xFF and programmed using the TL866.

Used a breadboard to test using phone emulator to set hardware keys - and as expected - everything works! Awesome documentation on this Tim - can't thank you enough!

I broke down and bought a programmer because I was fighting too much with the ftdi board - it worked and got my feet wet, plus I learned on it, but for 20 bucks - meh, I'll find other uses for it too.

(User posted image)


-------------
[top]
mit Posted: 7 Jun 2018, 12:09 AM
Avatar
yeah whatever

Admin
Posts: 541
Joined: 4-May 16
Great stuff. Yeah the FTDI programmer is a pain, if I had known that there were cheaper programming cables back when I first did this I probably wouldn't have bothered.

-------------
[top]
thepolish Posted: 7 Jun 2018, 02:02 AM
Avatar


Member
Posts: 5
Joined: 24-May 18
Glad you didn't - I wouldn't have been able to w/o your tutorial. Trying to put the 2313a into a regular SNES now, PIA I swear, burnt up one pic already taking too long to solder.

-------------
[top]
Dinsdale Posted: 24 Feb 2019, 02:28 PM
Avatar


Member
Posts: 2
Joined: 24-February 19
Hey everyone

I do apologise for bumping a thread, I have sent the below email to Mit but I wanted to see if anyone else could help also (I'm that desperate to get this bloody fixed).

Hello Mitxela

I come to you in desperate need of help with an issue that is driving me nuts. Your YouTube video HERE and subsequent document HERE inspired me to reach out to you. Previously, I have tried Raspberry Pi forums, Retropie forums, Reddit, Facebook, and even reached out to individual bloggers such as yourself with no luck.

Here is the issue in a nutshell. I found a video on YouTube HERE that was a guy from the Ukraine converting a regular old Sega Mega Drive 3 button gamepad to Bluetooth. The video is an hour long but I didn’t understand it, but I got in contact with him – and with the magic of Google Translate, agreed to send him some money and two controllers if he’d send them back converted. He did this, and even did an accompanying video HERE. He even provided a better battery than the one in the original in my controllers.

So, I got the pads back to the UK, and they look great. The problem is, due to my naivety and ignorance, I assumed they’d simply work with my Raspberry Pi (running RetroPie) despite him only testing on Android in the video. Unfortunately, they don’t work with Pi. I can pair, trust, but connecting brings up an error. Details of which are HERE.

Now, due to the aforementioned video and blog you did, I can see you’ve managed to get an HC-05 module working as a gamepad and recognising input. I am wondering if my issue can be solved by anything you have done. I don’t want to send the pads back to the Ukraine, and to be honest he doesn’t know what the issue is anyway (and imagine trying to explain this to someone with Google Translate).

CAN YOU HELP?

I do hope you find time to reply, and hope even more so you can be so kind as to help me work towards a solution. I realise I’ve posted a lot of links but I wanted to keep the story short and sweet for ease of reading.


-------------
[top]
mit Posted: 24 Feb 2019, 03:17 PM
Avatar
yeah whatever

Admin
Posts: 541
Joined: 4-May 16
Hi, the first thing you should do is work out whether it's the controller or the pi that's the problem.

Have you tried the controllers with Android? Do they work natively (HID) or require some special software? What about on Windows or OSX?

If they work with those systems but not the pi, it could well be a problem with the raspberry pi bluetooth drivers. This might sound stupid, but if that's the case, the solution I recommend is ignoring the built-in bluetooth of the raspberry pi, and buying a USB-bluetooth dongle.

-------------
[top]
Dinsdale Posted: 24 Feb 2019, 04:45 PM
Avatar


Member
Posts: 2
Joined: 24-February 19
Well, this connected to my girlfriends Android phone without issue earlier (she's not here now and I have an iPhone so can't check).

I did actually buy a USB dongle but there was no change, but I just tried it on Windows and it pairs... but doesn't connect.

Then I downloaded a tool called BlueDuino and that did make it connect... I could press the buttons on the controller in the terminal and could see activity.

As for the Pi, I downloaded latest Bluetooth, but can't be sure if when I use the dongle that it is actually using that dongle and not the onboard bluetooth. I think it uses the dongle, as it flashes when I do a search.

I've been reading, is it because HC-06 is a slave and it should be an HC-05 maybe?

I dunno, I'm out of ideas with this... it's been doing my head in for weeks.

-------------
[top]
mit Posted: 25 Feb 2019, 06:23 PM
Avatar
yeah whatever

Admin
Posts: 541
Joined: 4-May 16
Again, you need to confirm whether it is usable as a gamepad with anything else. Try it on your iphone, don't just see if it connects, try and play a game with it.

On the pi, I can't remember the details right now, but you can see loaded kernel modules with lsmod and you can add or remove modules with modprobe. Use dmesg to see the kernel messages, if you run
dmesg -w
and then connect/disconnect the bluetooth dongle it might give you some helpful information. You can probably unload the module for the built-in bluetooth adapter to be sure that the new one is running.

Also, there are lots of different types of bluetooth dongles, if your USB dongle is a cheap one it might not work either.

-------------
[top]
CesarHinde Posted: 16 Mar 2020, 05:28 PM
Avatar


Member
Posts: 1
Joined: 16-March 20
Hi...I tried this project first. I bought 4 HC-05 modules and 1 RN-42. Unfortunately I don't have ANYTHING that has a parrellel port on it. And I've tried ftdi USB flashing but honestly don't have the intelligence to pull this off, I'm certain I've bricked 2 of my HC-05 modules, as a result.
If you manage to pull this off would you be willing to flash my remaining modules (the RN-42 is slated for another project I'm working on)?

edit: whyyyyy

Last edit by mit at 8 Apr 2020, 10:44 PM

-------------
[top]
mit Posted: 16 Mar 2020, 11:52 PM
Avatar
yeah whatever

Admin
Posts: 541
Joined: 4-May 16
I can't do it for you, but if you get hold of one those CSR USB-SPI adapters like the picture above, you should be able to do it without needing a parallel port or messing with FTDI drivers.

-------------
[top]
hafeezbhutta Posted: 17 Feb 2023, 07:31 PM
Avatar


Member
Posts: 3
Joined: 17-February 23
Hi Mit
I need your comments on this.
https://github.com/Shadowtrance/BluetoothHidGamepad

Should i use SH,0240 for this?

Last edit by hafeezbhutta at 17 Feb 2023, 07:32 PM

-------------
[top]
mit Posted: 18 Feb 2023, 10:33 AM
Avatar
yeah whatever

Admin
Posts: 541
Joined: 4-May 16
That looks basically the same, yes you should run the same config commands before using it. Once you've run the config commands you can try sending reports to it and seeing if it works, I think I gave some examples on the project page.

Honestly I wouldn't bother with an ATtiny2313 for this these days, just use a Rasbperry Pi Pico.

-------------
[top]
hafeezbhutta Posted: 18 Feb 2023, 01:32 PM
Avatar


Member
Posts: 3
Joined: 17-February 23
Can you write a code for raspberry pi pico? I am tired of attiny2313 unable to burn hex, i think it's dead

Last edit by hafeezbhutta at 18 Feb 2023, 01:33 PM

-------------
[top]
hafeezbhutta Posted: 18 Feb 2023, 01:40 PM
Avatar


Member
Posts: 3
Joined: 17-February 23

(User posted image)
Will this do?

-------------
[top]
mit Posted: 18 Feb 2023, 06:46 PM
Avatar
yeah whatever

Admin
Posts: 541
Joined: 4-May 16
QUOTE (hafeezbhutta)
Can you write a code for raspberry pi pico? I am tired of attiny2313 unable to burn hex, i think it's dead
I'm not going to write it for you, sorry. But there are lots of tutorials out there, it's much more beginner friendly.

-------------
[top]

« PreviousPages: 1 [2]

Sign in to post a reply.