Major performance issue with MKR4000 vidor compared to MKR1000 doing fine

Hello. I'm new in these forums, and to Arduino.

I developed a sketch, which is a very basic web server just showing check-boxes for pins 0 to 21.

Checking them on and off simply set the related pin to HIGH and LOW respectively.

Please note that the very same sketch is compiled on both platforms, with conditional compilation only to include the correct WIFI header file (WiFi101.h or WiFiNINA.h) .

It works functionally fine on both MKR1000 and MKR4000 vidor.

Only, it is very slow on MKR4000 to refresh the web page (up to 10 sec!), while it takes an wink to show up on the MKR1000. More specifically, the browser print the page very slowly.

I use both platforms at the very same place (1 cm from each other). When one is running, the other is off.

Before I start investigating for the root cause, I'd like to know if anybody might have an idea about some obvious reason ?

Thanks in advance for any answer.

Sketches ?

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum.

Thank you for you interest and your advice.

However, my sketch is about 700 lines long, spread into about 10 source files. Not very friendly to post everything here. Furthermore I won't need any advice anymore if I have to find the faulty lines to show where the issue is.

So it was on purpose that my question was general, because I think that it makes sense to ask if there are usual traps that may make a board slower (here the MKR4000). For example, some config or whatever.

My guess (but I may be wrong) is that there is something different between WiFi101 and WiFiNINA respective usages. Although the APIs look the same, they might need to be used slightly differently.

"Only, it is very slow on MKR4000 to refresh the web page (up to 10 sec!), while it takes an wink to show up on the MKR1000. More specifically, the browser print the page very slowly."

Is the code used identical? The it works, but slowly, would indicate that the returned html code returned to the browser is not being bundled for efficient transmission.

zoomkat:
Is the code used identical? The it works, but slowly, would indicate that the returned html code returned to the browser is not being bundled for efficient transmission.

  1. Exactly, unless MKR1000 includes WiFi101.h and MKR4000 includes WiFiNINA.h. Everything else is strictly the same (I really use the very same sketch on both).

  2. My guess too, or some config issue with the NINA chip. I’ll investigate in that direction (I naively hoped someone would have already experienced this), when my code will work again in MKR1000 :slight_smile:

Just checked the RSSI on both HW: both are mostly in the range -45, -50 dBm.

Even the scan of WiFi networks in slower on MKR4000, with output data going only to Serial log.

IMO, this confirms that there is an issue at the Wifi level (HW/SW/compatibility/config/...) on my MKR4000 platform. Unfortunately, in these times of confinement, I can't test on other networks.

(small CPU speedtests provides the same results on both platforms)

Really weird.

Found this topic: https://forum.arduino.cc/index.php?topic=657807.0

And this one: https://www.element14.com/community/thread/71295/l/arduino-mkr-vidor4000-problems?displayFullThread=true

OK, I saw I have WiFININA firmware 1.1.0 while WiFiNINA library was 1.4.0

Apparently version 1.1.0 of the firmware if the latest compatible with the MKR4000 board.

However, one would expect the newer libraries being backward compatible with former firmwares.

I performed the following profiling on my sketch.

Board Name FirmWare Library Time
MKR4000 1.1.0 1.0.0 doesn’t compile
1.1.0 1.1.0 15,3 sec
1.1.0 1.2.0 15,3 sec
1.1.0 1.3.0 14,7 sec
1.1.0 1.4.0 14,7 sec
1.1.0 1.5.0 14,7 sec
MKR1000 1.1.0 0.16.0 0,3 sec

The MKR400 WiFi is thus roughly 50 times slower than the one of the MKR1000 !

Tested page just contains this:

0 - PIN_D0
1 - PIN_D1
2 - PIN_D2
3 - PIN_D3
4 - PIN_D4
5 - PIN_D5
6 - PIN_D6_LED
7 - PIN_D7
8 - PIN_D8_MOSI
9 - PIN_D9_SCK
10 - PIN_D10_MISO
11 - PIN_D11_SDA
12 - PIN_D12_SCA
13 - PIN_D13_RX_LED
14 - PIN_D14_TX
15 - PIN_A0
16 - PIN_A1
17 - PIN_A2
18 - PIN_A3
19 - PIN_A4
20 - PIN_A5
21 - PIN_A6

Blink
Blink Rate ON (ms):

Blink Rate OFF (ms):

Nothing extraordinary.

So my guess, having read a lot of things about the history of the this issue on the MKR4000 in these forums as well as in other places is that this is really either a WiFiNINA library issue, either as I read (I didn’t check yet), caused by the board design that makes data path between the CPU and the NINA chip going through the FPGA (an issue or the design, due to FPGA related constrains?).

Anyway, as such, HTTP over WiFi iq not usable, it is much to verbose. Maybe Arduino is considering that only MQTT should be used?

One thing is sure: my fault or not (but as other users reported the issue as well and reported to that Arduino are not very responsive on this issue or design), more informations from Arduino would be more than welcome, to say the least (even in their online store).

So far, I’m simply not able to use the board as I expected. What a pity!

Reported this (potential) issue on GitHub : https://github.com/arduino/Arduino/issues/10145

For later reference.

Wireshark WLAN captures (limited to only page reload).

Clearly, compared to MKR1000, on MKR4000 there are packets:

  • TCP Spurious retransmissions
  • TCP Dup ACK
  • TCP Out-Of-Order.

And most of the time is lost there.

See attachements (both MKR1000 and MKR4000 for comparison).

My laptop: 192.168.1.40
MKR1000: 192.168.1.48
MKR4000: 192.168.1.49

MKR1000-wireshark-export.zip (4.95 KB)

MKR4000-wireshark-export.zip (2.25 KB)