jacobschaer / python-doipclient

Pure Python ISO 13400 Client
MIT License
151 stars 50 forks source link

DHCP case add to this package #12

Closed Hisen01 closed 2 years ago

Hisen01 commented 2 years ago

The CGW is DHCP, everytime the tester need to offer a IP to the vehicle,could add DHCP function or class in this package.

jacobschaer commented 2 years ago

I don't understand the problem. If your vehicle/ECU has a DHCP server, then just let the OS handle it. The tester (this library) itself shouldn't be a DHCP server. If you're talking to an ECU in an isolated context where it's expecting a DHCP server, simply install a DHCP server on your host OS.

I don't recall anything particularly unique to DoIP spec about DHCP. As I recall, there's a preference for the autoconfiguration addresses in ipv6, and I would imagine most ipv4 vehicles would use static addressing to avoid the nondeterministic behavior of discovery at startup.

Hisen01 commented 2 years ago

Thanks for your answer,because our CGW is only DHCP client, everytime OBD connected, CGW send DHCP discover, need tester provide IP(DHCP OFFER). I can use another DHCP server to finish the connect and get the IP.

and I happen to another question, which is from the example, its the SomeLib when I installed but not worked. I check the site-packages, only find the file <somelib-0.0.1.dist-info>, so I cant use the somelib module, could you share me the packages, and my emai: Hisen0304@163.com.

thanks again!

Hisen01 commented 2 years ago

Hello,

the DHCP question could be history, because I have any other solution, but now I use your Doipclient package with some issues as follow:

when I try to use the example below, the first command use somelib module, I use 'pip install somelib' to install it, shows success but can`t use, shows as below: I find the sit-packages folder, and found that only with dist-info folder. the function module is missing.

I searched in the github, only one python module as below, i am not sure it is the right one,

so, if possible to share me your somelib package, and i manually to conig to PC.

Best Regards. Hisen

At 2022-02-18 15:10:38, "Jacob Schaer" @.***> wrote:

I don't understand the problem. If your vehicle/ECU has a DHCP server, then just let the OS handle it. The tester (this library) itself shouldn't be a DHCP server. If you're talking to an ECU in an isolated context where it's expecting a DHCP server, simply install a DHCP server on your host OS.

I don't recall anything particularly unique to DoIP spec about DHCP. As I recall, there's a preference for the autoconfiguration addresses in ipv6, and I would imagine most ipv4 vehicles would use static addressing to avoid the nondeterministic behavior of discovery at startup.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

jacobschaer commented 2 years ago

The SomeLib is just an example, the expectation is that you'll provide your own class. It doesn't exist on PyPi. The example came from the udsoncan docs.

Hisen01 commented 2 years ago

Get it ,thanks