Switch the Core Module to the DFU mode - does not work

Hello,
I am following instructions to build CO2 monitor and I got stuck on switching core module to the DFU mode for firmware update. Seems, it does not work on core module, or it is not recognized.

"$ bcf flash --dfu bigclownlabs/bcf-kit-wireless-co2-monitor:latest
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 dfu-util@lists.gnumonks.org

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: Cannot open DFU device 0483:df11
dfu-util: No DFU capable USB device available

The device is probably not in DFU mode
1. Make sure the USB cable is connected to your desktop (host).
2. Press the BOOT button on Core Module and keep it pressed.
BOOT button is on the right side and is marked with letter “B”.
3. Press the RESET button on Core Module while BOOT button is still held.
RESET button is on the left side and is marked with letter “R”.
4. Release the RESET button.
5. Release the BOOT button.
"
As well, I cannot find core module connected to PC (via USB).
I am using Ubuntu 16.04LTS.
Probably, I am just doing something wrong…

Thanks for help.

Hello,
please try to follow this guide to switch module to the DFU mode
https://www.bigclown.com/doc/tutorials/toolchain-guide/#switching-core-module-into-dfu-mode

please try to switch device do DFU mode and then write here the output of the lsusb command. I’m on windows right now so I don’t know the exact text, but there should be a STM32 DFU or BOOTLOADER device.

Can you please try to run dfu-util -l which will list connected DFU devices? (maybe with sudo?)

Also try to run bcf with sudo in case you don’t have enough permissions. In this case you would need to run also sudo bcf update because calling bcf with sudo will use completely different cache directory. ( this can be solved by using “sudo -s” so the sudo command is executed in the current working directory and not /root, but I can be wrong)

Also please check that you have woking micro USB cable. Try to use that cable with other known working device. Check not only power delivery, but also that the device is enumerated. Some USB cables are for charging only and do not have D+ D- wires.

Martin

Hi Martin,
thank you for reply. Seems, it help and now it is successful.
What I did differently:
1 I carefully switched core module to DFU mode and leave it for some time.
After that, I finally could see the device in the list (“lsusb”):
“Bus 007 Device 003: ID 0483:df11 STMicroelectronics STM Device in DFU Mode”
“sudo dfu-util -l” displays also correctly:
dfu-util 0.8

Copyright 2005-2009 …
Copyright 2010-2014 …
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to …

Found DFU: [0483:df11] ver=2200, devnum=3, cfg=1, intf=0, alt=2, name="@DATA Memory /0x08080000/23Ke", serial=“79B19945686A"
Found DFU: [0483:df11] ver=2200, devnum=3, cfg=1, intf=0, alt=1, name=”@Option Bytes /0x1FF80000/01
032 e", serial=“79B19945686A"
Found DFU: [0483:df11] ver=2200, devnum=3, cfg=1, intf=0, alt=0, name=”@Internal Flash /0x08000000/1536*128g", serial=“79B19945686A”

2 I used “sudo-s” as you recommended as for “bcf update” and “bcf flash”. Result:
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 0483:df11
Run-time device DFU version 011a
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
DfuSe interface name: "Internal Flash "
dfu-util: Non-valid multiplier ‘g’, interpreted as type identifier instead
Downloading to address = 0x08000000, size = 50324
Download [=========================] 100% 50324 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state

There seems to be some errors, but overall result looks OK. What do you think?

Thank you,
Peter

Yes, the dfu-util outputs some errors and warnings even when firmware upload is fine. The important part is the Download which ended sucessfully.

Can you give us the idea why did you had this issue to switch to the DFU, so we can improve documentation? Is it because the DFU mode in the BCF command line utility was explained a different way, than on our documentation? Or is it beacuse the bcf without the sudo did not worked?Thanks for your suggestions.

Martin

Well, it seems, that recognizing new hardware took some time for this case.
I think, something similar happened with usb dongle. Hardware was recognized quickly, but I could not update firmware after several tries. Later it works without any specific different action.
Core module I reconnected late at the evening + switch to dfu mode and leave it over the night after I came back to this.
Unfortunately, I did not try other way to upgrade firmware as “sudo-s” to compare.
bcf update works also without sudo.
Peter

Ok, thanks for feedback.
Let us know if you need any help in the future.

Martin