
Автор
Тема: Прошивка через тест драйвера 4.14.0.749 в DFU-режиме (Прочитано 10068 раз)
При начале прошивки вылетает ошибка:
2.Ошибка обновления: DFU util error: 74 No DFU capable USB device available
Что это значит 
С чем это может быть связано 
Как это побороть 

Записан
Для начала что за касса, какой загрузчик стоит?

Записан
Какую модель ККТ прошиваете ? Какая текущая версия прошивки и загрузчика ?

Записан
С уважением, Селихов Дмитрий Юрьевич
Ведущий инженер
отдела технической поддержки АО «Штрих-М»
mailto:support@shtrih-m.ru
тел. (495) 787-60-96.
прошивка от 27.02.2018, загрузчик 133

Записан

Записан
Драйвер на dfu стоит? А то в этот режим касса переходит, а в устройствах висит со знаком вопроса. Его надо успеть поставить после перевода за 30 секунд, иначе касса вернётся в обычный режим.

Записан

Записан
С уважением, Селихов Дмитрий Юрьевич
Ведущий инженер
отдела технической поддержки АО «Штрих-М»
mailto:support@shtrih-m.ru
тел. (495) 787-60-96.

Записан

Записан
С уважением, Селихов Дмитрий Юрьевич
Ведущий инженер
отдела технической поддержки АО «Штрих-М»
mailto:support@shtrih-m.ru
тел. (495) 787-60-96.
У меня при обновлении через dfu, такая же ошибка, но винда автоматом установила драйвер dfu updater на этот же порт, повторное обновление проходит успешно. Конечно, этот dfu updater ставить лучше до прошивки. Это происходит только при подключении по USB. По RNDIS обновление проходит без вопросов.

Записан
Это происходит только при подключении по USB. По RNDIS обновление проходит без вопросов.
Так RNDIS и работает через USB.
И опять же, какая ККТ, какие текущая прошивка и загрузчик ?

Записан
С уважением, Селихов Дмитрий Юрьевич
Ведущий инженер
отдела технической поддержки АО «Штрих-М»
mailto:support@shtrih-m.ru
тел. (495) 787-60-96.
Вообще может быть никак не связано с версиями прошивки и загрузчика.
Наблюдали такой «эффект» на ПОС-е к которому был подключен сканер штрих-кодов или дисплей покупателя, который то ли использовал драйвер VCom, то ли понимал DFU.
Реально времени разбираться не было, т.к. столкнулись с этим в момент массовых перепрошивок под НДС 20%. Просто отключали сканер и дисплей на момент прошивки.
Может и тут что-то подобное?
« Последнее редактирование: 22 Апреля 2019, 15:36:27 от 5385 »

Записан
Может, если другие устройства могут работать через тот же драйвер, их лучше отключать на время прошивки.

Записан
С уважением, Селихов Дмитрий Юрьевич
Ведущий инженер
отдела технической поддержки АО «Штрих-М»
mailto:support@shtrih-m.ru
тел. (495) 787-60-96.
вчера такую же ошибку ловил,вылазит при подключении штатным портом не к ум

Записан
АНКИЛЛ,Ижевск
вчера такую же ошибку ловил,вылазит при подключении штатным портом не к ум
Так через порт системки dfu и не будет работать, только напрямую в УМ.

Записан
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
drnickyoung opened this issue
Aug 19, 2017
· 11 comments
Comments
Hi All,
Love the project and the idea, but bit of an issue, might be me missing something. I have got the bootloader on the STM32 and working. Uploaded the blink script and it works fine. Did several times to test out different blink delays, just testing the upload. Had to hit reset a few times, unplug and plug back in a couple but nothing major. Then went to do it again and all I get now is:
Arduino: 1.8.3 (Mac OS X), Board: «Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), STM32duino bootloader, 72Mhz (Normal), Debug (-g)»
Sketch uses 17168 bytes (26%) of program storage space. Maximum is 65536 bytes.
Global variables use 2824 bytes (13%) of dynamic memory, leaving 17656 bytes for local variables. Maximum is 20480 bytes.
dfu-util 0.9dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
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
An error occurred while uploading the sketchThis report would have more information with
«Show verbose output during compilation»
option enabled in File -> Preferences.
So the question is what is going on here?
Would appreciate any pointers.
Regards,
Nick
Yes, I got a same error message on MacOs. but upload OK on Windows 10.
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 http://sourceforge.net/p/dfu-util/tickets/ dfu-util: Invalid DFU suffix signature dfu-util: A valid DFU suffix will be required in a future dfu-util release!!! Deducing device DFU version from functional descriptor length dfu-util: No DFU capable USB device available
BTW, my dfu-util version is 0.8, How to update to 0.9?
@drnickyoung
I’m not sure how to do this on a Mac, but there will be a unix style command that lists the usb devices, possibly «lsusb»
See if the device is working at all,
You didnt say what hardware you were using and if its the Blue Pill, I presume you know that it has a design error where the USB pullup resistor which they fit is 10k but it should be 1.5k.
Some people have to solder a 1.8k resistor in series with the 10k to get the correct value.
look in wiki.stm32duino.com for the Blue pill and it has the details of the modification
@csnol
You could have the same problem
Either that or the version of dfu-utll you are using is not correct
There are loads of different versions kicking around.
Did you try installing using Homebrew ?
Last time I tried that, it worked for me. But stuff changes all the time, so Homebrew may now install a different version.
Also Apple keep making quite significant changes to the USB in each OS release. I only have El Capitan, and cant upgrade as my mac is tool hold, so I’ve no idea if it works in Sierra or newer
Hi, rogerclarkmelbourne.
My problem’s been solved after I updated latest Arduino_STM32 version. Although still got «Invalid DFU suffix signature» . but I can flash in my board use DFU mode (Upload method : STM32duino bootloader.)
Up to yesterday , never got this error use DFU mode on F103 and F107 series board. I don’t know what’s the reason.
4 boards be used to test it. included:
Blue pill (LED — PC13) ;
Black pill ( LED — PB12, china version) ;
Generic STM32F103RCT( LED — PC13) ;
107VCT(LED — PE0, use STM32F103(PE2) bootloader ) ;
They got a same error message.
So, I think the reason of the error don’t from the hardware. maybe I updated some other boards or libraies( Arduino_STM32 dependent). and forgot renew this repo. incompatible case? I can’t sure
see below red ****
Sketch uses 20864 bytes (7%) of program storage space. Maximum is 262144 bytes. Global variables use 3704 bytes (7%) of dynamic memory, leaving 45448 bytes for local variables. Maximum is 49152 bytes. /.../Arduino_STM32-master/tools/macosx/maple_upload cu.usbmodem1411 2 1???:???3 /var/folders/32/***/T/arduino_build*** / RF24L01_RC-STM32F103VCT6-test.ino.bin 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 http://sourceforge.net/p/dfu-util/tickets/ */***dfu-util: Invalid DFU suffix signature**** */***dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!**** Deducing device DFU version from functional descriptor length Opening DFU capable USB device... ID 1???:???3 Run-time device DFU version 0110 Claiming USB DFU Interface... Setting Alternate Setting #2 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 0110 Device returned transfer size 2048 Copying data from PC to DFU device Download [ ] 0% 0 bytes ...... Download [=========================] 100% 20864 bytes Download done. state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present Done! Resetting USB to switch back to runtime mode
Just suggestion, Could you please issue a json file for this repo? Everyone can update on time if we add it in preferences.txt. OK, just suggestion,
Thanks reply, and thanks for your time.
Best regards.
C.S Nol
@rogerclarkmelbourne Thank you for the information. Yes is the Blue Pill, sometimes shows on the usb devices sometimes, more often, doesn’t show what I’d expect. I did see about the resistor a while ago, but totally slipped my mind to check. Will check later in the week and report back. Thanks for the reminder & help, appreciated.
@csnol I have dfu-utils installed via BREW. Just locate those binaries and copy them over to replace the v0.8 in the STM32Arduino folder.
Thanks @drnickyoung .
Long time no run BREW,
dfu-util 0.9 ..... */*** dfu-util: Invalid DFU suffix signature **** */*** dfu-util: A valid DFU suffix will be required in a future dfu-util release!!! **** Deducing device DFU version from functional descriptor length Opening DFU capable USB device... ..... DFU mode device DFU version 0110 Device returned transfer size 2048 Copying data from PC to DFU device Download [ ] 0% 0 bytes ........ Download [=========================] 100% 15084 bytes Download done. state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present Done! Resetting USB to switch back to runtime mode Waiting for /dev/cu.usbmodem1411 serial...Done
Same as 0.8, nothing be changed.
Best regards.
C.S Nol
I dont think the issue is the USB ID, its just that the bootloader DFU USB device is not being enumerated by the Mac fast enough, as it the bootloader only stays as that device for around 1 second
Several other people have noticed that the newer versions of MacOS are slow to noticed changes to the USB bus, and don’t see the DFU device.
I think there are workarounds posted on www.stm32duino.com and probably on one of the issues in github, but possibly the bootloader repo not this repo
I think you’re right, if I run lsusb for Mac in a loop while connecting the board, then it does briefly find Bus 020 Device 020: ID 1eaf:0003 1eaf Maple 003 Serial: LLM 003 but it quickly disconnects and Bus 020 Device 021: ID 1eaf:0004 1eaf Maple reappears in its place…
Maybe this? rogerclarkmelbourne/STM32duino-bootloader#14 Fixed timing for Mac enumeration and added a variant
Recent updates to the bootloader and core mean that the bootloader should hold in DFU mode if the upload has been triggered by the core being set the Magic number by the IDE
This should resolve the issues on machines which are slow to enumerate the USB
@rogerclarkmelbourne Thank you for the information. Yes is the Blue Pill, sometimes shows on the usb devices sometimes, more often, doesn’t show what I’d expect. I did see about the resistor a while ago, but totally slipped my mind to check. Will check later in the week and report back. Thanks for the reminder & help, appreciated.
@csnol I have dfu-utils installed via BREW. Just locate those binaries and copy them over to replace the v0.8 in the STM32Arduino folder.
Thanks @drnickyoung for the suggestion.
I am testing an STM32F103 board.
I am using a mac and i had the same problem
«Invalid DFU suffix signature»
when i was trying to upload a sketch.
So the problem solved by pressing the reset button when i press the upload button in Arduino IDE.
I’ve just join the club of DFU Error. The solution is «Reset» button. Press the blue button.
Майские обновления принесли новый способ обновлять прошивку вашей ККТ — через USB. О том, как настроить данный способ читайте в этом посте.
ВАЖНО: все файлы для работы с DFU лежат здесь https://yadi.sk/d/hfDo-rIL3JYYBN — обновленные файлы брать у ЦТО
UPD: прошивка DFU и драйвер для этого встроен в установщик тестдрайвера начиная с 700 версии. Сам функционал доступен из тестдрайвера по вкладке «8.сервис -> прошвка».
0. DFU
Режим dfu переводит кассу на 30 секунд в состояние ожидания прошивки (первый присланный пакет сбрасывает таймер). После загрузки прошивки касса перейдет в режим техобнуления.
В DFU режиме ККТ не будет отвечать на команды и будет постоянно светить красный индикатор (если он имеется у данной ККТ).
1. ЗАГРУЗЧИК
режим DFU стал работать с загрузчиками старше 127 версии (минимальная рабочая версия — 131). Так что сначала нужно проверить вашу версию загрузчика и в случае несоответствия выполнить обновление.
Узнать версию можно либо выполнив тестовый прогон (отдельная строка укажет версию) либо специальной командой протокола: FE EC 00 00 00 00 (введена в майских обновлениях).

2. ВВОД В DFU режим
ККТ может войти в DFU режим тремя способами:
- Специальной командой протокола: FE ED 00 00 00 00 (введена в майских обновлениях).
- В случае повреждения прошивки.
- На ККТ с ключами можно перейти в режим с помощью зажатия перемычки p2.10. У разных моделей ККТ эта перемычка/разъем может обозначаться иначе — для конкретной ККТ нужно спрашивать у ЦТО или смотреть файл перепрошивки плат, который выдается также ЦТО. Для ККТ Ритейл-01Ф это разъем xp-5.

Важно: на некоторых ККТ могут отсутствовать пины/гребенка на разъеме — только лишь распайка под нее. Несмотря на это разъем все равно действующей, но замкнуть его будет сложней.
3. ДРАЙВЕР WINDOWS
- Скачайте драйвер dfu ККТ для вашей ОС
- Переведите устройство в режим DFU
- Устройство определится как LPC composite
- Установите для него скачанный драйвер (на некоторых компьютерах установка может продолжаться достаточно длительное время — ждите и верьте в лучшее)
- При следующем переводе в DFU режим ККТ будет определяться как LPC DFU
Теперь с ККТ можно работать через DFU.
4. DFU-UTIL И ЗАГРУЗКА ОБНОВЛЕНИЯ
- Скачайте dfu-util
- Переведите ККТ в режим DFU
- Через консоль при помощи программы отправьте файл прошивки в ККТ. Пример для Windows. dfu-util-static.exe -D upd_app.bin
(на LINUX dfu-util следует запускать с правами root)

- Если все прошло успешно, то ККТ обновится и войдет в режим техобнуления.
И все еще раз в виде видео: https://www.youtube.com/watch?v=CCTaoneBq6o
Download Firware Update Class (DFU)
И вот тут самое время понять, что еще могут существовать другие загрузчики одновременно с системными — это ваши , которые пишутся вами и находятся в адресах FLASH 0х08000000.
Более того у STM есть готовый вариант в Кубе для создания вашего загрузчика по USB и называется USB : Download Firware Update Class (DFU). Генерируем , прошиваем в контроллер.
И загрузчик появляется в адресах 0x0800000 до 0x800C000 (помечена только Readable)
Далее надо пользоваться утилитами от STM Dfu File Manager и DfuSeDemo :
Dfu File Manager готовит вашу прошивку для записи выше вашего бутлодера, а DfuSeDemo собственно ее шьет во Flash выше с адреса 0x800C000.
И происходит это без подтянутой к 1 ножке boot0 контроллера.
Для общего понимания картины адреса памяти :
Думаем , а куда мы заливем свой код программы ? Мы пользовались Atollic True Studio, там были такие настройки :
Например смотрите выходной файл проекта (*.map)
Memory Configuration
Name Origin Length Attributes
RAM 0x20000000 0x00020000 xrw
FLASH 0x08000000 0x00100000 xr
*default* 0x00000000 0xffffffff
FLASH это с адреса 0x08000000. А вот системный загрузчик лежит где-то по адресу 0x00000000 по-видимому всегда прекрасно себя чувствует, так как его стереть нельзя.
В нашем случае имеем STM32F205VG к примеру и у него есть такие варианты загрузчиков :
Но как узнать какой версии системный загрузчик?
Оказывается никак или предположительно по некоторым букво-цифрам на корпусе контроллера.
Типичный вариант организации пинов для активации загрузчика
BOOT0
Видим , что в нашем готовом устройстве есть вариация по BOOT0 :
Штатно BOOT0 на земле и это означает , что начало программы стартует с SRAM , т.е. по адресу 0x20000000 .
BOOT1
BOOT1 может быть выведен наружу и идти на пин , который связан с разъемом на микро SD карты. Понятно для закгрузки с микро SD карты прошивки например.
2 проекта для текстирования
В итоге для тестирования связки с загрузкой через STM Dfu File Manager и DfuSeDemo сделаны открытые два примера на Atollic True Studio .
Первый реализует пользовательский загрузчик по USB (DFU) и прошивается с адреса 0x0800000 до 0x0800C000. А второй проект реализует саму основную обновляемую программу, которую прошиваем по адресу с 0x0800C000 и выше.
STM32F205VG_FLASH.ld
Первый проект :
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 49K
}
Второй проект :
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
FLASH (rx) : ORIGIN = 0x800C000, LENGTH = 49152
}
Внимание во втором проекте :
#define VECT_TAB_OFFSET 0xC000 /*!< Vector Table base offset field.
Переключение в первом проекте между режимами загрузки и выполнение основной программы происходит программно установкой переменной boot = 1|0.
Можно прошивать каждый проект независимо , код каждого проекта должен попадать в свою область памяти и не вредить другому.
Теперь по-шагово поехали :
Собираем (и прошиваем) первый проект:
Собираем (но не прошиваем) второй проект:
Файл *.hex через утилиту STM Dfu File Manager преобразуем в файл *.dfu .
Запускаем первый проект в режиме (boot =1) с отладчиком и трассировкой SWO
Файл *.dfu через утилиту DfuSeDemo отсылаем контроллеру (то есть прошиваем через USB DFU Class)
Перезапускаем проект 1 с boot =0 и наблюдаем , что программа перешла на адрес 0x800C000 и начала выполняться :
Файлы для скачивания
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$
Home › Repetier-Firmware
Experience RUMBA32 installation (and upload problem)
USB connect MKS RUMBA32, press and hold the «BOOT» button, then press the «RESET» light strip for more than 1S, release «RESET», and then release «BOOT».
—> The COM16 is gone and LED1 on RUMBA32 does not flash anymore
Warning! Ignore unknown configuration option `upload_port` in section [platformio]
*** [upload] Error 74