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

uds: server emulation and tests #1329

Draft
wants to merge 75 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
41ed480
Revert "Revert "IsoTpMessage: check CAN frame length (#1312)""
sshane Mar 31, 2023
679ee4a
need to pad for the check to work
sshane Mar 31, 2023
e683f84
pass rx_offset up from can client
sshane Mar 31, 2023
cc28404
detect from internal can_client and just use it for the checks
sshane Mar 31, 2023
70288a1
move
sshane Mar 31, 2023
8a26f24
test UDS
sshane Mar 31, 2023
bd0da30
AssertionError: isotp - rx: invalid CAN frame length: 7
sshane Mar 31, 2023
2fbbf10
parameterized
sshane Mar 31, 2023
d9e1a2a
use UdsClient
sshane Mar 31, 2023
275ffda
Merge remote-tracking branch 'upstream/master' into uds-tests
sshane Mar 31, 2023
52d283c
clean up
sshane Mar 31, 2023
809d945
try to do fw (draft)
sshane Mar 31, 2023
f0bcc2e
it works!!
sshane Mar 31, 2023
f99ea30
comments
sshane Mar 31, 2023
00b26c6
woah, found a bug with the tests!
sshane Mar 31, 2023
9a0bd69
stash so far
sshane Mar 31, 2023
abfefcd
draft
sshane Apr 1, 2023
90f0e1e
draft
sshane Apr 1, 2023
ba552a4
clean up
sshane Apr 1, 2023
b934826
clean up more
sshane Apr 1, 2023
f14b2eb
add comment
sshane Apr 1, 2023
28903c1
remove prints
sshane Apr 1, 2023
fc76a79
fixes
sshane Apr 1, 2023
17f7c0f
revert fixes
sshane Apr 1, 2023
71ba994
revert fixes
sshane Apr 1, 2023
5c1779d
skip
sshane Apr 1, 2023
3046a92
call it a mock can buffer
sshane Apr 1, 2023
b5a10c2
caps
sshane Apr 1, 2023
43bcfb8
fix and can clean that up
sshane Apr 1, 2023
ff4de7d
no debug
sshane Apr 1, 2023
0275e3a
Merge remote-tracking branch 'upstream/master' into uds-tests
sshane Apr 1, 2023
b409789
UdsServer thread
sshane Apr 5, 2023
dfa77e2
uds changes
sshane Apr 5, 2023
5a6928f
vin
sshane Apr 5, 2023
9271daf
it works!
sshane Apr 5, 2023
d5d89f7
clean that up
sshane Apr 5, 2023
6026c28
clean up
sshane Apr 5, 2023
8531e81
Merge remote-tracking branch 'upstream/master' into uds-tests-server-…
sshane Apr 5, 2023
2934b7c
simpler?
sshane Apr 5, 2023
592cb2b
clean up
sshane Apr 5, 2023
7245dc5
test vin query
sshane Apr 5, 2023
2c52620
linter
sshane Apr 5, 2023
0c5c0d3
comment
sshane Apr 5, 2023
2ff13a5
Merge remote-tracking branch 'upstream/master' into uds-tests-server-…
sshane Apr 9, 2023
1838285
clean that up
sshane Apr 9, 2023
f58863b
clean up uds
sshane Apr 9, 2023
d7c3d92
move that here
sshane Apr 9, 2023
a4c6d96
make a param
sshane Apr 9, 2023
fd09cf4
rm
sshane Apr 9, 2023
3c5e280
Merge remote-tracking branch 'upstream/master' into uds-tests-server-…
sshane Apr 19, 2023
0545106
Merge remote-tracking branch 'upstream/master' into uds-tests-server-…
sshane May 13, 2023
a7abfdf
Merge remote-tracking branch 'upstream/master' into uds-tests-server-…
sshane Aug 29, 2023
60f0628
start to cover all cases with lookup table
sshane Aug 29, 2023
6c74fd9
clean up
sshane Aug 29, 2023
0a2603e
more
sshane Aug 29, 2023
a112280
and this
sshane Aug 29, 2023
0677562
more assert tests (not done)
sshane Aug 29, 2023
a1dadc7
more tester present checks, fix subfunc
sshane Aug 29, 2023
938b77d
test multiple subfunctions
sshane Aug 29, 2023
54b750f
common create negative response function
sshane Aug 30, 2023
0942854
standard UDS services
sshane Aug 30, 2023
b6a11b6
dict union is so nice
sshane Aug 30, 2023
198b9da
add comment
sshane Aug 30, 2023
bb5b848
clean up
sshane Aug 30, 2023
53cd2f0
typing
sshane Aug 30, 2023
3a87e6e
add test to catch bug https://github.com/commaai/panda/pull/1318
sshane Aug 30, 2023
950f588
bug fix
sshane Aug 30, 2023
c0e05c6
more todos
sshane Aug 30, 2023
9a15bb2
clean up
sshane Aug 30, 2023
baaeed1
test undefined service types
sshane Aug 30, 2023
1600400
draft of no single frame mode!
sshane Aug 31, 2023
b933e8f
clean up mock can buffer
sshane Aug 31, 2023
a2171e9
all (mostly) in UdsServer now!
sshane Aug 31, 2023
c287a38
timeout not required
sshane Aug 31, 2023
6efca48
bugfix
sshane Aug 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more todos
  • Loading branch information
sshane committed Aug 30, 2023
commit c0e05c660154b530c64a89c8678f04ddf68e6135
2 changes: 2 additions & 0 deletions python/uds.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,10 @@ def __init__(self, panda, tx_addr: int, rx_addr: Optional[int] = None, bus: int
self.debug = debug
can_send_with_timeout = partial(panda.can_send, timeout=int(tx_timeout*1000))
self._can_client = CanClient(can_send_with_timeout, panda.can_recv, self.tx_addr, self.rx_addr, self.bus, self.sub_addr, debug=self.debug)
# TODO: remove this
self._server_can_client = CanClient(can_send_with_timeout, panda.can_recv, self.rx_addr, self.tx_addr, self.bus, self.sub_addr, debug=self.debug)
self.response_pending_timeout = response_pending_timeout
# TODO: and this, with proper timing (needed for IsoTpParallelQuery testing)
self.single_frame_mode = single_frame_mode

# generic uds request
Expand Down