Clear Filters
Clear Filters

Test Connection Failed Arduini MKR1010 WiFi via Matlab Support Package for Arduino

6 views (last 30 days)
Hi everyone,
I'm reaching out for help because I can't connect my Arduino MKR1010 Wifi to Matlab via the arduinosetup command; I keep getting the following error at the end of the procedure: "Test Connection Failed. Go back to check your settings.".
Over the last couple of days I've tried the following (with no success):
I'm currently using an academic version of Matlab 2020b (I'm a college student), I'm going to try again on Matlab 2019b.
I should mention that the arduino was purchased 2 days ago for that very purpose, and that it works just fine in the Arduino IDE and while connected to a COM-port on Matlab. I don't think there's a hardware related issue with the Arduino.
I would really appreciate your help if you have stumbled upon a similar issue, if you have any piece of advice or idea that I should try out.
Thanks in advance.
Michael
  3 Comments
Michael Schaetzel
Michael Schaetzel on 6 May 2021
Hi Rohan,
Thanks for your answer. I thought there was some kind of issue related to the MKR1010 so I returned it, and bought a Nano 33IOT wifi (couldn't get it to work either, I ended up ditching the "Arduino support package for MATLAB" toolbox altogether and ended up communicating solely via Bluetooth).
I would still like to get to the bottom of this though; here's the output I get from pinging the Nano after it's been setup by MATLAB:
cmd = ['ping -n 3 ', '192.168.1.119']
cmd =
'ping -n 3 192.168.1.119'
>> [~,result] = system(cmd)
result =
'
Envoi d'une requête 'Ping' 192.168.1.119 avec 32 octets de données :
Réponse de 192.168.1.119 : octets=32 temps=91 ms TTL=255
Réponse de 192.168.1.119 : octets=32 temps=4 ms TTL=255
Réponse de 192.168.1.119 : octets=32 temps=19 ms TTL=255
Statistiques Ping pour 192.168.1.119:
Paquets : envoyés = 3, reçus = 3, perdus = 0 (perte 0%),
Durée approximative des boucles en millisecondes :
Minimum = 4ms, Maximum = 91ms, Moyenne = 38ms
'
Pinging seems fine to me, yet the "Test connection" still won't work.
Neither does the connection.
>> arduino('192.168.1.119','NANO33IOT',9500)
Unable to find Arduino hardware at 192.168.1.119. First argument must be a valid serial port, Bluetooth address/name or IP address/hostname.
I've also tried configuring a Bluetooth device (HC-05) via the arduinosetup, but same story. I've tried with MATLAB 2019b, 2020b and 2021a. As mentionned earlier, I've given up on that toolbox but it's a shame, it could really be useful.
Thanks for your time, cheers.
Michael
MathWorks MATLAB Hardware Team
Hi Michael,
We are troubleshooting this issue to help you unblock soon.
Meanwhile, please reach out to the MathWorks Technical Support
with details on the MATLAB Version, Support Package Version, and the machine language setting to help further in resolving this issue.
Thanks,
MATLAB Hardware Team
MathWorks

Sign in to comment.

Answers (1)

Song-Hyun Ji
Song-Hyun Ji on 27 Sep 2021
This issue occurs when the machine's language settings are set to a language other than English. Please follow the steps below to work around the issue:
1. Open 'master.m' class located at 'C:\ProgramData\MATLAB\SupportPackages\R2020b\toolbox\matlab\hardware\shared\hwsdk\+matlabshared\+hwsdk\master.m'.
2. Replace the char vector 'time' with local language wording like '시간' ('time' in case of Korean) in the line "match = regexpi(result,'time=[0-9.]+ms TTL=\d+')" at line 1237
3. The code line after this change should look something like the following:
>> match = regexpi(result,'시간=[0-9.]+ms TTL=\d+')

Categories

Find more on MATLAB Support Package for Arduino Hardware in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!