# Dfu-util doesn't connect to core on Ubuntu \[Solved\]

**URL:** <https://community.particle.io/t/dfu-util-doesnt-connect-to-core-on-ubuntu-solved/6987>\
**Category:** Troubleshooting\
**Created:** [September 17, 2014, 3:34am UTC](https://community.particle.io/t/dfu-util-doesnt-connect-to-core-on-ubuntu-solved/6987 "2014-09-17T03:34:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CloudformDesign](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@CloudformDesign](https://community.particle.io/u/CloudformDesign)\
**Post date:** [September 17, 2014, 3:34am UTC](https://community.particle.io/t/dfu-util-doesnt-connect-to-core-on-ubuntu-solved/6987/1 "2014-09-17T03:34:31Z")

</div>

I am having a lot of problems creating my dfu-util toolchain on a linux machine. I am currently running Ubuntu 14.04.

First I put my device in dfu mode so that it is blinking yellow

I run `sudo apt-get install dfu-util openssl`. When I try to run `spark flash blink` (a simple blinking program) I get this error:

> FOUND DFU DEVICE 1d50:607f  
> checking file blink.cpp  
> spawning dfu-util -d 1d50:607f -a 0 -i 0 -s 0x08005000:leave -D blink.cpp  
> invalid dfuse address: 0x08005000:leave  
> Error writing firmware...

as a note: `dfu-util -l` gives

> dfu-util 0.5

> (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.  
> (C) 2010-2011 Tormod Volden (DfuSe support)  
> This program is Free Software and has ABSOLUTELY NO WARRANTY

> dfu-util does currently only support DFU version 1.0

> Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=0, name="UNDEFINED"  
> Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=1, name="UNDEFINED"

I read on other forum topics that you should install dfu-util version 0.7 or above. Obviously I am running 0.5, so this should be the issue. Ok...

```auto
sudo apt-get remove dfu-util
wget http://dfu-util.gnumonks.org/releases/dfu-util-0.7.tar.gz
tar -zxvf dfu-util-0.7.tar.gz dfu-util-0.7
cd dfu-util-0.7/
./autogen.sh
./configure
make
sudo make install

```

Now I execute `dfu-util --version` and it gives me nothing! So I add it directly to my /usr/bin folder

```auto
cd /usr/bin
sudo ln -s ~/Software/dfu-util-0.7/src/dfu-util 

```

`dfu-util -l` gives me

> dfu-util 0.7
> 
> Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.  
> Copyright 2010-2012 Tormod Volden and Stefan Schmidt  
> This program is Free Software and has ABSOLUTELY NO WARRANTY  
> Please report bugs to [dfu-util@lists.gnumonks.org](mailto:dfu-util@lists.gnumonks.org)
> 
> Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=0, name="UNDEFINED"  
> Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=1, name="UNDEFINED"

but, back in my home directory `spark flash --usb blink.cpp` still gives me

> user@user-Lenovo-B590:~/projects/beecode/src/blink$ spark flash --usb firmware\_1410924769674.bin  
> FOUND DFU DEVICE 1d50:607f  
> checking file firmware\_1410924769674.bin  
> spawning dfu-util -d 1d50:607f -a 0 -i 0 -s 0x08005000:leave -D firmware\_1410924769674.bin  
> dfu-util 0.7

> Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.  
> Copyright 2010-2012 Tormod Volden and Stefan Schmidt  
> This program is Free Software and has ABSOLUTELY NO WARRANTY  
> Please report bugs to [dfu-util@lists.gnumonks.org](mailto:dfu-util@lists.gnumonks.org)

> Filter on vendor = 0x1d50 product = 0x607f  
> Cannot open device  
> Opening DFU capable USB device... Error writing firmware...

Any ideas? Please help! Many of the beehive developers use linux, and we depend on this toolchain for faster and more robust development.

Thanks

---

<div class="post-metadata">

**Author:** ![CloudformDesign](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@CloudformDesign](https://community.particle.io/u/CloudformDesign)\
**Post date:** [September 17, 2014, 3:41am UTC](https://community.particle.io/t/dfu-util-doesnt-connect-to-core-on-ubuntu-solved/6987/2 "2014-09-17T03:41:17Z")

</div>

~~Holy crap~~ , all I needed was:

```auto
sudo spark flash --usb blink.cpp

```

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [September 23, 2014, 9:16pm UTC](https://community.particle.io/t/dfu-util-doesnt-connect-to-core-on-ubuntu-solved/6987/3 "2014-09-23T21:16:30Z")

</div>

> [@CloudformDesign](#):
>
> Opening DFU capable USB device... Error writing firmware...

Hi @CloudformDesign,

I'm glad you figured this out, I'm sorry the CLI didn't give you a more helpful error message!

I created an issue for this here: [dfu-util operations should give a more helpful error message when sudo is needed · Issue #96 · particle-iot/spark-cli · GitHub](https://github.com/spark/spark-cli/issues/96)

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![jvanier](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jvanier/32/5542_2.png) [@jvanier](https://community.particle.io/u/jvanier)\
**Post date:** [July 27, 2015, 5:48pm UTC](https://community.particle.io/t/dfu-util-doesnt-connect-to-core-on-ubuntu-solved/6987/4 "2015-07-27T17:48:22Z")

</div>

> [@CloudformDesign](#):
>
> sudo spark flash --usb blink.cpp

For anybody finding this thread in the future, if you want to avoid using `sudo` with `particle flash` use this udev rules file.

> <https://gist.github.com/monkbroc/b283bb4da8c10228a61e>
