can-utils icon indicating copy to clipboard operation
can-utils copied to clipboard

Help me with data padding

Open hungcuiga1 opened this issue 2 years ago • 8 comments

Dear Develop team, I am a newbie in C++ and I want to send data to can. I use iostpsend and see data is padding like I posted here https://stackoverflow.com/questions/77635005/padding-stdvectoruint8-t-in-embedded-c I see this code over a week and I still can not understand where you do this future. Can you help me with that question? Thank you so much.

hungcuiga1 avatar Dec 11 '23 16:12 hungcuiga1

The ISO-TP is implemented in the Linux Kernel, the padding is added there.

What is your actual task?

marckleinebudde avatar Dec 11 '23 16:12 marckleinebudde

Dear @marckleinebudde , Thank for your reply, I do not understand how this data is padded, I see option -p but I can not know what is follow code(how to it run). In https://stackoverflow.com/questions/77635005/padding-stdvectoruint8-t-in-embedded-c is my task. Sorry for my english. Thank you!

hungcuiga1 avatar Dec 11 '23 16:12 hungcuiga1

So you want an example to configure the Linux isotp socket (in your C code) to provide a padding with 0x00 as shown on stackoverflow?

hartkopp avatar Dec 11 '23 18:12 hartkopp

Dear @marckleinebudde @hartkopp , I can not send data have length 8192 bytes. It is error image Why? I think it is not a vector large

hungcuiga1 avatar Dec 17 '23 09:12 hungcuiga1

Dear @marckleinebudde , @hartkopp I send 4096 bytes and I see result: image only have a line can0 seen, about 2048 bytes it is OK. Please help me explain them. Thank you!

hungcuiga1 avatar Dec 17 '23 10:12 hungcuiga1

Please send the output of uname -a and cat /sys/module/can_isotp/parameters/max_pdu_size

hartkopp avatar Dec 17 '23 20:12 hartkopp

Dear @hartkopp , I can not find /sys/module/can_isotp/parameters/max_pdu_size on ubuntu 20.04, please help me.

hungcuiga1 avatar Dec 18 '23 02:12 hungcuiga1

Please send the output of uname -a

hartkopp avatar Dec 18 '23 11:12 hartkopp

Feel free to reopen, if you still have an issue.

marckleinebudde avatar May 28 '24 10:05 marckleinebudde