David’s Status Report for 3/11/2023

What did you personally accomplish this week on the project? Give files orphotos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours).

In the past 2 weeks, I worked on solidifying the plan for the entire project integration and also the HID section specifically. I thought about alternative ways to communicate to the host PC while making set up easy.

For instance, I was considering turning the controller into a mouse/keyboard hybrid device that will automatically control the mouse/keyboard inputs on the host PC, but the problem now is that the cursor has to always be in the center of the screen. One way to solve this issue is to send the cursor location as well as the screen area to the device so it can perform the necessary calculations. However, I thought this method would be a bit convoluted and makes many assumptions.

The solution I ended up choosing is to send only the motion data to the computer as if it were a video game controller. Then a Python application running on the PC would translate these into the appropriate commands. This way, we can build in the application-specific controls as well as mouse cursor and display tracking.

I also did more research into the process to implement the HID controller. It’s quite poorly documented, but thanks to some engineers and their blogs, I was able to figure out how it works.

First, I would have to configure the RPi to act as a USB peripheral device through the HID device configuration with configfs. Then, I would write the software that sends the appropriate data to the HID file descriptor. On the other hand, I would also have to test whether the RPi is correctly being detected as a gamepad on a Windows PC as well as the data it’s sending to the PC. Once this is done, I can start on the host PC software to parse and translate the data into commands.

blog post about HID and how it should be set up

configfs documentation

reference implementation for RPi HID (GitHub)

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the project schedule?

The project is currently on schedule. See Gantt Chart below

As you’ve now established a set of sub-systems necessary to implement your project, what new tools have your team determined will be necessary for you to learn to be able to accomplish these tasks?

We determined that I have to learn how to use the HID device specification and driver provided by the Linux kernel as well as the HIDAPI on Windows to accomplish the tasks.

Leave a Reply

Your email address will not be published. Required fields are marked *