connect(xcpch) not working
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I've been trying to record data from XCP hardware connected over ethernet to my laptop. I'm fairly sure I've I've got the right protocol, ip address and port, I've tripple checked using cmd netstat -a. When I use the function connect(xcpch) the XCP hardware reacts with a welcome message but then the following error is shown in matlab:
Error using asyncio.MessageHandler/onError (line 31)
An established connection was aborted by the software in your host machine
Error in asyncio.Stream/wait (line 183)
drawnow('limitrate');
Error in asyncio.InputStream/read (line 130)
status = obj.wait(@(obj) obj.getDataAvailable() > 0);
Error in
matlabshared.transportlib.internal.asyncIOTransportChannel.AsyncIOTransportChannel/readRaw
Error in
matlabshared.transportlib.internal.asyncIOTransportChannel.AsyncIOTransportChannel/read
Error in matlabshared.network.internal.TCPClient/read
Error in matlabshared.network.internal.TCPClient/receive
Error in tcpclient/read (line 243)
data = receive(obj.TCPClientObj, numValuesToRead, dataType);
Error in xcp.transportlayer.TCP/receive (line 64)
msg.Data = uint8(read(obj.Socket, lg, 'uint8'));
Error in xcp.Protocol/executeReceptionTimerCallback (line 700)
msgRx = obj.TransportLayerObject.receive(inf);
Error in xcp.Protocol>@(~,~)(obj.executeReceptionTimerCallback) (line 59)
@(~, ~)(obj.executeReceptionTimerCallback));
Error in internal.IntervalTimer/onCustomEvent (line 154)
notify(obj, 'Executing', internal.TimerInfo(eventData.ExecutionCount));
Error in
internal.IntervalTimer>@(source,data)obj.onCustomEvent(data.Type,data.Data)
(line 115)
@(source,data)
obj.onCustomEvent(data.Type,data.Data));
Error in asyncio.Channel/onCustomEvent (line 477)
notify(obj, 'Custom', asyncio.CustomEventInfo(type,data));
Error in asyncio.Channel>@(source,data)obj.onCustomEvent(data.Type,data.Data)
(line 409)
@(source, data)
obj.onCustomEvent(data.Type, data.Data));
Error in xcp.Protocol/transmitCommand (line 663)
pause(0.025);
Error in xcp.Protocol/transmitCommand (line 687)
response = obj.transmitCommand(cmdData, 3);
Error in xcp.Protocol/transmitCommand (line 682)
response = obj.transmitCommand(cmdData, 2);
Error in xcp.Protocol/connect (line 98)
response = obj.transmitCommand(cmdData);
Error in xcp.Channel/connect (line 190)
[~, resource, commModeBasic, maxCRO, maxDTO] =
obj.ProtocolObject.connect(xcp.Utility.NORMAL_MODE);
Error using xcp.Protocol/validateResponse (line 620)
Slave did not respond to command CONNECT.
Error in xcp.Protocol/connect (line 100)
obj.validateResponse(obj.CurrentCommand, response);
Error in xcp.Channel/connect (line 190)
[~, resource, commModeBasic, maxCRO, maxDTO] =
obj.ProtocolObject.connect(xcp.Utility.NORMAL_MODE);
My code is as follows:
% Access A2L file
a2l = xcpA2L('Batteriemodell.a2l');
% Create XCP channel
% From cmd netstat -a
protocol = 'TCP';
ip = '192.168.1.15';
port = 5001;
xcpch = xcpChannel(a2l,protocol,ip,port);
% Connect XCP channel to slave module
warning ('off','all');
connect(xcpch);
Does anyone have an idea why this error is occuring?
Thanks!
Lucas
0 Commenti
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!