arduino / WiFi101-FirmwareUpdater-Plugin

WiFi101 Firmware Updater Tool for Arduino IDE
13 stars 23 forks source link

Error while writing flash memory (again but this time on MKR1000) #16

Open ogermer opened 6 years ago

ogermer commented 6 years ago

Hi,

user of MKR1000 board here! (OS X / Arduino IDE 1.8.5 (which is >1.6.10) / WiFi101 library v0.15.2)

I am experiencing the same problem as described in other issues - but on a MKR1000 board:

java.lang.Exception: Error while writing flash memory.
    at cc.arduino.plugins.wifi101.flashers.java.FlasherSerialClient.writeFlash(FlasherSerialClient.java:133)
    at cc.arduino.plugins.wifi101.flashers.java.JavaFlasher.updateFirmware(JavaFlasher.java:86)
    at cc.arduino.plugins.wifi101.UpdaterImpl$3.run(UpdaterImpl.java:138)

The Wifi part of my board seems to be bricked by now which is most annoying. What can I do?? I looked at the other issues posted here but did not come up with a proper recommendation for my case (as I use an Arduino MKR1000 board and not a WiFi101 or Adafruit board).

I tried different Wifi101 library versions, changed USB ports and cables and did everything as described in the tutorial https://www.arduino.cc/en/Tutorial/FirmwareUpdater

In can successfully launch the Firmware Updater Utility from the IDE and can see the USB port and the test of the board works fine.

Updating the firmware (no matter which version I choose) is not successful:

erasing target... Error while writing flash memory.

Clicking the upload button again leads to a "Programmer not responding" error message. I need to reboot the MKR1000 in order to reach it again from the Update Utility.

So what are my options?

sandeepmistry commented 6 years ago

@ogermer make sure you are using the latest SAMD core, which is 1.6.18 at this time. You can update in the IDE via Tools -> Board ... -> Board Manager and then search for SAMD.

ogermer commented 6 years ago

@sandeepmistry That solved the problem. I could successfully upload the new firmware. Thanks a lot for the immediate response! It would be good to have this topic covered in the Firmware Updater tutorial as probably most users upgrade the board database only when they need to connect a new board...

ogermer commented 6 years ago

@sandeepmistry Running the firmware check CheckWifi101FirmwareVersion I get the following message:

WiFi101 firmware check.

WiFi101 shield: DETECTED
Firmware version installed: 19.5.2
Latest firmware version available : 19.5.4

Check result: NOT PASSED
 - The firmware version on the shield do not match the
   version required by the library, you may experience
   issues or failures.

While things seem to work, this is a bit confusing. 19.5.2 is the latest version offered in the updater tool of my IDE (v1.8.5). Would the IDE beta version offer the 19.5.4 version?

Again: I am using WiFi101 library version 0.15.2...

What a can of worms... ;-)

sandeepmistry commented 6 years ago

It would be good to have this topic covered in the Firmware Updater tutorial as probably most users upgrade the board database only when they need to connect a new board...

Good suggestion, @akash73 or @simonepda can you handle this please?

Would the IDE beta version offer the 19.5.4 version?

That's correct, a new version of the IDE has not been released since the f/w version was updated.

cc/ @facchinm @cmaglie

facchinm commented 6 years ago

Both nightly and beta version of the IDE should contain the updated FirmwareUpdater, so the link should temporarily instruct to download one of these two versions @SimonePDA

BlckShadow commented 6 years ago

I've been stuck with this error while working on a MKR 1000 board. It was working fine initially but stopped working all of a sudden. Prior to this, I uploaded the FirmwareUpdater Sketch & I was trying to upload the SSH certificate when I got the "Error while reading memory" error. I tried the 'Reset twice' option but it always fails during the SSH upload (or) the firmware update.


java.lang.Exception: Error while erasing flash memory.
    at cc.arduino.plugins.wifi101.flashers.java.FlasherSerialClient.eraseFlash(FlasherSerialClient.java:139)
    at cc.arduino.plugins.wifi101.flashers.java.JavaFlasher.updateFirmware(JavaFlasher.java:79)
    at cc.arduino.plugins.wifi101.UpdaterImpl$3.run(UpdaterImpl.java:138)