I am trying to use functions SvcRequestFileTransfer_2013() and SvcTransferData_2013() to read a directory listing out of an ECU.
I have not found examples of upload.
The documentation says "The TransferData service is used by the client to transfer data either from the client to the server/ECU (download) or from the server/ECU to the client (upload)".
The call to SvcRequestFileTransfer_2013() produces the correct message sequence:
Code: Select all
result = UDSApi.SvcRequestFileTransfer_2013(
canport, config,
out request, UDSApi.uds_svc_param_rft_moop.PUDS_SVC_PARAM_RFT_MOOP_RDDIR,
file_path_and_name_size,
file_path_and_name,
compression_method,
encrypting_method,
file_size_parameter_size,
file_size_uncompressed,
file_size_compressed);
Code: Select all
130) 7538761.1 Rx 07E0 8 07 38 05 00 03 43 3A 5C client sends a RequestFileTransfer, modeOfOperation=05 RDDIR, filename = C:\
131) 7538765.7 Rx 07E8 8 10 09 78 05 02 00 0A 00 server answers: ok ready to transfer 10 bytes
132) 7538765.9 Rx 07E0 8 30 0A 0A 55 55 55 55 55 ... (flow control)
133) 7538767.3 Rx 07E8 8 21 02 00 0A 00 00 00 00 ... last message of server answer
Code: Select all
result = UDSApi.SvcTransferData_2013(
canport, config,
out request,
(byte)(block_sequence_counter & 0xff));
Code: Select all
134) 7538768.6 Rx 07E0 8 02 36 01 55 55 55 55 55 client calls TransferData
Code: Select all
135) 7538769.0 Rx 07E8 8 10 0A 53 54 4D 33 32 2E server transfers data
136) 7538769.3 Rx 07E0 8 30 0A 0A 55 55 55 55 55 ... (flow control: the client accepts to receive 10 bytes from te server)
137) 7538770.7 Rx 07E8 8 21 54 58 54 00 00 00 00 ... (last part of data sent from server to client)
Thanks and regards.
Fabio