Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example discovery vehicles on network #48

Open
Alexpux opened this issue Nov 16, 2024 · 4 comments
Open

Example discovery vehicles on network #48

Alexpux opened this issue Nov 16, 2024 · 4 comments

Comments

@Alexpux
Copy link

Alexpux commented Nov 16, 2024

Repository contain example2, that described as discovering vehicles in network and connect ot them. Currently it not have any such code. Is it possible to implement it?
Also is it possible to use this library in scenario with dynamic resolve IP address of tester and vehicle?

  1. Computer have several network cards.
  2. Vehicles can be connected to one or more network cards, so first you dont know IP address of tester.
  3. Library try discover vhicles on all network cards and return list of founded vehicles with IP addresses of vehicle and tester interface.
  4. Create diag tester on selected vehicle with founded IP addresses.

Regards,
Alexey.

@Iandiehard
Copy link
Owner

Hello @Alexpux ,

The code in /example2 works but commented out, you can also have a look at another test case https://github.com/Iandiehard/diag-client-lib/blob/main/test/test_case/vehicle_discovery_test.cpp to get an idea.

  1. diag-client-lib (acts as diag tester) is capable of performing service discovery in the whole vehicle and returns a list of available diagnostic server.

  2. diag-client-lib can then be used to perform diagnostic on any of the selected Ip address out of the list provided.

  3. diag-client-lib needs a static ip address that is used as local ip address for broadcasting the vehicle identification request.

I could not understand the use-case of dynamic ip address on the diag tester side. Can you elaborate it more?

Thanks!
Avijit

@Alexpux
Copy link
Author

Alexpux commented Dec 23, 2024

@Iandiehard thanks for the answer.
Forget about dynamic IP. Seems I need to loop all PC interfaces and send broadcast message to find out interface connected to vehicle. Normally Windows not send broadcast messages to all interfaces when use "255.255.255.255" broadcast address.

I have some ideas for library impovement:

  1. Send Vehicle Identification request with FF protocol version and when you get response then use received protocol version for this vehicle. On real vehicle if you send protocol version that not the same as vehicle use you will not get answer.
  2. Implement automatic Alive Check response on request from vehicle.

Regards,
Alexey.

@Iandiehard
Copy link
Owner

@Alexpux , Thanks for the improvement suggestion

  1. I saw you have opened Windows fixes, boost deprecations, FF protocol for VIR #49 to support Default doip protocol version in VIN request. Are you also going to the implement the handling of received protocol version and accordingly use it for further doip request. If not then please create a new issue.

  2. I have added an issue [Alive Check] : Add support of handling alive check request from Doip Entity #51 to implement alive check in diag-client-lib.

Happy Holidays!
Avijit

@Alexpux
Copy link
Author

Alexpux commented Dec 25, 2024

@Iandiehard I'm push changes needed for get and set protocol version for messaging. So you can now get protocol version from vehicle response struct and set to conversation to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants