RE: RFC can-j1939
From: R U Local <hidden>
Date: 2016-02-24 03:06:10
quoted
Dear Kurt, Thanks for your great work. I'm just bringing up the J1939 stack on a TI OMAP4 based system. I'm locked to a custom kernel 3.19 due to media drivers and codecs. I followed your guide and pulled code from 4.1 and 3.15 branches.
I guessed you just merge the j1939d-3.15 branch, noth the 4.1.
Modified files in my kernel are now the same as your j1939d-v3.15 branch but using memcpy_{from,to}_msg API.
quoted
I also patched and built can-utils and iproute2.
iproute2 must not be patched anymore.
Back to standard iproute2
quoted
I can't get the Transport Protocol to work send only sends the first packet and receive hangs on reception of the first packet.
I walked through my quick starter guide and i realised I had not updated it for dealing with the j1939 socket closing before the transport protocol is ready.
I just now updated my quick start guide. Can you try that, and tell where exactly it goes wrong in your opinion.
Thanks for the update/information. My test unit has two interfaces (can0 & can1) which I have connected to the same bus. I have two terminals in separate sessions one for sending and one for receiving. testj1939 -w1.0 -s20 can0:0x80 :,0x12300 now emits all frames when using as seen with 'candump can1'. testj1939 can1 -r shows no response from the above command. testj1939 -w1.0 -s can0:0x80 :0x90,0x12300 only emits the first frame as seen with 'candump can1'. testj1939 can1:0x90 -r outputs the first frame (80 12300: 01 23 45 67 89 ab cd ef) when the above is issued I've rebuilt the kernel with CAN_J1939_DEBUG configured but don’t have any additional messages. I'll look a bit deeper tomorrow, any suggestions or hints would be welcomed.
quoted
As far as your RFC your implementation looks to be ideal for our applications. For user space applications where should the headers (<linux/can/can.h> & <linux/can/j1939/j1939.h>) be taken from or provided by?
Ideally, this becomes mainline and then you will sooner or later find the header in linux/can/j1939.h. Up to then, you will need to fix your toolchain manually by copying j1939.h there yourself.
That’s what I was thinking, I've updated my toolchain in the meantime.
Do not forget that linux/can.h needs patching too.
That’s done.
Kurt
Mike -- To unsubscribe from this list: send the line "unsubscribe linux-can" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html