Dfu-util without sudo?

Okay - I’ve been banging my head against the wall for too many hours now trying to get dfu-util working without sudo.

My reasons for wanting this are:

  1. I use nvm, which doesn’t seem to play very nice with sudo, so sudo particle flash --usb requires I configure my “sudo path” to point to the particular instance of node I’m running.
  2. I’m calling dfu-util from within a python script (via subprocess.call) that I wrote to streamline product setup and testing. The script does other things, and everything gets messy because dfu-util needs sudo.

I installed dfu-util v0.8 using homebrew on a Mac running Yosemite, and out of the box it didn’t require sudo.

I also managed to configure my chromebook in dev-mode running Crouton (with Ubuntu 14.0.4) to not require sudo… Unfortunately, I didn’t think too much of this at the time. So I’m not 100% sure, but I’m pretty sure it was as easy as just adding my user to a couple groups (dialout, serial, usb).

However, I’m not having the same luck on my work machine (running Ubuntu 14.0.4). I’ve got dfu-util v0.8 up and running, but I can’t configure it to not require sudo. I’ve added myself to “dialout”, however neither the “serial”, nor “usb” groups seem to exist (they may have been a Crouton thing).

I assumed it would be as easy as:

ls -l /dev/<myPhotonInDfuMode>

Then just adding myself to whatever group has permission, but the Photon doesn’t seem to show up in /dev in dfu-mode.

I’m now trying with lsusb which let’s me see the device… I’m going to keep tinkering, but I figured I’d ask on the forums in case anyone has already solved this.

You need to set up UDEV rules. Some info here:


Awesome, I just started reading about UDEV. Thanks, I’ll check the post.

Solved. Thank you!

1 Like