Linux CAN drivers development
 help / color / mirror / Atom feed
* Parsing j1939 from raw candump
@ 2013-03-25 21:02 Giox79
  2013-03-26 19:18 ` Kurt Van Dijck
  0 siblings, 1 reply; 8+ messages in thread
From: Giox79 @ 2013-03-25 21:02 UTC (permalink / raw)
  To: linux-can

Hello everybody, I would like to ask some suggestion.
As said in a previous post, I rebuilt candump utils on a 
custom board with a can interface.
I've been able to capture data using the 
canlogserver  util and everything worked fine. 
Now I would like to build a SW application, 
running in a PC and receiving the data from canlogserver. 
This application should parse raw candump packet and 
extract j1939 packet.
Is there anyone that can suggest me how to approach 
this topic? I tried using the j1939-71 standard, 
but as far as I understand, it explains differences between 
different packages, but I didn't find an 
explanation about header and trailer of J1939 packet.
Please note that I have the whole j1939 standard and that 
at present time I can't integrate the j1939 canutils in linux 
kernel because I should use for other kind of constraints 
a 2.6 linux kernel.
Any help, reference to specific sections of j1939 standard
 and so on will be appreciated.
Giovanni


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Parsing j1939 from raw candump
  2013-03-25 21:02 Parsing j1939 from raw candump Giox79
@ 2013-03-26 19:18 ` Kurt Van Dijck
  2013-03-26 21:17   ` Giox79
  0 siblings, 1 reply; 8+ messages in thread
From: Kurt Van Dijck @ 2013-03-26 19:18 UTC (permalink / raw)
  To: Giox79; +Cc: linux-can

On Mon, Mar 25, 2013 at 09:02:43PM +0000, Giox79 wrote:
> Hello everybody, I would like to ask some suggestion.
> As said in a previous post, I rebuilt candump utils on a 
> custom board with a can interface.
> I've been able to capture data using the 
> canlogserver  util and everything worked fine. 
> Now I would like to build a SW application, 
> running in a PC and receiving the data from canlogserver. 
> This application should parse raw candump packet and 
> extract j1939 packet.

> Is there anyone that can suggest me how to approach 
> this topic? I tried using the j1939-71 standard, 
> but as far as I understand, it explains differences between 
> different packages, but I didn't find an 
> explanation about header and trailer of J1939 packet.

j1939-21 & j1939-81
are the ones used by the j1939 linux kernel.

> Please note that I have the whole j1939 standard and that 
> at present time I can't integrate the j1939 canutils in linux 
> kernel because I should use for other kind of constraints 
> a 2.6 linux kernel.

which specific 2.6 one did it start from (like 2.6.28 or 2.6.35 or ...)

> Any help, reference to specific sections of j1939 standard
>  and so on will be appreciated.
> Giovanni
> 
> --
> 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

-- 
Kurt Van Dijck
GRAMMER EiA ELECTRONICS
http://www.eia.be
kurt.van.dijck@eia.be
+32-38708534

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Parsing j1939 from raw candump
  2013-03-26 19:18 ` Kurt Van Dijck
@ 2013-03-26 21:17   ` Giox79
  2013-03-27  8:09     ` Kurt Van Dijck
  0 siblings, 1 reply; 8+ messages in thread
From: Giox79 @ 2013-03-26 21:17 UTC (permalink / raw)
  To: linux-can

Hi Kurt, first thanks a lot

Kurt Van Dijck <kurt.van.dijck <at> eia.be> writes:

> 
> On Mon, Mar 25, 2013 at 09:02:43PM +0000, Giox79 wrote:
> > Is there anyone that can suggest me how to approach 
> > this topic? I tried using the j1939-71 standard, 
> > but as far as I understand, it explains differences between 
> > different packages, but I didn't find an 
> > explanation about header and trailer of J1939 packet.
> 
> j1939-21 & j1939-81
> are the ones used by the j1939 linux kernel.

Mumble, I was wrong.
So as far as I understand, I have to use J1939-71 only after decoding from raw 
to j1939 using the suggested docs.
I can use 71 to understand the payload of J1939 packets.
Am I right?

> 
> > Please note that I have the whole j1939 standard and that 
> > at present time I can't integrate the j1939 canutils in linux 
> > kernel because I should use for other kind of constraints 
> > a 2.6 linux kernel.
> 
> which specific 2.6 one did it start from (like 2.6.28 or 2.6.35 or ...)

The version is 2.6.35.3
> 
> > Any help, reference to specific sections of j1939 standard
> >  and so on will be appreciated.
> > Giovanni
> > 
> > --

> > To unsubscribe from this list: send the line "unsubscribe linux-can" in
> > the body of a message to majordomo <at> vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Parsing j1939 from raw candump
  2013-03-26 21:17   ` Giox79
@ 2013-03-27  8:09     ` Kurt Van Dijck
  2013-03-27 12:04       ` Kurt Van Dijck
  0 siblings, 1 reply; 8+ messages in thread
From: Kurt Van Dijck @ 2013-03-27  8:09 UTC (permalink / raw)
  To: Giox79; +Cc: linux-can

On Tue, Mar 26, 2013 at 09:17:40PM +0000, Giox79 wrote:
> Hi Kurt, first thanks a lot
> 
> Kurt Van Dijck <kurt.van.dijck <at> eia.be> writes:
> 
> > 
> > On Mon, Mar 25, 2013 at 09:02:43PM +0000, Giox79 wrote:
> > > Is there anyone that can suggest me how to approach 
> > > this topic? I tried using the j1939-71 standard, 
> > > but as far as I understand, it explains differences between 
> > > different packages, but I didn't find an 
> > > explanation about header and trailer of J1939 packet.
> > 
> > j1939-21 & j1939-81
> > are the ones used by the j1939 linux kernel.
> 
> Mumble, I was wrong.
> So as far as I understand, I have to use J1939-71 only after decoding from raw 
> to j1939 using the suggested docs.
> I can use 71 to understand the payload of J1939 packets.
> Am I right?
like the 'userspace' interpretation of the binary data? Yes.
> 
> > 
> > > Please note that I have the whole j1939 standard and that 
> > > at present time I can't integrate the j1939 canutils in linux 
> > > kernel because I should use for other kind of constraints 
> > > a 2.6 linux kernel.
> > 
> > which specific 2.6 one did it start from (like 2.6.28 or 2.6.35 or ...)
> 
> The version is 2.6.35.3
I'll take a look if backporting linux-j1939 to 2.6.35 is feasible.
Btw, I still run a platform with 2.6.25 _and_ a backported j1939.
But 2.6.25 lacks some infrastructure, and I had to come up with less
elegant procfs tunables to replace iproute2 commands.
The rest of the API (i.e. socket interface) is equal.

I'll take a look...

Kind regards,
Kurt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Parsing j1939 from raw candump
  2013-03-27  8:09     ` Kurt Van Dijck
@ 2013-03-27 12:04       ` Kurt Van Dijck
  2013-03-27 12:36         ` Giox79
  0 siblings, 1 reply; 8+ messages in thread
From: Kurt Van Dijck @ 2013-03-27 12:04 UTC (permalink / raw)
  To: Giox79, linux-can

> > 
> > > 
> > > > Please note that I have the whole j1939 standard and that 
> > > > at present time I can't integrate the j1939 canutils in linux 
> > > > kernel because I should use for other kind of constraints 
> > > > a 2.6 linux kernel.
> > > 
> > > which specific 2.6 one did it start from (like 2.6.28 or 2.6.35 or ...)
> > 
> > The version is 2.6.35.3
> I'll take a look if backporting linux-j1939 to 2.6.35 is feasible.
> Btw, I still run a platform with 2.6.25 _and_ a backported j1939.
> But 2.6.25 lacks some infrastructure, and I had to come up with less
> elegant procfs tunables to replace iproute2 commands.
> The rest of the API (i.e. socket interface) is equal.
> 
> I'll take a look...

Giovanni,

I've put a branch j1939-v2.6.35 on
http://gitorious.org/~kurt-vd/linux-can/linux-can-j1939

I cherry-picked some commits between v2.6.35 & v2.6.38 in order
to enable the necessary rtnetlink infrastructure.
It is compile-tested, but I'm unable to test it on hardware easily.
I'm booting via EFI now and that support is very recent...

You may want to give it a try.
The iproute2 package does not need backporting AFAIK, i.e. you can use
the one you like (with j1939 support).

If this works, it enables you to play with the j1939 stack on your PC also.

Kind regards,
Kurt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Parsing j1939 from raw candump
  2013-03-27 12:04       ` Kurt Van Dijck
@ 2013-03-27 12:36         ` Giox79
  2013-03-27 13:25           ` Kurt Van Dijck
  0 siblings, 1 reply; 8+ messages in thread
From: Giox79 @ 2013-03-27 12:36 UTC (permalink / raw)
  To: linux-can

Hi Kurt

Kurt Van Dijck <kurt.van.dijck <at> eia.be> writes:

> 
> > > 
> > > > 
> > > > > Please note that I have the whole j1939 standard and that 
> > > > > at present time I can't integrate the j1939 canutils in linux 
> > > > > kernel because I should use for other kind of constraints 
> > > > > a 2.6 linux kernel.
> > > > 
> > > > which specific 2.6 one did it start from (like 2.6.28 or 2.6.35 or ...)
> > > 
> > > The version is 2.6.35.3
> > I'll take a look if backporting linux-j1939 to 2.6.35 is feasible.
> > Btw, I still run a platform with 2.6.25 _and_ a backported j1939.
> > But 2.6.25 lacks some infrastructure, and I had to come up with less
> > elegant procfs tunables to replace iproute2 commands.
> > The rest of the API (i.e. socket interface) is equal.
> > 
> > I'll take a look...
> 
> Giovanni,
> 
> I've put a branch j1939-v2.6.35 on
> http://gitorious.org/~kurt-vd/linux-can/linux-can-j1939
> 
> You may want to give it a try.
> The iproute2 package does not need backporting AFAIK, i.e. you can use
> the one you like (with j1939 support).
> 
> If this works, it enables you to play with the j1939 stack on your PC also.
>

Thank you for your help.
I will give it a try during the weekend.
I don't know how to thank you. I will try using it and I will let you know.
I hope that Monday I will be able to provide some good news.
Have a nice day and a happy Easter
Giovanni


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Parsing j1939 from raw candump
  2013-03-27 12:36         ` Giox79
@ 2013-03-27 13:25           ` Kurt Van Dijck
  2013-04-02 19:53             ` Giox79
  0 siblings, 1 reply; 8+ messages in thread
From: Kurt Van Dijck @ 2013-03-27 13:25 UTC (permalink / raw)
  To: Giox79; +Cc: linux-can

> I will give it a try during the weekend.
I'll be off next week. My email access may be limited. I hope it just works then.

-- 
Kurt Van Dijck
GRAMMER EiA ELECTRONICS
http://www.eia.be
kurt.van.dijck@eia.be
+32-38708534

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Parsing j1939 from raw candump
  2013-03-27 13:25           ` Kurt Van Dijck
@ 2013-04-02 19:53             ` Giox79
  0 siblings, 0 replies; 8+ messages in thread
From: Giox79 @ 2013-04-02 19:53 UTC (permalink / raw)
  To: linux-can

Kurt Van Dijck <kurt.van.dijck <at> eia.be> writes:

> 
> > I will give it a try during the weekend.
> I'll be off next week. My email access may be limited. I
>  hope it just works then.
> 


Hi Kurt thank you again.
I had some little problem since my boss decided to 
avoid recompiling Linux kernel in our board 
(different development teams involved in the project
 and I work on the application layer).
So at present time I have to create a custom SW in 
userspace to parse some J1939 extracting the 
associated SPN.
In order to validate my approach, I would like to have
 an example of candump log (the official candump 
application, integrated in the main branch of Linux kernel) 
and to know what kind of j1939 nformation it represents.
So I would like to ask you if there is some kind of candump
 test vectors somewhere on the web.
I wasn't able to find any resource about this topic.
Do you know if there is some place where I can look for?
Best regards



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-04-02 19:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-25 21:02 Parsing j1939 from raw candump Giox79
2013-03-26 19:18 ` Kurt Van Dijck
2013-03-26 21:17   ` Giox79
2013-03-27  8:09     ` Kurt Van Dijck
2013-03-27 12:04       ` Kurt Van Dijck
2013-03-27 12:36         ` Giox79
2013-03-27 13:25           ` Kurt Van Dijck
2013-04-02 19:53             ` Giox79

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox