Commit Graph

65 Commits

Author SHA1 Message Date
Shane Smiskol
7933635b54 IsoTpMessage: rx_len sanity checks (#1311)
* add some more sanity checks for _isotp_rx_next

* another PR

* Update python/uds.py

* cannot be bigger than 0xfff
2023-03-30 23:23:42 -07:00
Shane Smiskol
23563cec7c IsoTpMessage: check not reserved frame (#1313)
* add some more sanity checks for _isotp_rx_next

* another PR

* rever

* can remove return

* add back the space here tho :(

* raise
2023-03-30 22:35:02 -07:00
Shane Smiskol
9349337ebb IsoTpMessage: check CAN frame length (#1312)
* add some more sanity checks for _isotp_rx_next

* another PR

* revert
2023-03-30 22:14:35 -07:00
Shane Smiskol
3334dc21f5 IsoTpMessage: parameterize separation time (#1088)
* parameterize separation time

* take in seconds and convert

* fix

* define once
2022-10-05 16:35:28 -07:00
Shane Smiskol
cffc41e878 Specify IsoTpMessage keywords 2022-10-05 16:22:53 -07:00
Shane Smiskol
7d196264a4 IsoTpMessage: param for single frame flow control (#1079)
* iso-tp: request a single frame at a time

* behind param

* this might be more clear

* like this better

* fit the theme

* revert this change
2022-10-05 16:12:24 -07:00
Shane Smiskol
1910db8d4c IsoTpMessage.send: setup_only argument (#1081)
* some fixes

* some fixes

* revert to tx not done

* this should work

* correct debug prints

* not true

* revert this

* setup_only
2022-09-30 14:29:41 -07:00
Shane Smiskol
51f023bc66 IsoTpMessage: return if message updated (#1078)
* extend timeout for each message/frame (not multi-frame full response)

* linter
2022-09-27 18:08:09 -07:00
Shane Smiskol
11ea112258 IsoTpMessage: add separation time to flow control msg (#1074)
* one frame at a time, 20 ms delay

* send one at a time

* update separation time to 10ms

* comment
2022-09-19 20:47:12 -07:00
Greg Hogan
ab693a22d5 UDS DTC number and status helpers 2022-04-04 17:55:11 -07:00
Greg Hogan
288cbf65d1 uds: update security access and i/o control services (#738) 2021-10-10 00:45:59 -07:00
Greg Hogan
2570770f7b UDS: add response pending timeout (#723)
* Extend ISO-TP subsequent frame timeout, add response pending timeout and extra debug info

* Change response_pending to local variable, move response_pending_timeout to UdsClient, update ISO-TP debug output

* Set UDS request pending timeout to 6 seconds (ISO 14229-2:2013 section 7.2 recommended value + 1 second latency)

* manage response pending in single location

* more generous response pending timeout

* add tx timeout

* fix lint error

* fix rx addr for 29 bit addrs

* fix linting issue

Co-authored-by: Martin Lillepuu <martin@mlp.ee>
2021-09-23 18:21:21 -07:00
Willem Melching
a65c45d5e7 uds.py: fix typo in response description 2021-04-17 22:11:30 +02:00
Jason Young
3bb0408ee6 Add support for variable UDS RX offsets (#631) 2021-03-07 20:33:55 -08:00
Adeeb Shihadeh
6848c7576b use same flake8 config as openpilot 2020-06-03 16:22:30 -07:00
Willem Melching
e0a706e4f0 Stricter pylint (#550)
* stricter pylint

* Add as argument
2020-06-02 16:27:07 -07:00
Adeeb
d7f7b14118 Enable almost all Flake8 checks (#548)
* fix W391

* E262

* E703

* W293

* some E

* E231

* some more E

* E225

* more E

* E252

* no tabs

* more tabs

* E701

* uds.py

* almost all of them

* only e265 left

* not sure why this is triggering on commented out code

* ignore esptool
2020-06-01 01:49:26 -07:00
Adeeb Shihadeh
f70ef291f9 whitespace fix 2020-05-31 17:49:37 -07:00
Adeeb Shihadeh
9102c16118 two spaces before inline comment 2020-05-31 14:07:01 -07:00
Willem Melching
b8267341a1 Add pre commit checks + CI (#545)
* Add pre commit checks

* untested but should work

* fix typo in dockerfile

* add sqlite

* add pylintrc to ignore usb1 members

* Typo in stage name

* Move to requirements
2020-05-29 11:52:03 -07:00
Willem Melching
a618e64d1a fix typing errors 2020-05-28 14:06:13 -07:00
Willem Melching
5307bf7277 Fix multi message iso tp requests 2020-05-18 19:48:47 -07:00
Greg Hogan
73a60d5c9c uds: clear rx buffer on drain 2020-02-05 23:34:00 -08:00
Greg Hogan
3b20804b6f uds: rx message buffering 2020-02-05 23:25:34 -08:00
Willem Melching
ded4b3f743 UDS: handle remote addressing 2019-12-16 15:54:30 -08:00
Greg Hogan
02d579a537 functional addr handling 2019-11-17 09:30:06 -08:00
Greg Hogan
8138fc14c8 uds: handle function addrs and fw version query example 2019-11-16 18:54:28 -08:00
Greg Hogan
b9b79e8b77 uds zero second timeout 2019-11-15 13:52:25 -08:00
Greg Hogan
f239b996db single addr was better 2019-11-14 13:34:25 -08:00
Greg Hogan
b3e1a133ae uds: better debug prints 2019-11-12 22:22:49 -08:00
Greg Hogan
68c39fb3e2 uds: no need for threads if you always drain rx 2019-11-12 18:52:41 -08:00
Greg Hogan
ff86db6553 improve uds message processing 2019-11-06 13:50:32 -08:00
Greg Hogan
501db8d199 uds drain before send and use has_obd() 2019-11-05 18:40:21 -08:00
Greg Hogan
55957d6e4e proper python3 exception inheritance 2019-10-16 00:15:16 -07:00
Greg Hogan
6ba0f47b56 fix linter errors 2019-10-15 23:52:52 -07:00
Greg Hogan
0f361999bd timeout is float 2019-10-15 23:38:24 -07:00
Greg Hogan
711810d2f0 more uds debug 2019-10-15 12:14:09 -07:00
Greg Hogan
4454e3a6bb better CAN comm abstraction 2019-10-15 12:07:19 -07:00
Greg Hogan
43adad3116 fix WARNING_INDICATOR_REQUESTED name 2019-10-14 17:32:23 -07:00
Greg Hogan
9c857da379 0x 2019-10-14 17:32:23 -07:00
Greg Hogan
b64d6fa5d2 typing 2019-10-14 17:32:23 -07:00
Greg Hogan
768fdf7e19 bytes() > chr().encode() 2019-10-14 17:32:23 -07:00
Greg Hogan
1be15ea934 custom errors from thread 2019-10-14 17:32:23 -07:00
Greg Hogan
68da8315f3 more python3 2019-10-14 17:32:23 -07:00
Greg Hogan
4f288586d5 updates for python3 2019-10-14 17:32:23 -07:00
Greg Hogan
932745f62b support tx flow control for chunked messages 2019-10-14 17:32:23 -07:00
Greg Hogan
b1c371292c add timeout param 2019-10-14 17:32:23 -07:00
Greg Hogan
cdf2f626ba bug fixes 2019-10-14 17:32:23 -07:00
Greg Hogan
b1a3195770 fix rx message filtering bug 2019-10-14 17:32:23 -07:00
Greg Hogan
80fb6a6fa0 convert uds lib to class 2019-10-14 17:32:23 -07:00