Code Monkey home page Code Monkey logo

Comments (2)

jacobschaer avatar jacobschaer commented on May 22, 2024

That should be fine - the default constructor doesn't even bind() as client_ip_address is None. And even when you do specify a source IP address to choose the correct NIC we pass in 0 for the port to bind() which should tell the OS to choose any available source port in the ephemeral range. For UDP we use SO_REUSEADDR which may cause what you're seeing though you can just re-use the original client for things like discovery - you only need a new client for handling the TCP state.

from python-doipclient.

ckurtz22 avatar ckurtz22 commented on May 22, 2024

I ended up resolving my issue by making a custom connector class for udsoncan where I could instantiate one connector for each ECU I wanted to communicate with and had the connector basically modify the specific_send() function to send that ECU's logical address. Then each connector used the same doipclient instance to communicate with the ECU through the gateway.

Not entirely certain what you are describing, but to describe the issue I had in more detail each instance of doipclient opened a new socket connection to the vehicle's gateway (which happens regardless of whether bind() is called). The gateway at least on the Polestar 2 would stop accepting TCP comms over the first socket after a second socket was connected.

I'm relatively noobish with networking stuff still, but my solution worked fine so I think I'll go ahead and close this now.

from python-doipclient.

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.