Author Topic: Bootloader 1.05 : SD card access  (Read 9441 times)

ericd

  • Team Member
  • **
  • Posts: 84
    • View Profile
Bootloader 1.05 : SD card access
« on: November 12, 2020, 12:14:40 AM »
Moved by Xavier from an other thread



I hope this is the right place to post. It may be a very stupid question.

The PreenFM3 wiki says the SD card needs to be removed to put firmware files on it.

Is there a way to boot FM3 in USB disk mode (like FM2) to transfer the file to the SD card over USB?

I bought a pre-built FM3 from Ardi and there is no physical access to remove the SD card.
« Last Edit: November 13, 2020, 10:42:05 PM by Xavier »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #1 on: November 12, 2020, 01:19:15 PM »
The WIKI is right.
You currenlty have to remove the card as "SD card access" from computer is not implemented.

It's on my list, as it allows to cut the SD card so that it does not go beyound the box.

EDITED : will arrive soon  ;)
« Last Edit: November 12, 2020, 10:22:12 PM by Xavier »

ericd

  • Team Member
  • **
  • Posts: 84
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #2 on: November 12, 2020, 11:40:06 PM »
Thanks Xavier

That's good to know. I think I'll wait until that firmware update so I only have to take the case apart once.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #3 on: November 13, 2020, 10:39:51 PM »
You can try bootloader 1.05 available from fiwmare 0.96 :
https://github.com/Ixox/preenfm3/releases/

To flash it without opening the enclosure, enter DFU mode with your current bootloader, then use WebDfu as explained here :
https://github.com/Ixox/preenfm3/wiki/Flash

With bootloader 1.05 you have an option (button 3) to make the SD card visible from your computer.
It very slow (up to 15 seconds) before seeing the volume on the computer.
But it should work to updoad new firmware and flash them with the bootloader.

« Last Edit: November 16, 2020, 09:14:50 AM by Xavier »

ericd

  • Team Member
  • **
  • Posts: 84
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #4 on: November 14, 2020, 01:27:46 AM »
I'm trying to get past the first step.

I assume I can skip this bit as there is already bootloader 1.02 installed: Connect the boot0 pins with vcc on back side of the main PCB.

I hold menu while plugging the USB cable in. Select button 2 for DFU mode. The Preen screen says 'DFU mode' for a second then the screen goes blank. I don't have DC power connected, only USB.

This first time I did this my computer displayed a message saying it recognised a DFU device. The computer definitely sees "DFU in FS mode" connected.

Go to https://devanlai.github.io/webdfu/dfu-util/ using Chrome. When I click connect, there is no option for "DFU in FS Mode" only a list of 'unknown devices' none of which are DFU. I tested the process without the Preen connected to the computer and the list was the same, so I think this means WebDFU is not seeing the Preen.

I have tried on 2 separate computers running Win7 and Win10, both with the same result.

EDIT: the other thing I noticed is that when the PreenFM comes on (while holding 'Menu' button), there is a line of  random text below the options. I think this is where the firmware update files would be to choose from pressing + or -. I press - + and the line of text changes but it is always nonsense/random symbols.
« Last Edit: November 14, 2020, 05:39:08 AM by ericd »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #5 on: November 14, 2020, 09:06:52 AM »
I hold menu while plugging the USB cable in. Select button 2 for DFU mode. The Preen screen says 'DFU mode' for a second then the screen goes blank. I don't have DC power connected, only USB.

The screen goes black when in DFU mode. That's expected.
USB only is OK.

This first time I did this my computer displayed a message saying it recognised a DFU device. The computer definitely sees "DFU in FS mode" connected.

This can also be checked in the device manager where an entry "DFU in FS mode" is listed under "peripherals USB" or something like this.
That's normal.

Go to https://devanlai.github.io/webdfu/dfu-util/ using Chrome. When I click connect, there is no option for "DFU in FS Mode" only a list of 'unknown devices' none of which are DFU. I tested the process without the Preen connected to the computer and the list was the same, so I think this means WebDFU is not seeing the Preen.
I have tried on 2 separate computers running Win7 and Win10, both with the same result.

Aouch... I have no idea how that can happen ?
Double check you're using : "An up-to-date version of Chrome, at least version 61 or newer" As required.
(Edited : if the other devices are listed, it means it's OK)

Did you install STM32 DfuSe already ? (the second solution listed on the wiki)


EDIT: the other thing I noticed is that when the PreenFM comes on (while holding 'Menu' button), there is a line of  random text below the options. I think this is where the firmware update files would be to choose from pressing + or -. I press - + and the line of text changes but it is always nonsense/random symbols.

Yes should be the firmware.
SD card compatibility have been improved in the latest versions.

I've put together a zip file where you have dfu-util and the latest zip file.
Once the preenfm3 in DFU mode, can you try to run the command after unzipping the folder ?
https://drive.google.com/file/d/1Qo1uxiSbUCAC4h2ZAjQswPRdJVRzq9uX/view?usp=sharing
« Last Edit: November 14, 2020, 09:10:58 AM by Xavier »

ericd

  • Team Member
  • **
  • Posts: 84
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #6 on: November 14, 2020, 09:15:00 AM »
So I should run the file called 'dfu-util'?

Quote
Did you install STM32 DfuSe already ? (the second solution listed on the wiki)

No - I read that and it just looked too complicated for me to understand ??? Do I need that to try your file?

EDIT: I tried running dfu-util. A text box flashed briefly on my computer monitor then closed.
« Last Edit: November 14, 2020, 10:02:44 AM by Xavier »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #7 on: November 14, 2020, 10:02:30 AM »
EDIT: I tried running dfu-util. A text box flashed briefly on my computer monitor then closed.

No you don't need DfuSe, i asked because sometime it change the drive for DFU and the WebDfu solution does not work because of that.

You need to run the cmd files which calls dfu-util.
There's a README file in the zip  ;)

From a terminal you can try "dfu-util -l" which list the device available.


ericd

  • Team Member
  • **
  • Posts: 84
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #8 on: November 14, 2020, 10:24:46 AM »
Thanks for your patience, I really am not a 'computer person' past simple things- I'm trying!

Can I just make sure I am right about this part- I can connect FM3 to the computer with the USB cable and boot to DFU mode. I don't need to do this: 
To do so, put a jumber on the boot0 bins between center pin and Vcc, and switch on your preen.

I ran the commands as per the readme, first the booltoader. The cmnd window only flashed up for a second or two. Then the same with the firmware cmnd, the same thing. I checked just in case, the bootloader is still 1.02.

EDIT The cmnd file is called 'flash_bootloader' and in the READ ME it's called 'install_bootloader'- I don't know if that matters?

I entered "dfu-util-l" into a termina, , it says it is not recognized.

EDIT: what does this instruction mean please? Opon a commmand term and cd into this folder.
« Last Edit: November 14, 2020, 10:34:58 AM by ericd »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #9 on: November 14, 2020, 10:43:08 AM »
Thanks for your patience, I really am not a 'computer person' past simple things- I'm trying!

No problem.
I don't plan to flash the PCBs i sell, so i must understand and find a solution for all flash problems one can have.


Can I just make sure I am right about this part- I can connect FM3 to the computer with the USB cable and boot to DFU mode. I don't need to do this: 
To do so, put a jumber on the boot0 bins between center pin and Vcc, and switch on your preen.

No you don't need to.
Both action lead to the same state :
. put a jumber on the boot0 bins between center pin and Vcc, and switch on your preen.
. Enter the preenfm bootloader and click on the DFU button

I ran the commands as per the readme, first the booltoader. The cmnd window only flashed up for a second or two. Then the same with the firmware cmnd, the same thing. I checked just in case, the bootloader is still 1.02.
I entered "dfu-util-l" into a termina, , it says it is not recognized.

 :-\  Windows does not see correctly the DFU mode.
And you have the same behavious on both your PC ?


Can you try what follows.
This comes from the official dfu-util site :
https://github.com/libusb/libusb/wiki/Windows#How_to_use_libusb_on_Windows

We'll use Zadig to try to fix the driver.
Download and  install it.
  • Enter DFU mode on your preenfm
  • Launch Zadig.
  • Option > list all devices
  • Select your DFU device.
  • For it, select WINUSB drivers. Click replace driver.

Once it done, try again to run the command.
Thanks
« Last Edit: November 14, 2020, 11:07:20 AM by Xavier »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #10 on: November 14, 2020, 11:09:41 AM »

And an other solution is to try to uninstall the current driver for the "Dfu" device.
https://github.com/pbatard/libwdi/wiki/FAQ#Help_Zadig_replaced_the_driver_for_the_wrong_device_How_do_I_restore_it
It's possible that Windows will automatically install a working one after.


ericd

  • Team Member
  • **
  • Posts: 84
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #11 on: November 14, 2020, 11:20:08 AM »
Quote
Can you try what follows.
This comes from the official dfu-util site :
https://github.com/libusb/libusb/wiki/Windows#How_to_use_libusb_on_Windows

We'll use Zadig to try to fix the driver.
Download and  install it.
  • Enter DFU mode on your preenfm
  • Launch Zadig.
  • Option > list all devices
  • Select your DFU device.
  • For it, select WINUSB drivers. Click replace driver.

Once it done, try again to run the command.
Thanks

This works! Bootloader is now 1.05 and firmware is 0.96.

The only remaining problems I see is the text about the firmware version is still random symbols,

and when I enter SD card access mode (button 3) my computer asks me to format the disk. Should I say yes or no?

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #12 on: November 14, 2020, 11:25:39 AM »
This works! Bootloader is now 1.05 and firmware is 0.96.

Awesome  :D

The only remaining problems I see is the text about the firmware version is still random symbols,
and when I enter SD card access mode (button 3) my computer asks me to format the disk. Should I say yes or no?

Oh no  :(
No don't format the disk.
Can you read and save preset in the firmware ?

Do you knw what SD card is in your preenfm ?
« Last Edit: November 14, 2020, 11:35:26 AM by Xavier »

ericd

  • Team Member
  • **
  • Posts: 84
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #13 on: November 14, 2020, 11:32:16 AM »
Yes I can read and save presets.

I don't know about the type of card, sorry- you would have to ask Ardi @ Van Daal.

I've emailed him to ask.
« Last Edit: November 14, 2020, 04:37:23 PM by ericd »

Megalomidiac

  • Team member
  • *
  • Posts: 40
    • View Profile
Re: Bootloader 1.05 : SD card access
« Reply #14 on: November 15, 2020, 02:12:01 PM »
I also had the problem with flashing 1.01 on my new PreenFM3 with the Chrome browser, so I choose DfuSe. That worked.

But the new Bootloaders are in .bin format, could you please offer the .dfu format, too @Xavier ?
« Last Edit: November 15, 2020, 02:35:44 PM by Megalomidiac »