Arduino Bluetooth N64 Controller - Writing a Linux Driver?

I am working on a small Arduino project to create an N64 Bluetooth joystick for my Ubuntu. I managed to find a sketch to display the status of the controllers through the serial port, and it works fine. Also sending TX and RX to a small Bluetooth CSR module, I work great.

When I connect to the device, I need to use the “rfcomm binding” to see the device in my dev directory, and “cat'ing output” shows that all the data is passing too.

My question is, what are my next steps in order to make Linux recognize this device as a joystick - that is, / dev / js 0. If I know what I need to do to achieve this, I can read about the necessary steps, but at the moment I have no idea where to start without doing anything like this in the past. Should I search in the creation of a kernel module?

Any information or bunches in the right direction will generally be appreciated - even if it's just an observation.

+4
source share
1 answer

Writing your own kernel code is certainly not what you need to do here.

To make your project appear as a joystick device on Linux, you want to present it using the Bluetooth HID profile . In this case, everything should "work" on the client side, and you will see an entry in / dev. The HID profile is quite complex and is used by most devices of the Bluetooth interface - keyboards, mice, game controllers, etc. Part of Bluetooth is actually basically just a thin shell over the USB HID protocol.

Of the sounds of things that your device currently does not advertise on its own using this profile.

+2
source

All Articles