GithubHelp home page GithubHelp logo

Comments (12)

George117 avatar George117 commented on September 26, 2024

Hi @Z-ZWBY, for the IP issue: have you tried updating this line:

  • C:
    #define OPTION_SERVER_ADDR {0,0,0,0} // Default IP addr, 0.0.0.0 = ANY, 255.255.255.255 = first adapter found, overwritten by commandline option -bind x.x.x.x
  • CPP :
    #define OPTION_SERVER_ADDR {0,0,0,0} // Default IP addr, 0.0.0.0 = ANY, 255.255.255.255 = first adapter found, overwritten by commandline option -bind x.x.x.x

Or, start with XCPLite with option "-bind x.x.x.x" -> no effect on your issue , can ignore

At least for me, it works as expected.

from xcplite.

Z-ZWBY avatar Z-ZWBY commented on September 26, 2024

Hi@George117
Thanks for your replying. if you do not define the 'OPTION_SERVER_ADDR', the A2L.C can get your local ethernet IP and write in the A2L.V4 has this function ,i run the v4 , but there are problems with V5

from xcplite.

George117 avatar George117 commented on September 26, 2024

I see your point:
In A2lCreate_IF_DATA() there is indeed this functionality implemented: socketGetLocalAddr()

XCPlite/src/A2L.c

Lines 298 to 305 in 334206e

// Transport Layer info ipaddr, port, protocol, version
uint8_t addr0[] = { 127,0,0,1 }; // Use localhost if no other option
if (addr != NULL && addr[0] != 0) {
memcpy(addr0, addr, 4);
}
else {
socketGetLocalAddr(NULL, addr0);
}

I'll give it a go on my system and see how it looks.

from xcplite.

Z-ZWBY avatar Z-ZWBY commented on September 26, 2024

@George117
Hello George
Yeah, you find it, i do not see details about it.
About the V5 , do you have the issue 'The determination of the XCP 1.3 DAQ start time failed error' when using Canape to start measurement?
I run the latest V5 rightnow(GET_DAQ_CLOCK_MULTICAST bugfix), there is still issue here,how do you deal with it? Setting Canape or disabling the multicast? Disabling the multicast is not useful and i can not find the Canape setting.

from xcplite.

George117 avatar George117 commented on September 26, 2024

Unfortunately I dont use the MULTICAST in my implementation, so I cannot speak to it.

from xcplite.

Z-ZWBY avatar Z-ZWBY commented on September 26, 2024

@George117
How do you close the MULTICAST.
I disabled the 'XCPTL_MULTICAST' in the 'xcptl_cfg.h' and 'XCP_ENABLE_DAQ_CLOCK_MULTICAST' in the 'xcp_cfg.h',do you have the same way?

from xcplite.

George117 avatar George117 commented on September 26, 2024

Yeah, exactly the same way:
image
image

from xcplite.

George117 avatar George117 commented on September 26, 2024

I see your point: In A2lCreate_IF_DATA() there is indeed this functionality implemented: socketGetLocalAddr()

XCPlite/src/A2L.c

Lines 298 to 305 in 334206e

// Transport Layer info ipaddr, port, protocol, version
uint8_t addr0[] = { 127,0,0,1 }; // Use localhost if no other option
if (addr != NULL && addr[0] != 0) {
memcpy(addr0, addr, 4);
}
else {
socketGetLocalAddr(NULL, addr0);
}

I'll give it a go on my system and see how it looks.

So, I;ve replicated your issue. It seems to be a bug in the implementation. (To be confirmed Confirmed here)

image

Either define XCP_ENABLE_DEBUG_PRINTS (dirty bugfix)

or move that copy operation out of the define scope:

XCPlite/src/platform.c

Lines 502 to 505 in 334206e

if (addr1[0] == 0 ) {
memcpy(addr1, (uint8_t*)&a, 4);
memcpy(mac1, pAdapter->Address, 6);
}

@RainerZ @Z-ZWBY I'm not sure if this is the correct fix but it seems to fix the issue reported (as far as I understood it)

from xcplite.

Z-ZWBY avatar Z-ZWBY commented on September 26, 2024

@George117 Thanks for your work.
I think you don't use the Canape as the XCP master,is it right?

from xcplite.

George117 avatar George117 commented on September 26, 2024

Morning @Z-ZWBY , you are right, I'm not using Canape.

from xcplite.

RainerZ avatar RainerZ commented on September 26, 2024

Hello,

I can confirm this is a bug.
I will simply remove the ifdef

Thanks
Regards

from xcplite.

George117 avatar George117 commented on September 26, 2024

Morning @RainerZ ,
Thanks for the confirmation!

from xcplite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.