@abstraktlighting said in Anyone know how to avoid Fail to write ...error?:
@T3P3Tony whats edited?!
He just meant that you edited your original post to show M122, and he edited his to show that he acknowledged that you'd done this.
The "Fail to write" error may be caused because the WiFi module firmware on the Duet is version 1.23, but your firmware version on the Duet is 1.20beta6. So updating your firmware on the Duet probably is the best thing to do.
You should be able to update directly from 1.20beta6 to the latest 2.04. However, there is a small extra step you will need to do to do this.
Download "Duet2CombinedFirmware.bin" from https://github.com/dc42/RepRapFirmware/releases/tag/2.04 (first file in assets, just click on the name, it will download) RENAME "Duet2CombinedFirmware.bin" to "DuetWiFiFirmware.bin" Copy "DuetWiFiFirmware.bin" into the "sys" folder on the SD Card. You'll probably have to do this by removing the SD card from the Duet, and put it in your PC. Make sure that "iap4e.bin" is also in the "sys" folder. With the SD card back in the Duet, connect to the Web Control, and send M997 S0 to update the firmware. This will take a minute, but the Duet should reset. You can then reconnect with DWC. Test uploading files. You can upload the newer version of DWC, by downloading "DuetWebControl-SD-2.04.zip" from https://github.com/dc42/RepRapFirmware/releases/tag/2.04. You should be able to upload the zip file, and the newer firmware will decompress and install it for you.Report back if you have any problems with these steps.
Ian