Get an Error connecting LEGO Mindstorms EV3 via bluetooth with MATLAB but can connect with Simulink; How do I fix this?

The Matlab syntax is
myev3 = legoev3('bluetooth','COM6');
The error generated by the compiler is
Error using legoev3 (line 199)
Failed to connect to EV3 through Bluetooth. Please check your Bluetooth connection.
I have checked the properties of the bluetooth; serial connection is OK.

Answers (1)

Hi Estelle,
The main reason for this error is an incompatibility between the bluetooth stacks on the host machine and the LEGO EV3 brick. Kindly refer to the following MATLAB Answers post for resolution steps along with some other possible error causes:

Categories

Find more on MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware in Help Center and File Exchange

Products

Release

R2024b

Tags

Asked:

on 7 Nov 2024

Answered:

on 7 Nov 2024

Community Treasure Hunt

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

Start Hunting!