milador / RaspberryPi-Joystick

A virtual HID USB joystick created using Raspberry Pi
MIT License
119 stars 29 forks source link

How to creat virtual a Bluetooth HID Joystick? #25

Open xiaoye-cn opened 2 years ago

xiaoye-cn commented 2 years ago

Hi, milador!

I admire your work! Thanks! I followed your tutorial and I successfully created a USB HID joystick on the raspberry pi 4B and made my windows pc successfully receive data from the USB port.

My questions are as follows: I am working on a RaspberryPi 4B. Since the controller needs to be moved, it cannot be connected using a USB cable. I want the RaspberryPi to emulate a Bluetooth gamepad like a ps4 Bluetooth wireless controller.

I'm trying to change the class of my Pi4B hci0 device to make the pc think the device is a Bluetooth Joystick. But I didn't succeed. The link is broken as soon as it is established.

Do you know how to make RaspberryPi 4B virtual a Bluetooth Joystick? Looking forward to your reply.

thanks again!

GuoFei

milador commented 2 years ago

Hi @xiaoye-cn Thank you and I am glad you are finding the project useful. You probably want to look at a recent project emulating bluetooth keyboard or mouse as bluez has changed over the years. Key Mime Pi project is a great example. You also want to make sure that you are running the custom bluetooth service at the boot. That is probably the most challenging part of the process.

I am doing a major update in summer so let me know if you get it working.

xiaoye-cn commented 2 years ago

Hi, milador!

thank you for your reply. I read the project "Key Mime Pi". Yes, it's a great example. However, what I think the "Key Mime Pi" is actually, the Pi connects to the Server's USB port and creates a virtual USB HID keyboard. Between the Pi and the browser PC is a Bluetooth serial data connection. So it looks like a wireless keyboard. So it's not the solution I need

I want to create a virtual Bluetooth wireless HIDJoystick device between Pi and PC. Just like a normal Bluetooth game Joystick.

yes, I agree. It is important to maintain a stable Bluetooth service while the Pi is booting.

I am looking forward to your major update. If I make any progress. I will share it with you.

I wish you well in your work

Best,

GuoFei

touchgadget commented 2 years ago

@xiaoye-cn There is a project to emulate a Nintendo Switch game controller over Bluetooth using raspberry Pi. A game controller is more complex (2 joysticks and a dpad) than a joystick but maybe this will help.

https://github.com/marcus-stevenson/joycontrol-ms

xiaoye-cn commented 2 years ago

Thank u so much!

发自我的iPhone

在 2022年7月2日,02:07,touchgadget @.***> 写道:



@xiaoye-cnhttps://github.com/xiaoye-cn There is a project to emulate a Nintendo Switch game controller over Bluetooth using raspberry Pi. A game controller is more complex (2 joysticks and a dpad) than a joystick but maybe this will help.

https://github.com/marcus-stevenson/joycontrol-ms

— Reply to this email directly, view it on GitHubhttps://github.com/milador/RaspberryPi-Joystick/issues/25#issuecomment-1172865577, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARZRR67AXRAUDYQUGLVUCSTVSABD5ANCNFSM5QY5EHSQ. You are receiving this because you were mentioned.Message ID: @.***>