Hi, I followed this video to set up an environment to write Rust code for the BBC micro:bit
I was successful until running cargo embed. I get the error message:
cargo embed --chip nRF52833_xxAA
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
Config default
Target /home/markus/dev/rust/hello/target/thumbv7em-none-eabihf/debug/hello
Error Probe could not be created
Caused by:
0: hidapi error: Failed to open a device with path '/dev/hidraw3': Permission denied
1: hidapi error: Failed to open a device with path '/dev/hidraw3': Permission denied
/dev/hidraw* are all owned by root. So far, so good. But I don't know which permissions I should set.
I changed the owner to my user, which works. But wouldn't it be better to change the group? But which group?
Try running ls -l /dev/hidraw* and look which group they belong to. Also check whether your distro is using udev and if they have rules for your device.
I confess I don't know how all this works.
I think the second line will give RW permissions on all hidraw devices, but I couldn't work out a way to make it more specific.
Leaving the idVendor and idProduct stuff on there as well didn't work, I guess because they're identifiers for the USB subsystem.
Anyway, this got me working, hopefully you too.