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

Document needed udev rules for USB HID/CDC devices #98

Open
maxgerhardt opened this issue Jan 17, 2023 · 3 comments
Open

Document needed udev rules for USB HID/CDC devices #98

maxgerhardt opened this issue Jan 17, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@maxgerhardt
Copy link
Collaborator

It may seem obvious to a long-time Linux user, but avarice for me failed to retrieve the USB product string of the enumerated devices in openhid() (walk->product_string being a nullptr), but that's just when udev rules aren't installed so that the regular user has access to the e.g. CMSIS-DAP based HID devices. The websit linked in #97 mentions this, but doesn't give a general enough udev file to directly use. We should come up with one.

@maxgerhardt maxgerhardt added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 17, 2023
@maxgerhardt
Copy link
Collaborator Author

Indeed it was udev rules. Initially
grafik

now
grafik

after adding /etc/udev/rules.d/99-atmel-medbg-cmsis.rules as

# mEDBG CMSIS-DAP
SUBSYSTEM=="tty", ENV{ID_REVISION}=="03eb", ENV{ID_MODEL_ID}=="2145", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_CANDIDATE}="0"
SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="2145", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"

and doing

sudo udevadm control --reload-rules
sudo udevadm trigger

and replugging the device.

@dl8dtl
Copy link
Collaborator

dl8dtl commented Jan 18, 2023

The question is where this might best be documented.

The doc subdirectory contains a bit of documentation, but nothing like installation instructions.

I think it makes sense we add a toplevel README.md, now that the project is on Github, and document things like basic installation and setup there.

Opinions?

@dl8dtl
Copy link
Collaborator

dl8dtl commented Jan 18, 2023

Btw., the usual (Linux) policy would not use mode 0666, but rather 0660, and assign to group plugdev.

Legitimate users are then supposed to be members of plugdev in order to attach that kind of devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants