Closed MJ666 closed 8 years ago
@hydra this may be also get interesting for you with the SP Racing F3?
@MJ666 SPRacingF3 uses CP2102, no DFU required. Sparky requires DFU mode.
I have been working through this and it seems mostly there. The only issue I have now is the getDevices (https://developer.chrome.com/apps/usb#method-getDevices) function doesn't return a device even through I can see it in DFU mode and flash it with other software. Any ideas or pointers?
Have you added the USB VID/PID to the manifest? It will only return devices you have permissions to access.
They are added already in the existing Configurator. I confirmed they are correct. Been busy with work but going back to look at this soon.
They are listed as optional permissions though. You will need to make sure you request them somewhere. https://developer.chrome.com/apps/permissions#method-request
I had a look at this. You need to uncomment this line and then click the button on the landing page to request USB permissions: https://github.com/cleanflight/cleanflight-configurator/blob/master/tabs/landing.js#L13.
Then this line needs to go below line 356: https://github.com/cleanflight/cleanflight-configurator/blob/master/js/protocols/stm32usbdfu.js#L300
After that I successfully flashed my STM32F3 Discovery board using USB-DFU. I did note the code isn't really complete in that it doesn't handle some error conditions properly though.
I will check this out again. I couldn't get it working on my version of Chrome.
I've submitted a PR which makes the minimal changes, please test that. :)
@MJ666 can we close this?
Sorry will close it.
Looks to be the code already contain parts to enable DFU flashing? Not sure what the actual state is and if this part of the code is already working. Actually the GUI is only allowing Hex files to be selected and will do some basic tests. Also an STM device in boot mode is not detected by the GUI. Would be nice to be able to flash all targets easily via the GUI.
I have opened an related issue in CF already: https://github.com/cleanflight/cleanflight/issues/412