element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino Projects
  • Products
  • Arduino
  • Arduino Projects
  • More
  • Cancel
Arduino Projects
Blog MKR WiFi 1010 - Enable BLE Support
  • Blog
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: jomoenginer
  • Date Created: 24 Nov 2018 11:33 AM Date Created
  • Views 5304 views
  • Likes 9 likes
  • Comments 11 comments
  • arduio
  • ble
  • mkr_1010
  • arduino mkr
  • arduino_tutorials
  • mkr_auto_hacks
  • arduino mkr wifi 1010
Related
Recommended

MKR WiFi 1010 - Enable BLE Support

jomoenginer
jomoenginer
24 Nov 2018
image

Arduino Home

An Open-Source platform to create digital devices and interactive objects that sense and control physical devices.

Arduino Tutorials
Arduino Projects

 

I was lucky enough to get a MKR WiFi 1010  to add to my Robot ARM project I am modifying for the Arduino MKR Giveaway contest and the first thing I wanted to do was to get it connected to the local network. With the MKR1000 I have been using, I have used WiFi101 from the Arduino IDE for WiFi network examples.  However, I found with the MKR WiFI 1010, the WiFi101 library is not valid and the WiFiNINA libraries should be used when using this device.  In order to use the WiFiNINA libraries with the MKR WiFi 1010, the firmware on the board for the U-BLOX (ESP32) device has to be upgrade to a minimum of v1.2.0.   The main issue I found was that the current downloadable version of the Arduino IDE from the Arduino site does not have the proper tools to perform the firmware update on the MKR WiFi 1010.  After some further searching, I found this post on the Arduino MKRWIFI1010 forum site that describes how to perform the firmware update on this board.

 

Firmware Update 1.2.1 - available now, with BLE mode

https://forum.arduino.cc/index.php?topic=579306.0

 

The other thing I noticed was that in the title of the post it mentions that the 1.2.1 adds BLE mode to the board. This certainly raised my curiosity and adds another layer of usage for this little board.

 

This is what I had to do to get the MKR WiFi 1010 firmware updated to run the WifiNINA libraries as well as enable BLE mode.

 

I.  Update MKR WiFi 1010 Firmware

 

1. First go to the Arduino IDE page and scroll down to where it shows "HOURLY BUILDS."

 

2. Download the latest build for the OS you are running,

   a. In this instance I am running Ubuntu 16.04.5 LTS.

       NOTE: The Ubuntu version can be found by running the following command:

 

lsb_release -a

 

3. Uncompress and install the IDE on your system.

    a. On Ubuntu, move the uncompressed folder to the user home folder: '~/'.

    b. Change directories to the new Arduino IDE folder and run the Linux install scripts:

 

    ./arduino-linux-setup.sh $USER
    ./install.sh

 

    c. This should put the Arduino IDE Icon on the Desktop.

       Double click this to launch the Arduino IDE.

image

 

 

 

 

 

 

 

 

 

 

 

 

 

4. Check the version of firmware on the MKR WiFi 1010.

    a. Navigate to File->Examples->WifiNINA->Tools->CheckFirmwareVersion

    b. Build and load this sketch

    c. In the serial terminal the version of Firmware will be shown.  If the Firmware version is less than 1.2.0 then the firmware needs to be updated.

Ex:

    WiFiNINA firmware check.

     Firmware version installed: 1.0.0
     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.

 

5. To update the Firmware, navigate to File->Examples->WifiNINA->Tools->FirmwareUpdater

    a. Build and Load this sketch:

        NOTE: Do not open the serial term window. Close it if it is open.

       This places the MKR WiFi 1010 into a mode to allow the firmware to be updated; it does not update the firmware

 

6. Load the new firmware as follows:

    a. From Tool menu option, select: Wifi101/WifiNINA Firmware Updater

        NOTE: This will bring the Updater window

 

image

 

7.  In the text window under Select port of the WiFi module, select the module associated with the connected MKR module.

    a. Ex:

      Arduino MKR WiFi 1010 (/dev/ttyACM0)

    b. This should cause the Update firmware version to show in the drop-down box.

       EX: NINA firmware(1.2.1) (Arduino MKR WiFi 1010)

 

image

 

8. To verify the connection to the board, click the Test connection button and the connection will be verified.

    a. If successful, a pop up window will show Test successful. Otherwise, an error will show indicating what the possible issue is.

image

 

9. If the connection test succeeds, click the Update Firmware button to load the firmware update to the MKR WiFi 1010.

    a. If the firmware update succeeds, a popup window will appear with status Success.

image

 

10. Close the Updater window and load the CheckFirmwareVersion sketch again as described earlier.

    a.  The output should appear as follows.

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.

 

 

        NOTE: There is currently a bug in the CheckFirmwareVersion sketch that causes it to show NOT PASSED even though the firmware version is greater than the latest firmware version listed.

        This can be corrected by editing line 46 in the CheckFirmwareVersion sketch

    From:

if (fv == latestFv) {

 

    To:

  if (fv >= latestFv) {

 

  This should now show:

WiFiNINA firmware check. 
 
Firmware version installed: 1.2.1 
Latest firmware version available : 1.2.0 
 
Check result: PASSED

 

 

II. Add Arduino BLE Files

 

1.  To add the BLE examples and library files, download the files as a ZIP file from the Arduino BLE GitHub Repository.

    https://github.com/arduino-libraries/ArduinoBLE

 

2. Load the files to the Arduino IDE

    a. From the Arduino IDE menu, select Sketch->Include Library->Add .ZIP Library and select the .zip file that was downloaded.

    b. Once the libraries are loaded, the BLE examples will appear under:

        File->Examples->ArduinoBLE

    c. Select an example to test the BLE functionality of the MKR WiFi 1010.

 

3.  Test of the LED BLE example, I'm using BlueZ from a Raspberry Pi.

    a. Build and load the LED BLE example.

        NOTE: This will create a single service called ledService.

    b.  Scan for the MKR WiFi 1010 BLE connection.

 

sudo hcitool lescan
LE Scan ...
84:0D:8E:11:24:1E (unknown)
84:0D:8E:11:24:1E LED
4C:B1:52:34:87:31 (unknown)

 

     The MKR WiFI 1010 shows as : 84:0D:8E:11:24:1E LED

 

4. Connect to the BLE device

 

sudo gatttool -i hci0 -b 84:0D:8E:11:24:1E -I
[84:0D:8E:11:24:1E][LE]> connect
Attempting to connect to 84:0D:8E:11:24:1E
Connection successful

 

 

5. Using the Serial Monitor from the Arduino IDE, the MKR WiFi 1010 should report the connection succeeded.

BLE LED Peripheral 
Connected to central: 5c:f3:70:6e:13:4b

 

6.  List the available BLE Services using the 'primary' command

[84:0D:8E:11:24:1E][LE]> primary
attr handle: 0x0001, end grp handle: 0x0005 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0006, end grp handle: 0x0009 uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x000a, end grp handle: 0x000c uuid: 19b10000-e8f2-537e-4f6c-d104768a1214

 

   NOTE: Handle 0x000c is the LED Service listed in the Arduino Sketch.

 

7.  Check current value of LED

[84:0D:8E:11:24:1E][LE]> char-read-hnd 0x000c
Characteristic value/descriptor: 00

 

8. Turn LED on:

[84:0D:8E:11:24:1E][LE]> char-write-req 0x000c 01
Characteristic value was written successfully

 

image

 

 

9. Turn LED off:

[84:0D:8E:11:24:1E][LE]> char-write-req 0x000c 00
Characteristic value was written successfully

image

 

10. MKR WiFI 1010 Serial Term output from inbound commands:

BLE LED Peripheral 
Connected to central: 5c:f3:70:6e:13:4b 
LED on 
LED off

 

 

I have not yet tried the other BLE examples for this board, so I have no comment on them.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 6 years ago +1
    Nice post, It looks like you can bring wifi control to any Arduino type device, which opens up some interesting applications. DAB
  • mp2100
    mp2100 over 6 years ago +1
    Good details in this update. I like seeing the problems and what you did to solve them. Allen
  • matjazpintaric
    matjazpintaric over 5 years ago

    Hi, could someone try if it works with google science jurnal app. I would like to connected mkb wifi 1010 with science jurnal app. I can not see mkb board on this app.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • paulcollett
    paulcollett over 6 years ago in reply to jomoenginer

    Okay, this is strange. I tried the 1.0 and it worked. I then tried the 1.1 and it worked. Then I went back to 1.2 and it worked. Maybe something clicked into place during all of that and it fixed its self. Whatever it is, thank you very much for the help.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jomoenginer
    jomoenginer over 6 years ago in reply to paulcollett

    To see if they broke something or not, at the top of the GitHub page, to the left you will see a Pull Down list labeled "Tag".  Click this and then select the 'Tag' tab, then select either 0.1.0 or 0.1.1.  This should be before the latest check-ins. Try either of these versions and see if the issue goes away. There were some other changes in April as well, so if something that got checked in broke the MKR WiFi 1010 I can not tell when it was checked in.

     

    Otherwise I'll have to try this later.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • paulcollett
    paulcollett over 6 years ago in reply to jomoenginer

    Literally the only thing on the serial console is "starting BLE failed!"

     

    If I look at the code for the LED sketch it's getting to line 35 which reads:

        Serial.println("starting BLE failed!");

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jomoenginer
    jomoenginer over 6 years ago in reply to paulcollett

    Can you post the full serial console output that shows the "starting BLE failed"?   Preferably from boot of the board.

     

    There have been some edits to the ArduinoBLE code to add what looks like a Nano device so I wonder if they broke the MKR WiFi 1010 in the process.

     

    I'll have to give a try later.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube