python-udsoncan icon indicating copy to clipboard operation
python-udsoncan copied to clipboard

Improvement with processing J2534 Connection

Open kirya-dev opened this issue 1 year ago • 2 comments

Points of improvement:

  • Made Close device after Discconnect. Previously, cant reconnect to the device (ERR_DEVICE_IN_USE).
  • Avoid debug log after error log.
  • Raising abnormal exception around connection to the J2534 device.

kirya-dev avatar Oct 15 '24 22:10 kirya-dev

Thank you for this. I added 2 comments. Will merge as soon as I get your feedback and CI is green (will enable it for this PR soon)

pylessard avatar Oct 16 '24 00:10 pylessard

Right now my PC is out of order. Will check to make CI happy next week

pylessard avatar Oct 19 '24 20:10 pylessard

I dont know why. Devices like OpenPort and Pulsar are not receiving messages correctly when no set RxStatus & ExtraDataindex stub value 0xCCCC_CCCC.

kirya-dev avatar Nov 15 '24 20:11 kirya-dev

I can't help. I never used J2534 :(

pylessard avatar Nov 15 '24 20:11 pylessard

I think it is some legacy.

kirya-dev avatar Nov 15 '24 20:11 kirya-dev

Do you plan other modifications?

pylessard avatar Nov 15 '24 20:11 pylessard

Do you plan other modifications?

I work with this software every day on different devices and find different bugs 🐞. At the moment, the udsoncan library is working quite stable.

kirya-dev avatar Nov 16 '24 04:11 kirya-dev

Can you apply this patch to your PR? That will make static analysis happy. The CI machine up and running

ci.patch

pylessard avatar Nov 17 '24 01:11 pylessard

Hmm. Container ubuntu:20.04 not same win32 😁

kirya-dev avatar Nov 17 '24 08:11 kirya-dev

Definition of WindowsError in builtins.pyi

if sys.platform == "win32":
    WindowsError = OSError

I just replaced the exception type.

kirya-dev avatar Nov 17 '24 08:11 kirya-dev

Yeah. Will do a cleaner fix later. I think I can force mypy to assume windows through a mypy.ini

pylessard avatar Nov 17 '24 12:11 pylessard