DFU-util udev rules

I’m wondering if any awesome people in our community knows how the udev rule should be for dfu-util in linux

Managed to compile dfu-util 0.8 on Raspbian for Rpi V2 but sudo is required to do stuff. Would love to not use sudo whenever possible.

Thanks~ :smiley:

I needed this too, so I created this udev rules file to enable use of particle flash --usb without sudo.

Credits to the creator of the Teensy board (Paul Stoffregen - [Name added by ScruffR]) for the basis of this udev file.

Here’s another good trick from the Teensy creator to prevent having the serial port change device each time you plug the device in:

If using USB Serial you get a new device each time (Ubuntu >9.10)
eg: /dev/ttyACM0, ttyACM1, ttyACM2, ttyACM3, ttyACM4, etc
   apt-get remove --purge modemmanager     (reboot may be necessary)
4 Likes

This was very helpful. Thanks!

1 Like

Hello jvanier,
I have copied this file /etc/udev/rules.d directory. It is named it as 50-particle.rules. When I set my photon in DFU mode(blinking yellow) and typed dfu-util -l in the terminal. I am getting

dfu-util: Cannot open DFU device 2b04:d006. It gets opened if I use sudo. I even restarted my machine, plugged in and plugged back USB but it’s still the same

I am running arch linux.

Thanks for your time

I’ve never used arch. I’m not sure if there’s a difference there. Can you search if udev rules are stored somewhere else for your system?

[UPDATE]: changing the file name to 99-particle.rules fixed it for me.
In arch linux, the udev rules are stored under /etc/udev/rules.d

Thanks!

2 Likes