Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9bf3ef1

Browse files
committedNov 6, 2023
Update documentation
1 parent 7479e47 commit 9bf3ef1

File tree

2 files changed

+129
-57
lines changed

2 files changed

+129
-57
lines changed
 

‎documentation/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Discovers and utilizes various ISO 14229-1 services.
1212
- write_dids - Tries to write values of Dynamic Data Identifiers (DIDs)
1313
- auto - Fully automated diagnostics scan, by using the already existing UDS submodules
1414
- dump_mem - Dumps memory of ECU
15+
- routine_control_dump - Dump available routines for Routine Control service
1516

1617
Details here: [uds module](documentation/uds.md)
1718

‎documentation/uds.md

+128-57
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,41 @@ Supported modes:
1313
* dump_dids - Dumps values of Dynamic Data Identifiers (DIDs)
1414
* auto - Fully automated diagnostics scan, by using the already existing UDS submodules
1515
* write_dids - Writes values of accessible Dynamic Data Identifiers (DIDs)
16+
* dump_mem - Dumps memory of ECU
17+
* routine_control_dump - Dump available routines for Routine Control service
1618

17-
As always, module help can be shown by adding the `-h` flag (as shown below). You can also show help for a specific mode by specifying the mode followed by `-h`, e.g. `cc.py uds discovery -h` or `cc.py uds testerpresent -h`
19+
20+
As always, module help can be shown by adding the `-h` flag (as shown below). You can also show help for a specific mode by specifying the mode followed by `-h`, e.g. `ccn.py uds discovery -h` or `ccn.py uds testerpresent -h`
1821

1922
```
20-
$ cc.py uds -h
23+
$ ccn.py uds -h
2124
22-
-------------------
23-
CARING CARIBOU v0.x
24-
-------------------
25+
-------------------------
26+
CARING CARIBOU NEXT v0.x
27+
-------------------------
2528
2629
Loaded module 'uds'
2730
28-
usage: cc.py uds [-h] {discovery,services,subservices,ecu_reset,testerpresent,security_seed,dump_dids,auto,write_dids} ...
31+
usage: ccn.py uds [-h] {discovery,services,subservices,ecu_reset,testerpresent,security_seed,dump_dids,auto,dump_mem,write_dids,routine_control_dump} ...
2932
30-
Universal Diagnostic Services module for CaringCaribou
33+
Universal Diagnostic Services module for CaringCaribouNext
3134
3235
positional arguments:
33-
{discovery,services,subservices,ecu_reset,testerpresent,security_seed,dump_dids,auto,write_dids}
36+
{discovery,services,subservices,ecu_reset,testerpresent,security_seed,dump_dids,auto,dump_mem,write_dids,routine_control_dump}
3437
3538
options:
3639
-h, --help show this help message and exit
3740
3841
Example usage:
39-
cc.py uds discovery
40-
cc.py uds discovery -blacklist 0x123 0x456
41-
cc.py uds discovery -autoblacklist 10
42-
cc.py uds services 0x733 0x633
43-
cc.py uds ecu_reset 1 0x733 0x633
44-
cc.py uds testerpresent 0x733
45-
cc.py uds security_seed 0x3 0x1 0x733 0x633 -r 1 -d 0.5
46-
cc.py uds dump_dids 0x733 0x633
47-
cc.py uds dump_dids 0x733 0x633 --min_did 0x6300 --max_did 0x6fff -t 0.1
42+
ccn.py uds discovery
43+
ccn.py uds discovery -blacklist 0x123 0x456
44+
ccn.py uds discovery -autoblacklist 10
45+
ccn.py uds services 0x733 0x633
46+
ccn.py uds ecu_reset 1 0x733 0x633
47+
ccn.py uds testerpresent 0x733
48+
ccn.py uds security_seed 0x3 0x1 0x733 0x633 -r 1 -d 0.5
49+
ccn.py uds dump_dids 0x733 0x633
50+
ccn.py uds dump_dids 0x733 0x633 --min_did 0x6300 --max_did 0x6fff -t 0.1
4851
```
4952

5053
## Discovery
@@ -53,15 +56,15 @@ Scans for arbitration IDs where an ECU responds to UDS requests.
5356
The ID of both the request and the matching response are printed. These are typically used as inputs for other UDS modes.
5457

5558
```
56-
$ cc.py uds discovery -h
59+
$ ccn.py uds discovery -h
5760
58-
-------------------
59-
CARING CARIBOU v0.x
60-
-------------------
61+
-------------------------
62+
CARING CARIBOU NEXT v0.x
63+
-------------------------
6164
6265
Loaded module 'uds'
6366
64-
usage: cc.py uds discovery [-h] [-min MIN] [-max MAX] [-b B [B ...]] [-ab N] [-sv] [-d D] [-p P] [-np]
67+
usage: ccn.py uds discovery [-h] [-min MIN] [-max MAX] [-b B [B ...]] [-ab N] [-sv] [-d D] [-p P] [-np]
6568
6669
options:
6770
-h, --help show this help message and exit
@@ -81,15 +84,15 @@ options:
8184
Scans an ECU (or rather, a given pair of request/response arbitration IDs) for supported diagnostics services.
8285

8386
```
84-
$ cc.py uds services -h
87+
$ ccn.py uds services -h
8588
86-
-------------------
87-
CARING CARIBOU v0.x
88-
-------------------
89+
-------------------------
90+
CARING CARIBOU NEXT v0.x
91+
-------------------------
8992
9093
Loaded module 'uds'
9194
92-
usage: cc.py uds services [-h] [-t T] [-p P] [-np] src dst
95+
usage: ccn.py uds services [-h] [-t T] [-p P] [-np] src dst
9396
9497
positional arguments:
9598
src arbitration ID to transmit to
@@ -106,15 +109,15 @@ options:
106109
Scans a diagnostics service ID for supported sub-service IDs.
107110

108111
```
109-
$ cc.py uds subservices -h
112+
$ ccn.py uds subservices -h
110113
111-
-------------------
112-
CARING CARIBOU v0.x
113-
-------------------
114+
-------------------------
115+
CARING CARIBOU NEXT v0.x
116+
-------------------------
114117
115118
Loading module 'uds'
116119
117-
usage: cc.py uds subservices [-h] [-t T] [-p P] [-np] dtype stype src dst
120+
usage: ccn.py uds subservices [-h] [-t T] [-p P] [-np] dtype stype src dst
118121
119122
positional arguments:
120123
dtype Diagnostic Session Control Subsession Byte
@@ -136,15 +139,15 @@ Requests a restart of an ECU.
136139
It is common for an ECU to support multiple reset types.
137140

138141
```
139-
$ cc.py uds ecu_reset -h
142+
$ ccn.py uds ecu_reset -h
140143
141-
-------------------
142-
CARING CARIBOU v0.x
143-
-------------------
144+
-------------------------
145+
CARING CARIBOU NEXT v0.x
146+
-------------------------
144147
145148
Loaded module 'uds'
146149
147-
usage: cc.py uds ecu_reset [-h] [-t T] [-p P] [-np] type src dst
150+
usage: ccn.py uds ecu_reset [-h] [-t T] [-p P] [-np] type src dst
148151
149152
positional arguments:
150153
type Reset type: 1=hard, 2=key off/on, 3=soft, 4=enable rapid power shutdown, 5=disable rapid power shutdown
@@ -166,15 +169,15 @@ Elevated sessions (often referred to as "unlocked servers") automatically fall b
166169
By continuing to send Tester Present messages after a server (ECU) has been unlocked (e.g. by an official diagnostics tool), it can be kept in an unlocked state for an arbitrary amount of time in order to allow continued access to protected services.
167170

168171
```
169-
$ cc.py uds testerpresent -h
172+
$ ccn.py uds testerpresent -h
170173
171-
-------------------
172-
CARING CARIBOU v0.x
173-
-------------------
174+
-------------------------
175+
CARING CARIBOU NEXT v0.x
176+
-------------------------
174177
175178
Loaded module 'uds'
176179
177-
usage: cc.py uds testerpresent [-h] [-d D] [-dur S] [-spr] [-p P] [-np] src
180+
usage: ccn.py uds testerpresent [-h] [-d D] [-dur S] [-spr] [-p P] [-np] src
178181
179182
positional arguments:
180183
src arbitration ID to transmit to
@@ -192,15 +195,15 @@ options:
192195
Scans a range of Dynamic Data Identifiers (DIDs) and dumps their values.
193196

194197
```
195-
$ cc.py uds dump_dids -h
198+
$ ccn.py uds dump_dids -h
196199
197-
-------------------
198-
CARING CARIBOU v0.x
199-
-------------------
200+
-------------------------
201+
CARING CARIBOU NEXT v0.x
202+
-------------------------
200203
201204
Loaded module 'uds'
202205
203-
usage: cc.py uds dump_dids [-h] [-t T] [--min_did MIN_DID] [--max_did MAX_DID] [-p P] [-np] [-r REPORTING] src dst
206+
usage: ccn.py uds dump_dids [-h] [-t T] [--min_did MIN_DID] [--max_did MAX_DID] [-p P] [-np] [-r REPORTING] src dst
204207
205208
positional arguments:
206209
src arbitration ID to transmit to
@@ -221,15 +224,15 @@ options:
221224
Tests a range of Dynamic Data Identifiers (DIDs) and tries to write them with the UDS service Write Data by Identifier, under the supplied diagnostic session.
222225

223226
```
224-
$ cc.py uds write_dids -h
227+
$ ccn.py uds write_dids -h
225228
226-
-------------------
227-
CARING CARIBOU v0.x
228-
-------------------
229+
-------------------------
230+
CARING CARIBOU NEXT v0.x
231+
-------------------------
229232
230233
Loading module 'uds'
231234
232-
usage: cc.py uds write_dids [-h] [-t T] [--min_did MIN_DID] [--max_did MAX_DID] [-r REPORTING] dtype src dst
235+
usage: ccn.py uds write_dids [-h] [-t T] [--min_did MIN_DID] [--max_did MAX_DID] [-r REPORTING] dtype src dst
233236
234237
positional arguments:
235238
dtype Diagnostic Session Control Subsession Byte
@@ -249,15 +252,15 @@ options:
249252
Performs a fully automated diagnostics scan from start to finish, by using the already existing CC modules.
250253

251254
```
252-
$ cc.py uds auto -h
255+
$ ccn.py uds auto -h
253256
254-
-------------------
255-
CARING CARIBOU v0.x
256-
-------------------
257+
-------------------------
258+
CARING CARIBOU NEXT v0.x
259+
-------------------------
257260
258261
Loading module 'uds'
259262
260-
usage: cc.py uds auto [-h] [-min MIN] [-max MAX] [-b B [B ...]] [-ab N] [-sv] [-d D] [-t T] [--min_did MIN_DID] [--max_did MAX_DID] [-p P] [-np] [-r REPORTING]
263+
usage: ccn.py uds auto [-h] [-min MIN] [-max MAX] [-b B [B ...]] [-ab N] [-sv] [-d D] [-t T] [--min_did MIN_DID] [--max_did MAX_DID] [-p P] [-np] [-r REPORTING]
261264
262265
options:
263266
-h, --help show this help message and exit
@@ -276,4 +279,72 @@ options:
276279
-np, --no_padding trigger for cases where no padding is required, to enable set the option to 1. (default: 0)
277280
-r REPORTING, --reporting REPORTING
278281
reporting to text file, to enable set the option to 1. (default: 0)
282+
```
283+
284+
## Memory Dump
285+
Performs a memory dump using the service read_memory_by_address.
286+
287+
```
288+
$ ccn.py uds dump_mem -h
289+
290+
-------------------------
291+
CARING CARIBOU NEXT v0.x
292+
-------------------------
293+
294+
Loading module 'uds'
295+
296+
usage: ccn.py uds dump_mem [-h] [-t T] [--start_addr START_ADDR] [--mem_length MEM_LENGTH] [--mem_size MEM_SIZE] [--address_byte_size ADDRESS_BYTE_SIZE] [--memory_length_byte_size MEMORY_LENGTH_BYTE_SIZE] [--sess_type SESS_TYPE] [-p P] [-np] src dst
297+
298+
positional arguments:
299+
src arbitration ID to transmit to
300+
dst arbitration ID to listen to
301+
302+
options:
303+
-h, --help show this help message and exit
304+
-t T, --timeout T wait T seconds for response before timeout
305+
--start_addr START_ADDR
306+
starting address (default: 0x0000)
307+
--mem_length MEM_LENGTH
308+
number of bytes to read (default: 1)
309+
--mem_size MEM_SIZE numbers of bytes to return per request (default: 1)
310+
--address_byte_size ADDRESS_BYTE_SIZE
311+
numbers of bytes of the address (default: 2)
312+
--memory_length_byte_size MEMORY_LENGTH_BYTE_SIZE
313+
numbers of bytes of the memory length parameter (default: 1)
314+
--sess_type SESS_TYPE
315+
Session Type for activating service (default: 3)
316+
-p P, --padding P padding to be used in target messages (default: 0)
317+
-np, --no_padding trigger for cases where no padding is required, to enable set the option to 1. (default: 0)
318+
```
319+
320+
## Routine Control Dump
321+
Performs a routine control dump using the service routine_control.
322+
323+
```
324+
$ ccn.py uds routine_control_dump -h
325+
326+
-------------------------
327+
CARING CARIBOU NEXT v0.x
328+
-------------------------
329+
330+
Loading module 'uds'
331+
332+
usage: ccn.py uds routine_control_dump [-h] [--dsc dtype] [--subfunction subfunction] [-t T] [--min_routine MIN_ROUTINE] [--max_routine MAX_ROUTINE] [-p P] [-np] src dst
333+
334+
positional arguments:
335+
src arbitration ID to transmit to
336+
dst arbitration ID to listen to
337+
338+
options:
339+
-h, --help show this help message and exit
340+
--dsc dtype Diagnostic Session Control Subsession Byte
341+
--subfunction subfunction
342+
Routine Control Subfunction Byte: 0x01 startRoutine 0x02 stopRoutine 0x03 requestRoutineResults 0x00, 0x04–0x7F ISOSAEReserved
343+
-t T, --timeout T wait T seconds for response before timeout
344+
--min_routine MIN_ROUTINE
345+
minimum routine to execute (default: 0x0000)
346+
--max_routine MAX_ROUTINE
347+
maximum routine to execute (default: 0xFFFF)
348+
-p P, --padding P padding to be used in target messages (default: 0)
349+
-np, --no_padding trigger for cases where no padding is required, to enable set the option to 1. (default: 0)
279350
```

0 commit comments

Comments
 (0)
Please sign in to comment.