Problems with Flashing the LPS Anchors with DFU

All discussions related to the Loco Positioning system
Post Reply
smarka
Beginner
Posts: 3
Joined: Sat Apr 08, 2017 2:24 pm

Problems with Flashing the LPS Anchors with DFU

Post by smarka »

I am using the BitCraze VM and updated all projects with the icon. I can connect to the anchor with picocom and the report looks OK. However, I totally fail with flashing the anchor whether I follow the video or the wiki instructions - I fail with the same error message:

bitcraze@bitcraze-vm:~/projects/lps-node-firmware$ sudo make dfu
dfu-util -d 0483:df11 -a 0 -D bin/lps-node-firmware.dfu -R
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

Filter on vendor = 0x0483 product = 0xdf11
Opening DFU USB device... ID 0483:df11
Run-time device DFU version 011a
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/064*0002Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
Dfu suffix version 11a
DfuSe interface name: "Internal Flash "
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (1 elements, total size = 80896)
parsing element 1, address = 0x08000000, size = 80888
done parsing DfuSe file
can't detach
Resetting USB to switch back to runtime mode
bitcraze@bitcraze-vm:~/projects/lps-node-firmware$
JNLance
Beginner
Posts: 4
Joined: Sat Apr 08, 2017 6:01 pm

Re: Problems with Flashing the LPS Anchors with DFU

Post by JNLance »

Bump.
I am also having this issue.
JNLance
Beginner
Posts: 4
Joined: Sat Apr 08, 2017 6:01 pm

Re: Problems with Flashing the LPS Anchors with DFU

Post by JNLance »

Hi, it seems to me that
"
can't detach
Resetting USB to switch back to runtime mode
"
does not affect the proper functioning of the node. If you look carefully at the video at approximately time 2:28, he also has the same message.

But, maybe wait for an official explanation.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problems with Flashing the LPS Anchors with DFU

Post by arnaud »

@JNLance: yes the "can't detatch" error does not affect functionality. DFU-utils has a bug that prevents it from reseting the node. We have started developing a tool to flash the nodes (https://wiki.bitcraze.io/doc:lps:tools# ... ation_tool) that can detach properly and reset the node.

@smarka: You need dfu-util 0.8+ in order to flash the node with dfu. DFU-util 0.8 comes by default with Ubuntu 16.04 which is the recomended system for the early-access LPS. We have not yet updated the virtual machine this version of Ubuntu. If you want to flash with the bitcraze VM I found a PPA that has dfu-util 0.9 for Ubuntu 14.04 (Trusty): https://launchpad.net/~tormodvolden/+ar ... ter=trusty
chuhao
Beginner
Posts: 27
Joined: Sat Apr 29, 2017 6:25 am

Re: Problems with Flashing the LPS Anchors with DFU

Post by chuhao »

Hi Arnaud @arnaud

I met the same problem and I tried the dfu-utils you mentioned. Currently, I'm using dfu-util 0.9.

I open the bitcraze VM, and connect LPS node via USB. I can found the devices by type

Code: Select all

lsusb
It shows,
Bus 001 Device 006: ID 0a5c:6412 Broadcom Corp.
Bus 001 Device 009: ID 0483:5740 STMicroelectronics STM32F407
Bus 001 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Then I tried

Code: Select all

sudo make dfu
It shows,
fu-util -d 0483:df11 -a 0 -D bin/lps-node-firmware.dfu -R
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: No DFU capable USB device available
make: *** [dfu] Error 74
Do you know where goes wrong?

Thanks
Chuhao
chuhao
Beginner
Posts: 27
Joined: Sat Apr 29, 2017 6:25 am

Re: Problems with Flashing the LPS Anchors with DFU

Post by chuhao »

I tried it on my own Ubuntu 14.04.
It also has this "dfu device not found" problem.
JNLance
Beginner
Posts: 4
Joined: Sat Apr 08, 2017 6:01 pm

Re: Problems with Flashing the LPS Anchors with DFU

Post by JNLance »

@chuhao
Did you set the anchor into DFU mode before "sudo make dfu"?
chuhao
Beginner
Posts: 27
Joined: Sat Apr 29, 2017 6:25 am

Re: Problems with Flashing the LPS Anchors with DFU

Post by chuhao »

@JNLance
I set the anchor into DFU mode, by press dfu button once and press rest button once.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problems with Flashing the LPS Anchors with DFU

Post by arnaud »

It seems that your node is not in DFU mode. Your lsusb command shows the firmware VID/PID. The DFU bootloader will appear as follow:

Code: Select all

$ lsusb
(...)
Bus 003 Device 014: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
(...)
You should keep the DFU button pressed while you are pressing and releasing reset. In DFU mode none of the left LEDs should blink or be light up (the right LED are the radio and they can continue to blink).
Post Reply