Error occurred while executing External Mode MEX-file 'ext_comm': Timed-out waiting for second connect response packet.
Show older comments
I use the ttyACM0 ( COM3 port in my PC) to enable MAVLink and ttyS2( TELEM2 in PX4 and COM4 in my PC) for the external mode. The Following image is my model configuration setup :


I was able to build the firmware successfully. However, when I run the external mode, it got a error and said the following ( compied from diagnostic windows) :
Program: [================== ] 90.6%
Program: [=================== ] 97.0%
Program: [====================] 100.0%
Verify : [ ] 1.0%
Verify : [====================] 100.0%
Rebooting.
### Successful completion of build procedure for model: px4_control_system_ver4
Build process completed successfully
host endian mode: Little
Component:Simulink | Category:Model
byte swapping required: false
Component:Simulink | Category:Model
action: EXT_CONNECT
Component:Simulink | Category:Model
Error occurred while executing External Mode MEX-file 'ext_comm': Timed-out waiting for second connect response packet.
Component:Simulink | Category:Block diagram error
Component:Simulink | Category:Model error
Can somebody help me to fix the problem.....plz
2 Comments
Mohammed Mohiuddin
on 4 Nov 2020
Facing a similar problem
Mansi Bakori
on 5 Mar 2021
I am facing the similar issue
Answers (2)
Subhadra Mahanti
on 4 Sep 2019
0 votes
Have you checked the baud rate? Make sure that it is in line with the external mode baud rate (921600).
3 Comments
Yu-Ru chien
on 5 Sep 2019
Osman Hökerek
on 19 Dec 2019
Hello Mahanti,
I encountered this issue with Pixhawk 2.1 Cube. Can you resolve this problem ?
df zhang
on 29 Sep 2021
do you resolve this problem in the end?
경민 박
on 22 Jul 2022
0 votes
I had same problem, and this is how I solved it.
In my case, I created new empty folder, and then in MATLAB I moved my Current Folder to that new empty folder.
Then it worked.
Categories
Find more on PX4 Autopilots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!