Forums » Req. WJ2(ESP32) support »
External Mode Issue
Added by Rodrigo Botelho over 2 years ago
Hi,
I'm trying to run the demo file for external simulation using WiFi on the last release of Waijung 2, but I'm getting an error from Simulink whenever I set the Waijung2 Target Setup Block to external mode.
The error shows right after I select the External Mode from the dropdown menu in Waijung2 tab.
Unable to start the target application, C:\MATLAB\waijung2\demos\external, because its file extension cannot be determined. Build your target application by using a toolchain or a template makefile that specifies a toolchain via the TOOLCHAIN_NAME macro. The file extension will then be determined automatically from the linker's executable file extension property.
How to fix it?
Regards,
Rodrigo
Replies (10)
RE: External Mode Issue - Added by Chandima Jayaneththi (จันทิมา) over 2 years ago
Hello Rodrigo,
Thank you for using Waijung2.
Could you please attach the Simulink model file that gives you this error. In addition to that please mention the Matlab version which you are using.
Thank you
Best regards,
Chandima.
RE: External Mode Issue - Added by Rodrigo Botelho over 2 years ago
Hi Chandima,
I'm using R2021a. The simulink file I've downloaded from the Waijung2 Guide.
Regards,
Rodrigo
RE: External Mode Issue - Added by Chandima Jayaneththi (จันทิมา) over 2 years ago
Hello Rodrigo,
We will look into your issue and get back to you soon. Thank you.
Best regards,
Chandima.
RE: External Mode Issue - Added by Suphichaya Youngsubtargul (โอปอ) over 2 years ago
RE: External Mode Issue - Added by Rodrigo Botelho over 2 years ago
Hi,
I have tested it with R2021b and it works. However, it doesn't work for r2021a. It's not a problem, ideally, I would use either R2021b or R2022a.
I could also test the external mode. It works when using ESP32 as AP, but it's not working when I set it as Station.
One thing I noticed was that the "Connect" button in "Step by Step" commands is not enabled after "Build for Monitoring".
Should I open another thread?
Thanks,
Rodrigo
RE: External Mode Issue - Added by Chandima Jayaneththi (จันทิมา) over 2 years ago
Hello Rodrigo,
You can use this thread for the remaining issues with external mode.
I have tested it with R2021b and it works. However, it doesn't work for r2021a.
Could you please provide more information about this issue.
It works when using ESP32 as AP, but it's not working when I set it as Station.
When you change from AP to STA, ESP32 doesn't work as an Access Point anymore. For the STA mode you need to have a WiFi router. Change the parameters (WiFi SSID, WiFi password, Gateway and Netmask) in the ' Host-board connection ' tab in Waijung 2 Target Setup block according to the WiFi router. Once the Simulink model file is built connect the host computer to the router via WiFi. Then click the connect button in the External mode control panel.
Regards,
Chandima.
RE: External Mode Issue - Added by Rodrigo Botelho over 2 years ago
Hi Chandima,
The first issue is solved. I'm able to run in R2021a after restarting my computer.
The second issue is not solved, yet. I'm not sure if it's Waijung2, my ESP32 board or my local network.
I have attached the output of my Serial Monitor.
Any thoughts?
Thanks,
Rodrigo
RE: External Mode Issue - Added by Chandima Jayaneththi (จันทิมา) over 2 years ago
Hello Rodrigo,
According to the ESP32 log data above, it connects to the router successfully and it is waiting for the Host computer to send some commands to start the External mode. Could you please check the connection between the Host computer and the router or is there something to do with the firewall settings?
Regards,
Chandima.
RE: External Mode Issue - Added by Rodrigo Botelho over 2 years ago
Hi Chandima,
Back to the start again. It does not show up in my router. I tried going back to AP mode. I can connect to the ESP32 created network, but the "connect" button is disabled. Tried on r2021a and r2021b.
Not sure what's going on. Meanwhile, is the Simulink Data Inspector compatible? Can I monitor the signals?
Regards,
Rodrigo
RE: External Mode Issue - Added by Chandima Jayaneththi (จันทิมา) over 2 years ago
Hello Rodrigo,
I can connect to the ESP32 created network, but the "connect" button is disabled
There is an alternative method to connect the host computer to the ESP32. To do that,
- Once the build and compile process is finished, open the Control Panel in Hardware tab
- Click the Connect button on the Control Panel
I hope that this will fix your problem.
Regards,
Chandima.