I can't get my lego ev3 brick connected to simulink, nor via wifi neither via usb

5 views (last 30 days)
Hello all,
I'm trying since weeks to get my ev3 brick connected with simulink. No chance!
I have already set the host to target connection type to USB and also i have bought the suggested wifi dongle from Netgear WNA1100.
All in all i have followed really carefully the instructions in this video:
Even I tried to setup the system on the matlab 2014a version. But some third party apps were no longer downloadable.
My Brick has got the Firmware no 1.08H.
I need some ones help becaus i need to the stuff running for my studies.
I know that this topic has been mentioned quite a lot of times, but none of suggestions worked.
I also have deactivated the antivirus and the firewall software.
What I don't understand is that when i ping the brick through matlab I get a positive response. And the usb connection is also recocnized by matlab.
With the original lego software (Mindstorms) there isn't any problem with the connection nor with wifi neither with usb.
>> myev3 =legoev3
myev3 =
legoev3 with properties:
FirmwareVersion: 'V1.08H'
HardwareID: []
IPAddress: []
CommunicationType: 'USB'
BatteryLevel: 100
ConnectedSensors: {'' '' '' ''}
>> !ping 192.168.178.90
Ping wird ausgeführt für 192.168.178.90 mit 32 Bytes Daten:
Antwort von 192.168.178.90: Bytes=32 Zeit=122ms TTL=64
Antwort von 192.168.178.90: Bytes=32 Zeit=5ms TTL=64
Antwort von 192.168.178.90: Bytes=32 Zeit=6ms TTL=64
Antwort von 192.168.178.90: Bytes=32 Zeit=3ms TTL=64
Ping-Statistik für 192.168.178.90:
Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0
(0% Verlust),
Ca. Zeitangaben in Millisek.:
Minimum = 3ms, Maximum = 122ms, Mittelwert = 34ms

Answers (1)

akshatsood
akshatsood on 29 Aug 2023
Edited: akshatsood on 15 Nov 2023
Hi Rami,
I understand that you are facing issues in connecting LEGO EV3 brick to Simulink via Wi-Fi or USB. MATLAB software communicates with the EV3 brick either through UBS or Wireless Network through a EV3 compatible USB Wi-Fi dongle which is NETGEAR WNA1100 as stated by you. The required EV3 firmware version is V1.03 or later which seems suitable for this case. Additionally, the required support packages need to be installed to execute algorithms. You can install the support packages from the EV3 Support Package. Once you have installed, you can enter the below command in the MATLAB command window to verify the installation
>> matlabshared.supportpkg.getInstalled
Name Version Base Product
------------------- ------- --------------
LEGO MINDSTORMS EV3 14.2.0 MATLAB
Further, I would recommend going through Set up EV3 Hardware page so that you are following the correct procedure for connection via USB or Wi-Fi. Once you are sure about the steps, you can test the network connection by executing the following command in the MATLAB Command Window
>> myev3 = legoev3('<EV3 IP address>')
In case the EV3 power was off, any legoev3 and sensor objects in the MATLAB Workspace are no longer valid. Clear those objects from the MATLAB Workspace using clear all command.
Additionally, you can try out the following workarounds if the issue persists
  • Ensure proper Wi-Fi setup: Make sure that your LEGO EV3 brick is connected to the same Wi-Fi network as your computer running Simulink or MATLAB. Check the Wi-Fi settings on the EV3 brick to ensure it is connected to the correct network.
  • Verify IP address: Confirm that the IP address assigned to the EV3 brick is correct. You can find the IP address on the brick itself or by navigating through the brick's menu options. Ensure that the IP address matches the one specified in Simulink or MATLAB for Wi-Fi connection.
  • Reinstall software: If none of the above steps work, you may need to reinstall the LEGO EV3 software, Simulink, or MATLAB. There could be an issue with the software installations that is causing the Wi-Fi connectivity problem.
Have a look at the below references for better understanding
I hope this helps.

Categories

Find more on LEGO MINDSTORMS EV3 Hardware in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!