-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[doc] Verify correct udev configuration for device access #764
Comments
How did you install stlink?
Note that you may also need to update your udev rules if you have not already. |
Hello and thanks for the quick answer I also copied the udev rules into However when I do Just for information Do you have an idea, what I should do? |
It works fine for me under ubuntu 18.04. To investigate, start by plugging your STLINK device into the usb port. Then run
Note the bus number (005) and the Device (017). You should then do: On my system I see the following:
which is world writable (this is from the MODE:="0666" below). I have several files in my /etc/udev/rules.d directory. In this particular case, the 49-stlinkv2-1.rules file contains the following:
and the idVendor od 0483 and idProduct of 374b matches the vendor id from the lsusb output. Make sure that you have all 3 files from here: https://github.com/texane/stlink/tree/master/etc/udev/rules.d in your /etc/udev/rules.d directory. After copying new files or editing excisting files in /etc/udev/ruled.d you should run the following:
to ensure that the rules actually take effect. Using the trigger command means that you shouldn't need to unplug and replug the device, but you might want to try that for good measure as well. If the VID:PID of your device doesn't match those in any of the 3 files, then you may need to create a custom rule file to match your VID:PID. |
Hello and thanks for you answer |
@dhylands would you like to update the documentation with the extensive description? At https://github.com/texane/stlink/blob/master/doc/compiling.md#permissions-with-udev. |
@dhylands: May I copy-paste your description to our documentation? |
@Nightwalker-87 By all means - feel free. |
- [doc] Updated list of supported devices - [doc] verify udev-rules (Closes #764) - Removed old issue-templates. - Updated BSD-3 license file.
@davehylands: Thank You for your helpful contribution and feedback. Closing this with commit d3c11fb as we know by now that the udev configuration is functional. The problem appears to be an isolated issue on a local installation that we can not reproduce. |
- [doc] Updated list of supported devices - [doc] verify udev-rules (Closes #764) - Removed old issue-templates. - Updated BSD-3 license file.
- [doc] Updated list of supported devices - [doc] verify udev-rules (Closes stlink-org#764) - Removed old issue-templates. - Updated BSD-3 license file.
- [doc] Updated list of supported devices - [doc] verify udev-rules (Closes stlink-org#764) - Removed old issue-templates. - Updated BSD-3 license file.
On Ubuntu and deirvated distros, st-flash and st-util require sudo to work properly.
Adding them to sudoers (via visudo) remove the need for password but not for sudo.
Adding the user to dialout group won't change anything.
Adding a GROUP="myusername",\ line to the udev rules won't change anything.
It would be very much appreciated to provide documentation on how to remove this need for sudo, so that it will make integration with IDEs (like VSCode and others) very much easier.
The text was updated successfully, but these errors were encountered: