What did you personally accomplish this week on the project? Give files or
photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours).
This week, I spent my time writing the peripheral HID controller code and getting it to work on the Raspberry Pi. I also wrote a script in Python that tests every data type in the HID report. After writing the code, I tested this system on the Pi with the install script. I had to test two things: (1) if the Pi connection through the USB-C port and the power splitter was working as intended, and (2) if the Pi is recognized as a peripheral device.
When I installed the drivers and the kernel configuration with configfs with the install script, I found that the connection through the USB-C port was working as intended. Plugging the Pi to my laptop caused it to show up in Windows (in Parallels) as a USB HID device. However, it initially did not work and failed to start due to a setup error (error 10) as seen in Windows Device Manager. I was able to trace the problem to the install script. In order to easily debug the HID report descriptor, I wrote it in a Python file that is relatively easy to read. Unfortunately, I did not notice that the Python file was being called in the setup script without it being present in the same folder. To fix this, I hard-coded the report descriptor value result from the Python script into the setup script. After I made this change, the Pi was successfully recognized as an HID gamepad.
Here is a demo of Windows receiving the test inputs from my test script. The test script exercises some positive and negative values for each data axis.
https://drive.google.com/file/d/1EWyLNByB8uvyoV85uuTF6MlHb0v3GAD7/view?usp=sharing
Next week, I will work on getting the macros working on Windows from a Python program. Additionally, I should also integrate the setup module with the HID controls.
Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the project schedule?
I am 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?
Since the next part is figuring out how to control the cursor and inputs on Windows, I have to learn how to do that from Python. In addition, I have to learn how to use HIDAPI on Windows to parse the HID input.