MATLAB Answers

Why do I get an "failed to connect error" when trying to connect my Lego Mindstorms EV3 robot with Simulink?

62 views (last 30 days)
MathWorks Support Team
MathWorks Support Team on 15 Feb 2016
Commented: S M on 14 Mar 2020 at 17:46
When trying to deploy my Simulink model to my Lego Mindstorms EV3 robot I get the following error message:
The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
Failed to connect to EV3 (192.168.179.21). Please check your network settings.
The build process will terminate as a result.
Caused by:
Failed to connect to EV3 (XXX.XXX.XXX.XX). Please check your network settings.
Component: Simulink | Category: Model error
Where XXX.XXX.XXX.XX is the IP of my EV3. The behavior started only recently. Connecting to the brick in MATLAB works fine. The firmware version is V1.09H.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 24 Feb 2020
Edited: MathWorks Support Team on 24 Feb 2020
In the firmware version V1.09H, SSH and telnet are blocked by Lego. The interface Simulink uses to connect to the brick relies on these two types of connections while the interface used in MATLAB does not.
In order to be able to connect to the brick, use an older Firmware version, for example 1.03. Please contact Lego support on how you can access older versions of firmware:
Note that the firmware versions 1.06, 1.07 and 1.08 are also known to work with the Simulink support package for LEGO MINDSTORMS EV3 without any known issues. However the support package is tested thoroughly only with 1.03 version of the firmware.
Previous firmware releases can be difficult to obtain, so a fix has been released to allow compatibility with firmware version V1.09D. Note that ethernet connection is not supported for this version.

  7 Comments

Show 4 older comments
Sam Cook
Sam Cook on 24 Feb 2020
Recent MATLAB updates have also provided a fix to work with firmware version V1.09D - the answer has been updated to reflect this.
Note that ethernet connection is not supported for this firmware version.

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags

No tags entered yet.

Products


Release

No release entered yet.