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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-doipclient as transport layer to python-uds #2

Closed
ha-solutions opened this issue May 20, 2021 · 12 comments
Closed

python-doipclient as transport layer to python-uds #2

ha-solutions opened this issue May 20, 2021 · 12 comments

Comments

@ha-solutions
Copy link

Hi,

Would you be interested in creating a fork to interface to python-uds?
https://python-uds.readthedocs.io/en/latest/index.html

I've had a look myself, but I can't figure it out馃槖

I have tried your library on a Volvo SPA product, and it works a treat using python-udsoncan. Just had to change the tester address to 0x0E80

Main reason is that python-uds supports ODX for module definitions and therefore everything can be defined in ODX including service response codes etc.

Andy

@pylessard
Copy link

Hi @ha-solutions : What features exactly are you using from the ODX format?

@ha-solutions
Copy link
Author

Hi Pylessard,

I created an application a while back using your library, and defined dictionaries for all modules/nodes on a test vehicle. Only for a minimal amount of DID's & some IO Control. Found it difficult transferring the source data from the proprietary XML format I had at the time especially around IO masks. It worked great but I eventually gave up on this application due to issues with Kivy Fronted & Twisted framework. (Basically, ran out of knowledge)

At the time I wrote my own DoIP transport for your library, but I was missing the UDP for vehicle announcement. This library fixed issues with my own implementation so sparked interest again! Now looking to revisit but using pyqt for the front end.

Available source data was like ODX in that everything was supplied in the data such as DTC descriptions, positive/negative responses to each defined service and decoding of DID's. (ssdb file)

I have been informed now that this data could be supplied in ODX-D format. My thoughts were that this would then remove the need to define decoding etc within the application and would be a simpler way of importing diagnostic information without any further modification and make everything purely data driven. Accessing available diagnostics would then be via simple human readable text.

Idea is to load a file and present to the user all available diagnostics within the ODX. User then selects the ECU and Service and clicks send and the response would then be decoded using ODX and displayed in the correct format.

Andy

@pylessard
Copy link

Thank you,
If I understand correctly, you want to define your DIDs and list what service is available in your device. You can open an issue on my library if you want, but I will need technical details about the wanted features.

Good day.

@ha-solutions
Copy link
Author

That鈥檚 correct.
I鈥檒l look at opening an issue on your library. I can provide further
detail and example data but would need to do this privately as it should
not be in the public domain.

@pylessard
Copy link

Sure, open the issue and will provide a mean for PM.
Also, I'd like to point out that UDS is not only data driven. When using ODX, you need an aditional layer of software over it to be able to do things correctly. Best example is the security algorithm.

I like putting the data and the code together in a Python module where code and structure are treated the same.

Regards

@jacobschaer
Copy link
Owner

I had looked at adding a plugin for the library you linked to. It wasn't immediately obvious at the time where the best place to inject my code was, so didn't bother. I don't have a ton of time but can take a look when more comes available.

It would be cool if we could package ODX support into udsoncan, but I understand it's not a great format to deal with. I don't remember seeing any great libraries when I looked a while ago.

@ha-solutions
Copy link
Author

I created my own DoIP plugin like yours for udsoncan although was missing UDP announcement. Your code is much more complete. I also could not figure out how to integrate with python-uds.

I will open an issue to see if we can get a level of ODX support into udsoncan. ODX has many layers, ODX-D, ODX-C, ODX-F etc and I agree it's not a great format but seems to be the way OEM's are now distributing diagnostic data. It's my understanding that ODX-F contains binaries, secure access algorithms and java flash jobs to perform ECU flashing.

As pylessard says additional software layers need to exist to be able to do things correctly.

@jacobschaer
Copy link
Owner

@ha-solutions

Are you able to verify my changes to python-uds? I forked and made some changes on the doip branch:
https://github.com/jacobschaer/python-uds/tree/doip

Seemed OK for ECU reset/TP. If it's all in-order I'll PR with the upstream.

@ha-solutions
Copy link
Author

Hi, yes sure I can test on a physical vehicle for you. Any chance you could send me a quick example of how to set up the connection.

a = Uds(reqId=0x7E0, resId=0x7E8, interface="peak", device="PCAN_USBBUS1")
What exactly do I change interface & device parameters to?

@ha-solutions
Copy link
Author

Hi Jacob,

I have used the example from - "Example 5 - Simpole DOIP Using Media Converter"

Getting the following:
Could not import vxlapi: Could not find module 'vxlapi64' (or one of its dependencies). Try using the full path with constructor syntax.

Andy

@ha-solutions
Copy link
Author

Hi,

Works perfectly, UDP vehicle announcement to get IP and VIN, then send repeated tester present, and a few DID reads all working on physical vehicle.

Andy

@jacobschaer
Copy link
Owner

Author of python-uds library is not responsive. Updated documentation on how to use fork.

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

3 participants