Why do I get XCP internal error: timeout expired?

Hi,
I have tried to follow this example, but using a Cube Orange instead, which I set up using this guide except on Ubuntu instead of Windows.
But somewhere I messed something up. When I try to run "monitor & tune" on the board, I get the following error:
0 of 1 models built (1 models already up to date)
Build duration: 0h 1m 15.535s
action: EXT_INIT
Creating Target Handler (XCP on Serial)...
Build directory: /home/soren/heavy_duty/matlab/untitled_ert_rtw
Serial Port Name: /dev/ttyUSB0
Baud Rate: 57600
action: EXT_CONNECT
Connecting to the target...
External Mode Open Protocol Connect command failed
Caused by:
Could not connect to target application: XCP internal error: timeout expired, in response to XCP CONNECT command
I have determined it seems like the problem is with the communication between Cube Orange using Telem 1 on the Pixhawk (where I have the FTDI serial converter in). I have tried using different baud rates but can't determine what exactly is the problem with the connection.

댓글 수: 2

@Søren Let me know if you were able to solve this issue ?
@Arun Mathamkode I have tried all the solutions you have mentioed in the comments
but i am still getting the same error as mentioned in this post.
Søren
Søren 2023년 8월 11일
Unfortunately I never managed to solve it. I had other task to do, didn't spend a lot more time on the issue

댓글을 달려면 로그인하십시오.

답변 (1개)

Arun Mathamkode
Arun Mathamkode 2023년 1월 2일
편집: Arun Mathamkode 2023년 1월 3일

0 개 추천

TELEM1 serial port are fundamentally designed for MAVLink communication and by default MAVLink is enabled in this port. You can consider trying to connect using GPS2 port (/dev/ttyS5). Makesure that parameters GPS_1_CONFIG or GPS_2_CONFIG is not set to enable GPS2 as a GPS port.

댓글 수: 7

I tried to disable the MAVLink communication on TELEM1, to see if that works. But I can try to test it on GPS2 port instead.
@Arun Mathamkode I have tried connecting to GPS2 port instead, but I still get the exact same error as before.
You can consider setting baud rate as 115200, instead of the default value. Also ensure that the FTDI host COM port value is correctly entered in the External mode tab in Simulink Configuration Parameter window.
@Søren Have you found a solution? I'm facing the exact same problem
@Arun Mathamkode I've tried all the solution you have written in the post but I have the same error.
I'm using win 10 and Pixhawk 6x with matlab 2023b
I also have samm error.
I used XCP on TEL1 of Cube Orage. It means device name as /dev/ttyS0 on Cube hardware.
But, There's no serial port name on host side in linux. I guess it must be /dev//ttyUSB0 in linux(COMx in windows). However, It doesn't work.
Definately, I made sure that the MAV_CONFIG0 parameset is not set.
Can anyone solve this error??
@Arun Mathamkode Do you have any clue why this error keep show?

댓글을 달려면 로그인하십시오.

제품

릴리스

R2022b

질문:

2022년 12월 28일

댓글:

2025년 4월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by