MKR Vidor BLE compilation error

The Board documentation at https://www.arduino.cc/en/Guide/MKRVidor4000 indicates that the MKR VIDOR 4000 supports BLE?

I'm compiling the ArduinoBLE ButtonLED sketch and the compiler is complaining that the MKR Vidor 4000 does not support BLE, giving the following errors.

Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Arduino MKR Vidor 4000"

Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIUartTransport.cpp:33:2: error: #error "Unsupported board selected!"

#error "Unsupported board selected!"

^~~~~

Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIUartTransport.cpp:99:40: error: 'SerialHCI' was not declared in this scope

HCIUartTransportClass HCIUartTransport(SerialHCI, 912600);

                                    ^~~~~~~~~

Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIUartTransport.cpp:99:40: note: suggested alternative: 'SerialUSB'

HCIUartTransportClass HCIUartTransport(SerialHCI, 912600);

                                    ^~~~~~~~~

                                    SerialUSB

exit status 1

Error compiling for board Arduino MKR Vidor 4000.

Any suggestions?

That is not the meaning of the error message. The error message is saying is that the ArduinoBLE library does not support the MKR Vidor 4000.

As mentioned on that page, the ESP32 microcontroller on the MKR Vidor 4000's NINA WiFi module certainly does have BLE support. So as far as the hardware goes there is a BLE capability.

What remains is figuring out how to use that capability in your sketches. You could look into whether the ArduinoBLE library can be adapted to your needs, whether another library with out of the box support exists, or whether you will need to implement your own bespoke solution. The ESP32 microcontroller of the NINA module has good Arduino support, so you even have the option of putting a custom firmware on it if the firmware Arduino produced doesn't meet your needs.

Hi Pert. Thanks for the reply.

I have been trying to update the Firmware on the Vidor 4000.

I have been studying the related thread here WifiNiNA Firmware update - #15 by pert which I see you have contributed to as well.

The IDE version I'm using (1.8.15) is only showing me firmware to update options 1.0.0 and 1.1.0 even though the tools folder (C:\Program Files (x86)\Arduino\tools\WiFi101\tool\firmwares\NINA) shows Nina Firmware folders from 1.0.0 to 1.4.8.

There seems to be a major disconnect between the Arduino SDE and syncing the firmware with the updated libraries (I have WIFI Nina 1.8.13 installed )

The latest Nightly build of the IDE (as suggested in the other Post) is a totally new UI and does not include Firmware/Certificate updater.

Can you provide a solution to updating the Firmware or a link to a nightly build for windows that has the correct list of Firmware updates for the Vidor 4000 WIFI Nina please? Thanks.

This is an accurate statement when it comes to the NINA firmware in general. As you saw from the other thread, for the other Arduino boards that use a u-blox NINA-W102 (e.g., MKR WiFi 1010, Nano 33 IoT, Nano RP2040 Connect), the NINA firmware development has become very active recently as new requirements emerge from Arduino IoT Cloud, resulting in a release frequency that is far higher than the release frequency of the Arduino IDE. Since there is no mechanism to allow newer firmware versions to be pulled by the classic Arduino IDE, this means that the firmware version available from the IDE (the latest version at the time of the IDE's release) is usually outdated. This is not a nice experience for the users of those boards and this is why work is in progress now to add the ability to Arduino IDE 2.x to pull the latest firmware version.

However that is not the situation with the MKR Vidor 4000. The 1.1.0 firmware version you see in the IDE's firmware updater is the newest available version for the Vidor. The Vidor has a different way of communicating with the NINA module and it can not support the modern firmware versions used by the other boards that have a NINA. So in this case where the firmware development is not very active, the firmware distribution strategy used by the classic Arduino IDE works reasonably well.

It's not necessary. As I mentioned above, the list of firmware versions you see in any recent version of the classic Arduino IDE's firmware updater tool is the full list available for the Vidor.

Thanks again Pert. Just a couple more questions. So when I updated the firmware to 1.1.0 (assuming that is the latest version for the Vidor 4000) and then I ran the check version script I got the error message "Communication with WiFi module failed!". Does that mean that the firmware update did not succeed or possibly that the script is not compatible with that firmware update and as it stands I will not be able to use the WiFi module on the board without considerable extra effort? Does the chip have firmware on it when it is shipped with the Vidor? Thanks.

I was also able to reproduce this problem. I used the Arduino Library Manager to install the 1.3.0 version of the WiFiNINA library from back in 2018 when the NINA firmware version 1.1.0 was released and it was able to correctly detect the firmware version on the Vidor. So it seems that there is at least some level of incompatibility between the modern WiFiNINA library and the Vidor. I don't know whether it goes beyond the firmware version query though.

If you would like to try that version of the library, here are the instructions:

  1. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE's menus.
  2. Wait for the update to finish.
  3. In the "Filter your search" field, type wifinina.
  4. Press Enter.
  5. Find "WiFiNINA by Arduino" in the search results. Click on it.
  6. Open the "Select version" dropdown menu and select '1.3.0".
  7. Click the Update button.
  8. Wait for the installation to finish.
  9. Click the Close button.

It's likely that there are more recent versions of the library than 1.3.0 that will be able to detect the firmware version. I just picked 1.3.0 arbitrarily because it was a release that came not too long after the release of the 1.1.0 NINA firmware.

Yes.

Thanks again @pert. I'll give that a try.

Hi @pert . I installed the 1.3.0 library and I updated the Firmware to 1.1.0 but when I ran the check Firmware Version script I got the following message

20:21:19.997 -> WiFiNINA firmware check.
20:21:19.997 ->
20:21:22.840 -> Firmware version installed: 1.1.0
20:21:22.840 -> Latest firmware version available : 1.2.0
20:21:22.840 ->
20:21:22.840 -> Check result: NOT PASSED
20:21:22.840 -> - The firmware version on the module do not match the
20:21:22.840 -> version required by the library, you may experience
20:21:22.840 -> issues or failures.

How can I burn the Latest firmware version when it is not present in the Arduino SDE Updater list? How doe it know the latest firmware version available? What version is shipped on the U-blox chip? Thanks for your help again.

But the Sample sketches do work with version 1.1.0. So that's a positive :slightly_smiling_face:

The Firmware would have to be updated to Version 1.2.0 in order to use the Arduino BLE library.

That was the latest NINA firmware version at the time of the WiFiNINA library's 1.3.0 release. This message is not specific to the Vidor, it's only the NINA firmware version in general. That's not a great user experience when the version mentioned is not available for the Vidor board you are using.

I noticed that I had looked into it two years ago:

As I concluded:

I was looking at this from the viewpoint of someone using CheckFirmware to determine whether they can update their WiFiNINA firmware version. However, thinking about this more I realized that the check is also needed to determine whether the firmware version installed is compatible with the library. For that usage, it may be wrong to indicate to the user of a MKR Vidor 4000 with WiFiNINA firmware 1.1.0 installed that everything is fine. Instead, they need to roll back to the version of the WiFiNINA library that was written for WiFiNINA firmware 1.1.0.

Well, as I said, I can't recommend that you mess with firmware versions newer than 1.1.0 on the Vidor. The reason being that I take the fact that the IDE's firmware updater was intentionally configured to not offer the newer ones for the Vidor as a sign that they are not intended to be used on the Vidor.

However, if you really do want to experiment, the Arduino Firmware Uploader command line tool, which is intended for more advanced use cases, does allow you to install any firmware version on the Vidor:

Just out of curiosity, I went ahead and flashed my Vidor with the latest 1.4.8 version of the firmware. After doing that, I got the "Communication with WiFi module failed!" error from the CheckFirmwareVersion whether I used WiFiNINA 1.3.0 or the latest 1.8.13. But I had no problem with going back to the 1.1.0 firmware version at least.

It's hardcoded into the WiFiNINA library's code:
https://github.com/arduino-libraries/WiFiNINA/blob/1.3.0/src/WiFi.h#L24

#define WIFI_FIRMWARE_LATEST_VERSION "1.2.0"

So it's not really the latest firmware version, but rather the latest firmware version at the time of the library's release. As I mentioned above, I interpret this to be more the version of the firmware the library was intended to be used with.

My guess is that it is the latest firmware version at the time the board was manufactured.

Hi @pert. Thanks for all your help to date. The Wi-Fi functionality is working on the MKR Vidor 4000. So I might look at a sockets solution for communication there. Although not ideal.

On the BLE aspect of the Vidor 4000. I see the ArduinoBLE Library is written for the Nina-B306 Chip (and possibly some others which are on some of the Arduino Boards (I.E. the Nano 33 BLE) which I am evaluating as well. Any reason why this library would not work with the Vidor 4000 which has the Nina-W102 onboard? Surely the Bluetooth Protocol and programming would be the same on both chips? Although I see the Nina-W102 (older chip on the Vidor?) only supports Bluetooth 4.2 whereas the Nina-B306 supports Bluetooth 5.0. Both seem to support BLE. There are some other differences, notably different Chip inside, Flash Memory size and MCU.

The U-Blox Module comparisons can be found here https://www.u-blox.com/sites/default/files/ShortRange_LineCard_UBX-14003456.pdf

When I compile a script for the Vidor 4000 with the Arduino BLE library the error reported is in HCIUartTransport.cpp because the definition is missing for the Vidor Board.

#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) etc...

So my question really is "what is the defined Logical name for the Vidor 4000?" Is it ARDUINO_MKR_VIDOR_4000 ? and without doing a C++ deep dive maybe Just adding it in as a definition in the appropriate sections of the existing Arduino BLE library code might enable the Library to compile and run on the board and activate the Bluetooth module. Although I'm not too hopeful there.

On the whole I think the Nano 33 BLE would be better for BLE communication. But the 3.3v limitation is a pain as I want to prototype quickly with Grove devices attached via a Grove shield for Nano. I think I read that you have to open the 3.3v gate on the back of the Nano 33 to activate the 3.3v. What is the best way to open this gate? I Presume the VUSB will stay open and still allow communication with the device for downloading programs. This 3.3v limitation will greatly hamper debugging as the Serial monitor will not be available with a power supply coming through the USB Micro (as the Nano is mounted on the Grove shield). So maybe an OLED display there.

Will the Nano 33 BLE run with Grove Devices attached using a 3v stepdown power supply (lowest voltage available on a plug in transformer) through the Micro USB port while I wait for a Battery pack to arrive? I don't want to blow the board. Boards are in short supply at the moment!!

Thanks again for your time.

I wouldn't say so. Despite being in the same "NINA" product family of radio modules manufactured by u-blox, these are very different. Even more significant is the different usage. On the Nano 33 BLE, the NINA-B306's nRF52840 is the primary microcontroller your code is running on. Your sketch is the firmware on that chip. On the boards that use the NINA-W102, the primary microcontroller is the ATSAMD21G18 and the ESP32 microcontroller of the NINA-W102 is running a standard firmware that is not affected when you upload a sketch to the board. The ATSAMD21G18 sends commands to the ESP32 via the SPI bus, and the ESP32 then handles the WiFi or BLE communication.

Well, as I mentioned before, the Vidor is unique when compared to the other NINA-W102 boards in that the NINA-W102 module is connected to the FPGA rather than directly to the ATSAMD21G18. I don't have enough knowledge about this particular board to know what the implications of that difference are though.

The board identification macro is ARDUINO_SAMD_MKRVIDOR4000 This macro is defined globally when you compile for the MKR Vidor 4000.

What do you mean by "the 3.3v limitation"?

I don't know what you mean by "activate the 3.3v", but whatever it is, it's wrong. I'll explain the situation:

There is a trace jumper on the back of the Nano 33 BLE marked "3V3":
Clipboard01
The board comes with this jumper shorted. This connects the MPM3610 step-down voltage converter to the NINA-B306. That step-down is used for converting the voltage from the USB cable or VIN pin to the 3.3 V voltage level required by the NINA-W306 (it would burn up if you powered it at 5 V). However, there is some power loss in that conversion, so if you want to use the board in a low-power application where you want the board to be able to run for a very long time on a battery charge, you should not use the MPM3610 and instead should power the board directly via the "3.3 V" pin.

The problem is that, even when you are not using the MPM3610 to convert the voltage, it is still drawing current. The solution is to disconnect it from the circuit altogether. That is done by cutting the "3.3 V" jumper. However, you should note that once you do that you will no longer be able to power the board via the USB cable or VIN pins. You will always need to provide an appropriate power source via the 3.3 V pin. So for general tinkering around with the board, you would probably find it inconvenient to have this jumper cut. It's only when you want to use the board in a battery powered finished project that the time would come to cut the jumper. Of course, you can always short the jumper again with a bit of solder.

I use an "xacto" hobby knife. You do need to be careful to make sure you get all the way through the trace to break the electrical connection. That takes a few passes. I like to make two cuts, then make sure I have actually removed a small section of the trace, rather than only making a single thin cut that might accidentally be closed later by a sliver of the copper trace left loose in the the cut.

You will need to power the board via the 3.3 V pin to be able to upload. You will no longer be able to use it with just the USB cable alone.

I don't know what this "Grove Devices" thing is (I am familiar with the Seeed Grove system in general), but no, I don't think that will work. The MPM3610 is rated for a minimum input voltage of 4.5 V. If you have a 3 V supply then you should power the board via the 3.3 V pin.

With both the Vidor and the Nano 33 BLE, be aware that these boards use 3.3 V logic levels. This is different from the Arduino boards (e.g., Uno, Mega, Leonardo) that use 5 V logic levels. If you connect a peripheral that uses 5 V levels directly to either board then you will likely destroy the microcontroller. You should either use peripherals with 3.3 V logic levels, or else a logic level converter between the two.

Hi @Pert.

To clarify on the use of Grove devices. I'm using a SEEED Grove shield for Arduino Nano https://www.seeedstudio.com/Grove-Shield-for-Arduino-Nano-p-4112.html with the Nano 33 BLE. When the Nano is connected to the PC using the USB I can run and test the Bluetooth functionality successfully but I cannot read a signal from a Grove touch sensor attached via the SEEED Grove shield for Arduino Nano (The Grove touch sensor has an operating voltage of 2.0 - 5.5V Grove - Touch Sensor - Seeed Wiki). I presume this is because the Pins are getting no power via the USB connection and if I read your earlier comment correctly the MPM3610 is only stepping down the voltage for the NINA-B306.

As the Nano 33 BLE pins are in the Grove shield Socket I cannot supply a 3V supply directly to the Nano. There are pinholes on the Shield matching the pins on the Nano. If I solder two pins to the Grove Shield (3.3v and GND) and connect these pins to a 3v power supply. Will that power the Grove touch device (and possibly others at a later date) attached to the shield without cutting the 3.3v jumper on the Nano 33 BLE so I can continue to download sketches to develop and test via the USB connection.

Thank you for your time and patience.

The "3.3 V" jumper is only of interest for reduction of power consumption. It is not relevant to the subject you mention.

It is another jumper on the board that is of relevance:
image
The "VUSB" jumper connects 5V to the pin that is labeled as "5V" on the classic Nano. This jumper is open , so that pin is disconnected and will not power peripherals that are connected to it. The Seeed Grove Shield for Arduino Nano connects the VCC pins on the Grove connectors to this "VUSB" pin on the Nano, so there will be 0 V on the Grove VCC pin.

If you use a bit of solder to close that "VUSB" jumper, then the pin will be connected to the 5V from the Nano 33 BLE's USB connection. The reason this board is designed to have that disabled by default is that, unlike the classic Nano, this board uses 3.3 V logic levels, and connecting 5 V to the I/O pins will destroy the board. Having 5 V convenient on the board might make it more likely for people to do that.

It does it for all the 3.3 V components on the board as well as providing 3.3 V on the "3.3 V" pin, which can be used to power external circuits.

@pert Does that mean that if I solder the VUSB then I will be able to read the Grove touch sensor safely or will that blow the Nano? Otherwise it appears that I cannot use the grove shield and attached grove modules and I'll move on to another option.

There is a suggestion in the comments section on the Grove Nano shield:
https://www.seeedstudio.com/Grove-Shield-for-Arduino-Nano-p-4112.html#disqus_thread

I think you should be able to solder a jumper from VCC (Pin 14) to 3V3 (Pin 4). This would ensure that all Grove sensors are powered by 3.3V thereby satisfying the 3.3v input limitations of the Nano 33 IoT.

In this case, you must make sure to not close the VUSB jumper, as the jumper on the Grove shield will be connecting the 3.3 V pin to the VUSB pin.

Note that these are two different types of jumper. In the case of the VUSB jumper, it is a set of exposed pads printed on the PCB close enough together to make bridging with solder easy. In this case, Arduino intentionally designed the board for the user to be able to make this electrical connection. In the case of the "jumper" mentioned in that comment, they are only talking about a short piece of wire soldered on one point of the Grove Nano Shield to another. That would be most easily done using the convenient plated through hole pads Seeed added to the board between the female headers and the Grove connectors.

Hi @pert. I actually saw that post but I was unclear about the Jumper. Thanks for clarifying it. I will try that.

Just on the MKR Vidor which was at the top of the conversation here. I am using the Vidor 4000 mounted on the Arduino MKR Connector Carrier Arduino MKR Connector Carrier | Arduino Official Store which handles all the 3.3v / 5v issues effectively. But there appears to be no BLE library for the Vidor 4000 so I am looking at using the WIFI Nina Library with Web Sockets for communication to a Raspberry PI server. Not ideal. Bluetooth would be a better fit. The Nano 33 BLE is much more compact and does have a BLE library. If you come across any BLE library compatible with the Vidor 4000 I would appreciate hearing about it. Thanks again for your Help.

hey Paul

went through the conversation to see what was going on.
about this

If you come across any BLE library compatible with the Vidor 4000 I would appreciate hearing about it. Thanks again for your Help.

Until Arduino decides to release a new version of the NINA firmware to target the Vidor 4000 the BLE hardware won't be activated at all. That would be version 1.2.1, release by Sandeep Mistry on November 2018 (1.2.0 had TLS/SSL issues).

I don't see this happening anytime soon, so I'd advice using a MKR WiFi 1010 if you want the MKR format or opt for a Nano 33 IoT or BLE (like you have).
Just remember that older Grove connector carriers are not designed to work at 3V3, which is the logic level these new Nano support and consider they are not going to handle 5V gracefully.

If you have no need to develop FPGA applications I'd forego the Vidor, since I highly doubt it will receive any love going further.

Cheers
ubi

Hi @pert @ubidefeo. Thanks for all your help. I have switched to the Nano 33 BLE for now with the Nano SEEED Grove Shield. With the Pins 4 to 14 bridged on the Shield the 3.3v touch sensor I am using works. I notice that SEEED have just released a new version of the shield and the page https://www.seeedstudio.com/Grove-Shield-for-Arduino-Nano-p-4112.html for the shield has just been updated :slightly_smiling_face: One of your colleagues (Pedro Lima) has reached out to me in an email about the Vidor. I will direct him to this conversation. Once again thanks for all your help.