Receiving different canid than candump

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Receiving different canid than candump

baam
This post has NOT been accepted by the mailing list yet.
Hi,
im getting different canid than with the can-util candump.

candump output:

0CADF02A [8] FF FF FC FF FF FF FF FF
10EFD3D2 [2] 4B 08

and the output from my programm:

8CADF02A [8] FF FF FC FF FF FF FF FF
90EFD3D2 [2] 4B 08 00 00 00 00 00 00

the data is the same, just the id is wrong?

my current solution is
frame.can_id & 0x7FFFFFFF
but i think that there is some better way to get the correct id?

i am using PF_CAN, SOCK_RAW, CAN_RAW to create the socket and to get the frames
i am using the standard read function.

i read the can.txt und i know thereby that the canid has some flags included.
do i need to apply some filters before binding the socket? i tried that but than i got some compiler errors.

it would be great if someone could give me help or just a hint/tip :)

thanks!
baam