Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1,915 Views

dfu-util issues with Arduino 101

Hi,

I'm having issues with the dfu utility in the Arduino 101, and was hoping somebody might have some insight into a solution.

First, I am able to upload programs(sketches) in Windows 7 using the Arduino IDE, error free. I don't believe this is a hardware issue with the Arduino 101.

I have had intermittent success using the Arduino IDE (Ubuntu 16.04 LTS, 64-bit) to upload sketches. And I have been able to program (via dfu) C++ projects provided in the Curie Open Development Kit - A such as arc/examples/Blink, every now and then.

However, I always get "can't detach" and "error resetting after download" messages using the Linux process (following directions from https://software.intel.com/en-us/node/675512 Installing and Using the A Tree | Intel® Software ). More often than not the programming process exits before completion. At times this has forced me to return to the Windows computer, and the Arduino IDE, to re-program the bootloader.

I'll be switching to a jtag programmer soon, but wanted to check and see if there is something simple I'm not doing, or if there are any know issues with the using the USB serial bootload process.

Lon

Here is the terminal output from an attempt to upload "Blink" with a failure.

sol3@sol3-linux:~/CODK/CODK-A/arc/examples/Blink$ make upload SERIAL_PORT=/dev/ttyACM0

Resetting port /dev/ttyACM0

stty -F /dev/ttyACM0 1200

sleep 1

Uploading arc.bin to port /dev/ttyACM0

/home/sol3/CODK/CODK-A/arc/bin/arduino101load /home/sol3/CODK/CODK-A/arc/bin/x86/bin arc.bin /dev/ttyACM0 true

Starting download script...

Args to shell: [/home/sol3/CODK/CODK-A/arc/bin/x86/bin arc.bin /dev/ttyACM0 true]

Serial Port: /dev/ttyACM0

BIN FILE arc.bin

Waiting for device...

Device found!

dfu-util: Invalid DFU suffix signature

dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: Error during download

dfu-util: can't detach

dfu-util: error resetting after download

dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.

Copyright 2010-2014 Tormod Volden and Stefan Schmidt

This program is Free Software and has ABSOLUTELY NO WARRANTY

Please report bugs to mailto:dfu-util@lists.gnumonks.org dfu-util@lists.gnumonks.org

Opening DFU capable USB device...

ID 8087:0aba

Run-time device DFU version 0011

Claiming USB DFU Interface...

Setting Alternate Setting # 7 ...

Determining device status: state = dfuIDLE, status = 0

dfuIDLE, continuing

DFU mode device DFU version 0011

Device returned transfer size 2048

Copying data from PC to DFU device

Download [=== ] 12% 6144 bytesResetting USB to switch back to runtime mode

ERROR: Upload failed on /dev/ttyACM0

/home/sol3/CODK/CODK-A/arc/Makefile.inc:136: recipe for target 'upload' failed

make: *** [upload] Error 1

0 Kudos
12 Replies
Highlighted
Beginner
51 Views

I've noticed that the dfu utility program upload is much more reliable when using "make upload" from the project directory, as opposed to "make upload SERIAL_PORT=/dev/ttyACM0" which is shown in the "using the A tree" online documentation. The detach errors still show up, but the upload seems to complete first.

0 Kudos
Highlighted
Community Manager
51 Views

Hi Lon,

 

 

Thank you for reaching out and for using the Intel® products.

 

We will investigate this a little bit more. Just to confirm, when you say the dfu-utility program is much more reliable running make upload from the project directory, does this mean that the issue is not happening at all with this approach? Or do you still get the upload error sometimes?

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Beginner
51 Views

Hi Pablo,

I did not see the incomplete upload problem when I left off the "SERIAL_PORT..." etc. from make upload. However, I only tried a small program several times, so not a substantial experiment. The detach, and error resetting after download, comments still seem to be present but don't appear to impact flashing.

0 Kudos
Highlighted
Community Manager
51 Views

Hi Lon,

 

 

Thank you very much for the update.

 

I'm getting this detach error too. However, like you, I'm still able to run the program just fine. In any case, I will pass this information to the team in charge so they can check if there's anything they can do to fix it.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Beginner
51 Views

Hi Pablo,

I am currently having the similar issues as Lon. I am wondering if the issue have been fixed.

I am using the A-Tree with CuteCom and following https://software.intel.com/en-us/node/675547 Connecting and Verifying the Board Proof of Life | Intel® Software steps. Everything works fine until I run the command:

$ make upload SERIAL_PORT=/dev/ttyACM0

the terminal shows:

Resetting port /dev/ttyACM0

stty -F /dev/ttyACM0 1200

stty: /dev/ttyACM0: No such file or directory

/home/vanissy/CODK/CODK-A/arc/Makefile.inc:136: recipe for target 'upload' failed

make: *** [upload] Error 1

There seems to be an error with no /dev/ttyACM0 port. I have tried Lon's method of running the upload command with the SERIAL_PORT too, but I receive the same error. I have follow every step directly.

Thanks,

Jie

0 Kudos
Highlighted
Community Manager
51 Views

Hi Jie_Zhou,

 

 

I just followed the instructions myself and as you mentioned the issue is still there. I will pass this information again to the development team to see if they can update these instructions or fix the issue that is causing the uploading to fail. Was this the only error you encountered while following the instructions?

 

 

Regards,

 

Pablo M.

 

0 Kudos
Highlighted
Beginner
51 Views

Hi Pablo,

Yeah that was the only issue. The main problem is with uploading the compiled code to Curie. If there is some other way that is better or has been proven to work then please let me know. All I care about is uploading my script to Curie. I know there are other ways of flashing other than through USB like JTAG and J-Link. I am looking into that. Thank you so much for responding!

EDIT: I also tried

$ sudo usermod -a -G dialout

suggested in https://software.intel.com/en-us/node/675539 Troubleshooting and Frequently Asked Questions (FAQ) | Intel® Software

It did not solve the issue.

Sincerely,

Jie

0 Kudos
Highlighted
Community Manager
51 Views

Hi Jie,

 

 

Let me investigate if there's any other method or workaround that could help you. Could you please share your environment details (OS version, virtual machine if applicable, etc.)? If you get any good result with your tests let us know.

 

 

Regards,

 

Pablo M.

 

0 Kudos
Highlighted
Beginner
51 Views

Hi Pablo,

I am running dual boot with Ubuntu 16.04 and windows 10. So I'm not using any VM but running completely in Linux. The board is the Arduino 101. I would like to transition to TinyTILE with the ODK in the near future, and that is why I wasn't really looking into JTAG method, plus that will be extra hardware I have to order.

SUCCESSFUL FLASH: So following the tutorials here excluding the string part

https://software.intel.com/en-us/node/675541 CurieMailbox - Message Passing between Cores | Intel® Software

I was able to successfully upload the code to the Arduino, but when I tried it again it still uploaded, but was giving me errors with dfu-util can't detach. Also the output was in hex.

NOTE: the tutorial has a few _ (underlines) that was missed due to cropping probably, but the commands are simple enough to figure out.

Thanks,

Jie

0 Kudos
Highlighted
Community Manager
51 Views

Hi Jie,

 

 

Great! I'm glad to know you got it to work following that other tutorial. Lon also got that message but apparently the upload completes successfully. Did you install the A tree? Or did you follow the complete instructions from the tutorial and used the M tree instead?

 

We also wanted to ask if you were able to locate the serial device name for your Curie under /dev directory, in our case it was 'ttyACM0'.

 

 

Regards,

 

Pablo M.

 

0 Kudos
Highlighted
Beginner
51 Views

Hi Pablo,

Sorry for the late response. I am using the M tree and by following the command tutorial I am able to compile and upload. Also, my serial device name is /dev/ttyACM0. However, I still have the following error displayed. I worry that when I start implementing my own project this error will cause issues.

dfu-util: Invalid DFU suffix signature

dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

Opening DFU capable USB device...

ID 8087:0aba

Run-time device DFU version 0011

Claiming USB DFU Interface...

Setting Alternate Setting # 2 ...

Determining device status: state = dfuIDLE, status = 0

dfuIDLE, continuing

DFU mode device DFU version 0011

Device returned transfer size 2048

Copying data from PC to DFU device

Download [=========================] 100% 46512 bytes

Download done.

state(2) = dfuIDLE, status(0) = No error condition is present

Done!

dfu-util: can't detach

Resetting USB to switch back to runtime mode

dfu-util: error resetting after download

Makefile:147: recipe for target 'upload-x86-dfu' failed

make: *** [upload-x86-dfu] Error 74

Thank,

Jie

0 Kudos
Highlighted
Community Manager
51 Views

Hi Jie,

 

 

Don't worry, thank you for your reply.

 

The issue seems to be happening in some computers and in some not, however, we haven't determine the reason for this. We tried it on a Virtual Machine and encountered your same issue, but when tried it on full Linux computer we didn't had any problem. Even with that error message when uploading, we haven't had any subsequent problems with development, so I don't believe this will be a problem for you. Nonetheless, we will definitely keep investigating about this message and issue.

 

If you have further concerns or problems with your development, don't hesitate to let us know.

 

 

Regards,

 

Pablo M.

 

0 Kudos