Update: 16 October 2023

Since an update to Windows in February 2023, you may have seen an increase in the prevalence of errors 521, 504, 506, and 537, and longer flashing times when using the drag and drop method to copy files to the MICROBIT drive.


Our friends at Microsoft have been actively working on a fix for the above issue and it is expected a fix will now be available in the October Windows update. 


Please continue to use this article for advice on the how to resolve the following errors when using the drag and drop method to copy files:

  • The micro:bit shows error 521 on the display
  • The micro:bit shows error 504 on the display
  • The micro:bit shows error 506 on the display
  • The micro:bit shows error 537 on the display
  • Windows pops up an error about a failure (for example: 0x800703EE - Interrupted Action or 0x800701B1 - Problem Copying)
  • The micro:bit takes an exceptionally long time to flash and then doesn’t show anything on the screen (can take up to 2-3 mins)
  • The micro:bit does not run your program and results in a FAIL.TXT or ASSERT.TXT on the MICROBIT drive.


If you get a FAIL.TXT on the MICROBIT drive, the wording may look like this:


error: The hex file cannot be decoded. Checksum calculation failure occurred.
type: transient, user


Preferred workaround - WebUSB

The most reliable workaround for this problem is to use WebUSB, (also referenced as direct flashing) to program your micro:bit. This is now the preferred way to flash the BBC micro:bit. WebUSB is a way for your browser to connect directly to the micro:bit.


WebUSB works with the micro:bit on a V1.x micro:bit (firmware version 0249 and newer) and V2.x micro:bit (firmware version 0255 and newer). If you are not sure of the version of firmware you are running the following support article - upgrade the firmware on the micro:bit will guide you through the upgrade process. 


WebUSB works in Chrome (version 79 and newer) and Edge (recommended version 79 and newer). 

(Current Chrome and Edge versions 115 -August 2023)


Instructions for MakeCode Editor and Micro:bit Python Editor

The following support article - direct flashing from the browser with the apps and editors will guide you through the step-by-step process for MakeCode or Micro:bit Python Editor.


For a quick guide video to using WebUSB from MakeCode see:

 

For a quick guide video for using WebUSB from the Micro:bit Python Editor see:


Known affected operating system build versions:

Windows 10: 22H2 OS Builds 1904x.2788 or later 

Windows 11: 22H2 and 21H2 OS build 22621.1344 or later


Click on the following links to help you identify the OS build you are running on Windows 10 or Windows 11


Instructions for third-party Editors or browsers that do not support WebUSB

If you have a hex file that does not open in one of these editors (MakeCode or Micro:bit Python Editor), you can use the following link to the micro:bit WebUSB hex-flashing tool instead.


Alternative workaround using robocopy

In our tests, failures do not always occur. Sometimes you can achieve a successful transfer by repeating the drag and drop operation multiple times (can be up to ten times).


For users that do not have access to WebUSB, (such as a browser that does not support WebUSB) we recommend using robocopy with the /z flag, (for restartable mode) from the built-in Windows Command Prompt app. The Command Prompt app is used to execute entered commands.


1. To launch the Command Prompt app, click on the Search bar in Windows 10 and type "Command", or on Windows 11 click on the magnify glass icon and type "Terminal" in the search bar


Windows 10Windows 11


2. Click "open" on Windows 10 or Windows 11


Windows 10Windows 11

3. A window will open with the title "Command Prompt"


4. When you save a hex file in MakeCode, the hex file by default is saved in your downloads folder. 

Option 1: save a hex file by clicking the blue disk icon optionOption 2: save a hex file by clicking the 3 dots (...) and selecting Download as file option

5. When you open the Command Prompt window, you should find you have a flashing prompt, depending on your Windows setup, you may need to change the directory (cd) and list the files in a folder (dir) to locate the downloads folder.


6. For this example, we will assume your MICROBIT drive is mounted as drive D:\


From your downloads folder type robocopy /z . D:\ microbit-flashing-heart.hex and press return


Note: the /z is a flag used by robocopy, the "." represents the current directory, and ".hex" must be included to identify the file to be copied



7. The file transfer should show output similar to the screenshot below, you should see your micro:bit to flash as usual and your program will run once the transfer is completed.


Raising a ticket with support

If none of the workarounds listed here works for you, then please raise a support ticket, and include the following information

  • The version of the micro:bit you are using (V1.x/V2.x).
  • The Operating System and version, (including OS build version).
  • The DETAILS.TXT file from your micro:bit.
  • The name of any anti-virus software you are running.



Further Information:

How do I find the OS build on Windows 10:

1) Click on the Start button, select the Settings option 

2) Select "System"

3) 

On the L.H.S of the new window there will be a list of options, choose "About" (last option)


4) On the R.H.S, the window will update to display Device and Windows specifications:

(The OS Build is still under investigation hence why it is not shown here)



How do I find out the OS build on Windows 11:

1) Right-click the Start button and select "System" from the options listed 

2) A new window will open, from the list of options on the L.H.S select "System" again. On the R.H.S of the window, you will need to scroll down to the bottom, and select "About":

3) Scroll down the updated page to find the heading "Windows Specifications", where you will find the Windows Edition, Version, and OS build details:

(The OS build referenced here is a known version to cause an error when transferring files)

 



Should you need a WebUSB troubleshooting guide, see here: https://support.microbit.org/en/support/solutions/articles/19000105428-webusb-troubleshooting