Firmware Update 1.2.1 - available now, with BLE mode

Hi everyone,

Today we are pleased to announce version 1.2.1 of the Arduino NINA-W102 firmware, which includes initial BLE support. For a full list of changes to the firmware, please see the CHANGELOG on Github.

There is a new ArduinoBLE library available to go along with with the firmware release. The library is currently in "beta". and only supports BLE peripheral mode. Please note, WiFi functionality (using the WiFiNINA library) cannot be used at the same time as BLE.

Here's are some steps to get you started:

  • Download and install the hourly Arduino IDE build.
  • Launch the hourly IDE release and use the IDE's library manager (Sketch -> Include Library -> Manage Libraries ...) to install/update the following libraries: WiFiNINA, ArduinoBLE
  • Plug in the MKR WiFi 1010 board into your PC with a USB cable.
  • Select MKR WiFi 1010 as the board and it's serial port in the Tools menu of the IDE.
  • Open the WiFiNINA Firmware Updater example sketch: File -> Examples -> WiFiNINA -> Tools -> FirmwareUpdater
  • Upload the sketch onto your board.
  • If the Serial Monitor is open, close it.
  • Launch the "WiFi 101 / NINA Firmware Updater" from the Tools menu of the IDE
  • Select the Serial Port for your board. The latest version of firmware for the NINA will be automattically selected.
  • Click the "Update Firmware" button, and wait for the update to complete.
  • Close the Updater.
  • You can check the version of firmware loaded on the NINA using the Check Version example of the WiFiNINA library: File -> Examples -> WiFiNINA -> Tools -> CheckVersion example sketch.
  • Now you can start using the examples of the ArduinoBLE library

As always we welcome any feedback on the new features here on the forum.

Update: The version 1.2.0 of the NINA firmware had issues with WiFi TLS/SSL connections. We've corrected and deployed a new v1.2.1 firmware in the next hourly build of the IDE.

To use the "Check Version" you may need to check for library updates.

Sketch. Include Library. Manage Libraries. (wait until the selection has loaded) Change TYPE to UPDATEABLE. Hover mouse over any updatable libraries to see the UPDATE option and update as you need but select the NINA to get the updated examples with the check firmware example.

May not apply to all systems but was needed at this end.

Hi

Thanks! Nice to get Bluetooth LE added to my MKR 1010 :)

Works well using the lightblue app on iOS as Sandeep suggested.

Also, a quick way of testing the BLE battery level sketch is by pointing Chrome browser here -

https://googlechrome.github.io/samples/web-bluetooth/battery-level.html

Dom

No joy here.

Had the MKR1010 working before attempting new firmware. Ran a scan program and it worked. Checked the old firmware version and it was 1.2 (reasonably certain). Installed new beta version of BLE. Installed NINA 2.6 (latest version in library manager) and using the hourly build, followed the instructions.

When I run Firmwareupdater it seems to run fine, with the log ending with: Verify 13344 bytes of flash with checksum. checksumBuffer(start_addr=0x2000, size=0x1000) = 5a7 checksumBuffer(start_addr=0x3000, size=0x1000) = dccc checksumBuffer(start_addr=0x4000, size=0x1000) = 6b9f checksumBuffer(start_addr=0x5000, size=0x420) = 7827 Verify successful done in 0.013 seconds CPU reset. readWord(addr=0)=0x20007ffc readWord(addr=0xe000ed00)=0x410cc601 readWord(addr=0x41002018)=0x10010305 writeWord(addr=0xe000ed0c,value=0x5fa0004)

When I run the Wifi101 firmware updater, the programmer test is OK When I update the firmware, it erases, then writes (413604 bytes) then errors on the verify with this in the log: java.lang.Exception: Error while reading flash memory. at cc.arduino.plugins.wifi101.flashers.java.FlasherSerialClient.readFlash(FlasherSerialClient.java:123) at cc.arduino.plugins.wifi101.flashers.java.JavaFlasher.updateFirmware(JavaFlasher.java:98) at cc.arduino.plugins.wifi101.UpdaterImpl$3.run(UpdaterImpl.java:138)

I checked and I have version 1.6.19 of the SAMD board (latest).

The board will still load sketches like blink but nothing at all using NINA. Can't check the firmware version anymore either. No luck going to down to any versions.

Any ideas?

I simply followed Sandeeps instructions "to the letter"

You should NOT be using the WiFi101 examples but the WiFiNINA ones.

If I were you I would start again at the very first post from Sandeep and digest each step carefully before going ahead.

ballscrewbob: I simply followed Sandeeps instructions "to the letter"

You should NOT be using the WiFi101 examples but the WiFiNINA ones.

If I were you I would start again at the very first post from Sandeep and digest each step carefully before going ahead.

Thanks for the advice to start over, but of course I have already tried that. I'm glad yours went smoothly.

Where did you read that I was using any WiFi101 examples? Am I missing something? I wrote "When I run the Wifi101 firmware updater" I am refer to just that, as in instruction 8 - "Launch the "WiFi 101 / NINA Firmware Updater" from the Tools menu of the IDE" Edited to add, what I should have made clear is that the examples tried were the NINA ones, as in wheat had worked with the NINA library earlier - I guess that is what you meant, but yes, I knew that, but thanks. Those do not run giving a typical "Communication with WiFi module failed!".

Are you saying there is a choice, that there is a WiFi101 firmware updater AND a NINA firmware updater? Because I don't see a choice at all, there is one updater with that board on my machine - again, unless I am missing something big..

It depends on which cores you have installed but YES there are TWO firmware updaters and you were specific about it in your first post

When I run the Wifi101 firmware updater, the programmer test is OK

Both will test OK but only one will do the firmware update itself.
I will assume you downloaded the NIGHTLY version of the IDE ?

You will probably see both the WiFi101 and the WiFiNINA examples close together.
Imperative you pick the correct one.

Your cores look OK.

Open the examples and take a screen shot if you would please.
Here is my screenshot.1010 firmware selection.jpg

This is the lower console output from the sketch UPLOAD.

Atmel SMART device 0x10010005 found
Device       : ATSAMD21G18A
Chip ID      : 10010005
Version      : v2.0 [Arduino:XYZ] Mar 19 2018 09:45:14
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
Boot Flash   : true
BOD          : true
BOR          : true
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.826 seconds

Write 13344 bytes to flash (209 pages)

[=========                     ] 30% (64/209 pages)
[==================            ] 61% (128/209 pages)
[===========================   ] 91% (192/209 pages)
[==============================] 100% (209/209 pages)
done in 0.092 seconds

Verify 13344 bytes of flash with checksum.
Verify successful
done in 0.022 seconds
CPU reset.

That step must be done BEFORE the firmware update.

That DOES NOT UPDATE THE FIRMWARE ! It only prepares the board itself for the update. Once that is done then you would select WiFi101/WiFiNINA Firmware Updater from the TOOLS menu. A new panel will open up and this is where you actually start the update process. Ensure you can see your board and select it in that new panel. Do a Test Connection to make sure the updater can see and talk to your board. Now select the correct firmware as indicated by Sandeep. Hit the Update Firmware button and wait for it to complete.

It might be better if you are on a USB 2.0 port and have any security turned off for the process but I did not need to. and my ports are all USB 2.0 anyway.

Not 100% sure but I just tried a second update to be sure and I think I have hit the same issue as you.

However I unplugged the 1010 and plugged it into another port and it automatic re-installed the driver. I was able to get the check firmware sketch to upload BUT it now reports as

WiFiNINA firmware check.

Communication with WiFi module failed!

ballscrewbob: This is the lower console output from the sketch UPLOAD.

Atmel SMART device 0x10010005 found
Device       : ATSAMD21G18A
Chip ID      : 10010005
Version      : v2.0 [Arduino:XYZ] Mar 19 2018 09:45:14
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
Boot Flash   : true
BOD          : true
BOR          : true
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.826 seconds

Write 13344 bytes to flash (209 pages)

[=========                     ] 30% (64/209 pages) [==================            ] 61% (128/209 pages) [===========================   ] 91% (192/209 pages) [==============================] 100% (209/209 pages) done in 0.092 seconds

Verify 13344 bytes of flash with checksum. Verify successful done in 0.022 seconds CPU reset.




That step must be done BEFORE the firmware update.

That DOES NOT UPDATE THE FIRMWARE !
It only prepares the board itself for the update.
Once that is done then you would select WiFi101/WiFiNINA Firmware Updater from the TOOLS menu.
A new panel will open up and this is where you actually start the update process.
Ensure you can see your board and select it in that new panel.
Do a Test Connection to make sure the updater can see and talk to your board.
Now select the correct firmware as indicated by Sandeep.
Hit the Update Firmware button and wait for it to complete.

It might be better if you are on a USB 2.0 port and have any security turned off for the process but I did not need to. and my ports are all USB 2.0 anyway.

Yes, I know all this and it is spelled out quite well in the instructions. I can also differentiate between different library examples. Here is my analogous output.

Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] Mar 19 2018 09:45:14
chipId=0x10010005
Connected at 921600 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x10)
writeWord(addr=0x20004020,value=0x20008000)
Device       : ATSAMD21G18A
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Chip ID      : 10010005
version()=v2.0 [Arduino:XYZ] Mar 19 2018 09:45:14
Version      : v2.0 [Arduino:XYZ] Mar 19 2018 09:45:14
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
none
readWord(addr=0x41004018)=0
Security     : false
Boot Flash   : true
readWord(addr=0x40000834)=0
BOD          : false
readWord(addr=0x40000834)=0
BOR          : false
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
chipErase(addr=0x2000)
done in 0.611 seconds

Write 13344 bytes to flash (209 pages)
write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)

[=========                     ] 30% (64/209 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0x1000)

[==================            ] 61% (128/209 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x4000, size=0x1000)

[===========================   ] 91% (192/209 pages)write(addr=0x20005000,size=0x440)
writeBuffer(scr_addr=0x20005000, dst_addr=0x5000, size=0x440)

[==============================] 100% (209/209 pages)
done in 0.078 seconds

Verify 13344 bytes of flash with checksum.
checksumBuffer(start_addr=0x2000, size=0x1000) = eca4
checksumBuffer(start_addr=0x3000, size=0x1000) = 58ac
checksumBuffer(start_addr=0x4000, size=0x1000) = ec41
checksumBuffer(start_addr=0x5000, size=0x420) = dd3a
Verify successful
done in 0.013 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)

Now, I only see ONE option on the tools menu (see pic) - are you saying that you see more than one?.

za.jpg|594x405

ballscrewbob: Not 100% sure but I just tried a second update to be sure and I think I have hit the same issue as you.

However I unplugged the 1010 and plugged it into another port and it automatic re-installed the driver. I was able to get the check firmware sketch to upload BUT it now reports as

WiFiNINA firmware check.

Communication with WiFi module failed!

Welcome aboard :)

I am going to go to sleep - maybe with some fresh eyes something will come to me.

We were cross purposes. but are now on the same page.

OK third time was a charm.

Here is what I did and I cannot say which bit helped.

One I ran CCLEANER (my goto clean up tool for testing) Two Ran Wise Registry cleaner (my other main testing tool) Both the above I use the FREE version.

Three I restarted my computer. Four I plugged the MKR into a different USB port. Five went through Sandeeps destructions again.

Hey presto its alive. Ran firmware checker sketch and thank goodness it is all OK.

All is well.

I downgraded to an earlier version of the NINA library, ran that firmware updater and it successfully wrote and verified. Then I upgrade to the current version and it did the same.

I did nothing special other than turn the machine off and go to sleep, then wake-up and start again. Note, that I had turned it on and off that more than once, the night before.

I used no cleaners, scrubbers, mobs, brooms, crowbars or other implements of Windows 7 coercion.

I will pass this on, however, which is what I noticed and I believe is significant. In ALL of my failed attempts, the firmware updater window simply showed the com port number (COMXX). In all of my successful attempts, the firmware update window showed Arduino MKR WiFi 1010 (COMXX). This may not be automatically assumed from the directions (which are quite good) and it is why I mention it. Note that the reference is NOT to the Port line, it is within the updater window (see pic with CORRECT descriptor below).

If you do not see this, in my opinion and experience, at least on a Win 7 machine, do not bother to go further until you get that rectified. Win 7 has a long history of USB port eccentricities, especially on seasoned machines (like mine) that have been used with a bazillion different devices. I wish I had a simple solution for that, but I don’t and I will refrain from the list of usual suspects.

MKR WiFi 1010 port.jpg|528x532

Just got through playing with the LED example that creates a BLE peripheral with service that contains a characteristic to control an LED.

Works like a charm - The LED device is enumerated on nRF Master Control Panel and writing to the characteristic (byte 1 or 0) turns the onboard LED on/off.

I appreciate this so much Sandeepmistry and all others responsible!! I hope for and can't wait to see more (especially central capability - is that in the plans?).

Thanks!

Screenshot_2018-11-17-12-20-02.jpg|900x582

GRR dont talk to me about the vagaries of win 7, 8, 10 com port issues. Usually about 14 or more devices LIVE so creeping com port numbers is my number one pet hate. ;)

I used to recommend locking in port numbers but with so many devices coming into contact with my also seasoned machine that can cause its own set of issues so I no longer tell folks to do that.

So now once I get past what appears to be the magic number of 35 I do a com port stack reset.

However I digress...Good to hear you are up and running.

Hi, I have run through the process of updating the Firmware on a new MKR1010 and the instructions worked perfectly. However, when I run the CheckFirmwareVersion sketch again, it still reports an error although the firmware version does show 1.2.1. I have the latest WifNINA version 1.3.0 installed, but it looks like it is set to check for 1.2.0 specifically.

grep -rH "WIFI_FIRMWARE_LATEST_VERSION" ../Arduino/ ../Arduino/libraries/WiFiNINA/src/WiFi.h:#define WIFI_FIRMWARE_LATEST_VERSION "1.2.0"

This is the error I see from CheckFirmwareVersion:

WiFiNINA firmware check.

Firmware version installed: 1.2.1 Latest firmware version available : 1.2.0

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

Cheers,

Jon

Hi @jomoengineer,

Yes, I can confirm this is an error in the sketch. 1.2.1 is the latest version.

The next version of the the WiFiNINA library will change the == to a >=: https://github.com/arduino-libraries/WiFiNINA/commit/7798c812c4c8fe070247b382fc1b80c66234eaa3

Followed the instruction for updating MKR Wifi 1010 to firmware 1.2.1 and it worked. Thanks for the update. :)

So, with firmware 1.2.1 loaded on the MKR WiFi 1010 is it expected that only BLE support should work or should the WiFi radio work as well? I tried the WifiNINA WiFiWebClient example with FW 1.2.1 and it will not connect to a router. If I downgrade to 1.1.0 it connects without issue to the WiFi router.

Is this expected?