Borrar filtros
Borrar filtros

Unable to connect Lego EV3 to Matlab via USB in Matlab R2017B

1 visualización (últimos 30 días)
Bruce Abbott
Bruce Abbott el 5 de En. de 2018
Comentada: nathan guillou el 13 de Oct. de 2018
Matlab will not connect to my Lego EV3. I have two EV3 bricks, one with firmware 1.09H and the other with firmware 1.04H but fail to connect to Matlab with either. Latest versions (17.2.0) of Matlab and Simulink EV3 hardware support packages installed yesterday (in that order).
>> legoev3('usb') Error using legoev3 (line 308) Failed to connect to EV3 through USB. Please check your USB connection.
The USB connection is good since it operates the EV3 via the Lego Mindstorms (Labview) software. I also tried connecting via WiFi, which also works with the Mindstorms software, but not with Matlab. Suggestions?
  5 comentarios
Bruce Abbott
Bruce Abbott el 30 de En. de 2018
There were some firmware and software updates since my original query; I do not know whether they are what has made the difference, but I am now able to establish a connection via WiFi. However, the connection routine often fails and has to be repeated until it succeeds. To get this far I (1) downloaded the latest version of the ev3 firmware, 109E (education version), available from https://education.lego.com/en-us/support/mindstorms-ev3/firmware-update. I also deleted the Matlab ev3 hardware support package and then downloaded it again, as it appears that the version I had was no longer the latest one. When making the connection in Matlab, make sure that you clear the workspace first of any ev3 object from a previous successful connection. Also, having your ev3 connected via the Mindstorms software will prevent Matlab from connecting. Finally, you may have to reboot your computer and/or WiFi router before the Matlab connection will establish. Due to the unreliability of the command, I have created a one-line Matlab script that just issues that command. In my case it looks like this: myev3 = legoev3('WiFi','192.168.0.14','00165347e3d9') Just keep executing the script until it succeeds. I then make sure the script I wish to run does not clear the workspace so that the ev3 object (myev3) is not cleared, thus preserving the connection.
Bruce Abbott
Bruce Abbott el 1 de Feb. de 2018
After installing the Simulink hardware package for the Lego EV3, I was no longer able to establish a WiFi link to the EV3. Uninstalling the Simulink EV3 package restored my ability to establish a WiFi connection using the Matlab EV3 hardware package. Whoever is tasked with maintaining these hardware support packages for EV3 (assuming there is such a person) needs to update them to work with the most recent firmware updates to the EV3 (currently 109E and 109H). I have read that the firmware's access via Telnet has been modified or blocked due to a vulnerability to malware infection via Telnet access.

Iniciar sesión para comentar.

Respuestas (1)

Yu Li
Yu Li el 17 de Mzo. de 2018
I connect by combintion of ‘USB' and 'Wifi’ simultaneously,There is no other way to do. by the way my firmware 1.09E. wish for help your work.
  2 comentarios
Benjamin Cyr
Benjamin Cyr el 17 de Mzo. de 2018
I was able to solve my issue in connecting with USB. I was using a Third Party Sensor (the HiTechnic Angle Sensor) with an ID that was not registered in the LEGO EV3 Support package. As far I as I understand, when MATLAB tries to connect, it goes through the IDs of the sensors that are connected to the EV3. Since it didn't recognize the 3rd Party ID, it would not connect. It would then give the very unhelpful error: 'Unable to connect'. I'm not sure if there is a better way to do it, but I had to modify the support package to include the ID for the new sensor in order to get it to connect. Then everything worked fine.
nathan guillou
nathan guillou el 13 de Oct. de 2018
Hello, I am facing the same issue : I want to use the Hitechnic Angle sensor but it doesn't work. Could you describe more precisly how you solved the issue ? thank you

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by