Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration interface (via HID feature reports) #30

Closed
skuep opened this issue Jun 24, 2023 · 3 comments
Closed

Add configuration interface (via HID feature reports) #30

skuep opened this issue Jun 24, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@skuep
Copy link
Owner

skuep commented Jun 24, 2023

I am currently thinking about how to implement an interface to the AIOC, so that it can be customized. This will come in handy later for various planned functionalities (see e.g. #19).

My first plan is to use HID feature reports. They are an (so far) unused feature of the AIOC HID endpoint (which was originally implemented for CM108 which I suspect will not be impacted by this addition).

The interface has to be lightweight, i.e. it has to operate with as little fuzz as possible. No installing of dubious libraries and such. I think HID will be good for that. I am planning on writing a simple python CLI application (maybe with some abstraction library for others to use for non-CLI stuff) to control the AIOC. I am planning to use the python package "hidapi", it should work on Windows, Linux and macOS.

For now, I would like anyone interested to run this little test script on their hardware. Please post the output of the script and add information on what OS you are using. This test requires AIOC v1.2.0 firmware.

Install hidapi for Python:
python -m pip install hidapi (or python3 instead of python e.g. for Linux)

Test script:

import hid

# Open device
# In the future we would need to check if multiple AIOCs are connected. 
# In that case we require an additional serial number to select the correct device.
aioc = hid.Device(vid=0x1209, pid=0x7388) 

# Print information. Should output
# Manufacturer: AIOC
# Product: All-In-One-Cable
# Serial No: xxxxxxxx
print(f'Manufacturer: {aioc.manufacturer}')
print(f'Product: {aioc.product}')
print(f'Serial No: {aioc.serial}')

# Try to get feature report from AIOC. 
# This is not implemented on the AIOC (yet), so it will return an empty report with id 0x17 (23 decimal) and 0 length
# b'\x17'
print(aioc.get_feature_report(23, 8))
@ITCMD
Copy link

ITCMD commented Sep 7, 2023

Wanted to throw a note here requesting the configurability of the PTT2 pad in the interface as per #34. Thanks!

@skuep
Copy link
Owner Author

skuep commented Sep 10, 2023

Alright, have a look at this PR:
#37

I tried implementing your feature request as a first example. Firmware binary is included and a sample Python script on how to change the AIOC settings.

@skuep
Copy link
Owner Author

skuep commented Dec 30, 2023

Merged to PR, will be implemented in the next release. PTT2 will be able to be configured as shown in the PR. I will close this issue for now, you can re-open this issue if you run into troubles.

@skuep skuep closed this as completed Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants