Arduino MKR1000 + Simulink external mode over WiFi

My Simulink model fails at the build stage when set up to run in external mode with communication over WiFi. I get an error stating that a .c file is missing from the WiFi101 library.
I did some digging and found that the library was restructured and the expected .c (socket_buffer.c) file has been removed. I tried to install the most recent version of the library that still had the file but ran into another error. The model builds, but I get an error that an IP address could not be assigned. The suggested cause of this is an outdated WiFi101 library...
Seems like a Catch 22. Anybody managed to get this working?

 Risposta accettata

Simulink support package requires the WiFi 101 library to be a specific version - 0.14.3 . Type winopen(arduinoio.IDERoot) if you are in Windows and open the Arduino IDE. If not, move to the location and open Arduino IDE.
From the IDE itself, update the WiFi library to that specific version and this error will be gone.

6 Commenti

What error messages are you getting? I have that exact library version and everything works with R2019a and MKR1000 board.
Looks like the External mode communication interface is XCP on Serial / XCP on WiFi. I would suggest trying with WiFi instead.
Go to Configuration Parameters > Hardware Implementation > Hardware board settings > Target hardware resources > External mode > Communication Interface > WiFi/Serial depending on which one you want.
If you want to do XCP on Serial / XCP on WiFi there must be resources explaining how to do the same. Feel free to reach out to MathWorks' TS to get more information on that.
It seems like the communication between MATLAB and Arduino was interrupted. I would recommend not moving the physical USB cable that connects Arduino to PC. Retry after putting the board into bootloader mode.
You can do this by double pressing the reset button. To confirm that the board is in bootloader mode, open Device Manager and check Ports, here you should see Arduino MKR1000 bootloader mode.
HTH,
Madhu
Please contact MathWorks' Technical Support at support@mathworks.com
Why is the USB cable required for WIRELESS connectivity?
I suspect that Bootloader mode is not exposed over WiFi. I suspect that the USB cable is needed to program the system -- after which USB could be disconnected.

Accedi per commentare.

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by