alexmohr / usb-can

USB-CAN Analyzer Linux Support
GNU General Public License v2.0
36 stars 13 forks source link

Error building usb-can. 'struct can_frame' has no member named 'len'. #43

Closed Umaroth8419 closed 1 year ago

Umaroth8419 commented 1 year ago

Hi there! I'm trying to build usb-can on kernel 5.10.110-30-rockchip-g12ee46f17a0c. When I run build, I get error: 'struct can_frame' has no member named 'len'. Unfortunately with this sbc, we're all stuck on the older kernel. Is there a way to go about fixing this? I'm trying to run usb-can upon boot so I can communicate between the sbc and a board with a transceiver on the toolhead of my 3d printer! The SBC in question is Rock5B. Thank you!

alexmohr commented 1 year ago

Hi, have you tried building with the 5.13 or 5.15 branch? They might work for 5.10 too. If not I can look into fixing it but it will be end of the year because I'm on vacation at the moment

Umaroth8419 commented 1 year ago

I haven't tried building for 5.15 branch. I'll try it. If not I'm SoL. Then I'll have to return this adapter and use mcp2515 adapter instead.

Umaroth8419 commented 1 year ago

Doesn't work. Could this be because of the new socketcan version? Why wouldn't len be found in can.h?

alexmohr commented 1 year ago

The socket can interface changed a lot over the last few kernel versions. I skipped someintermediate versions because I never tried to target 5.10. It can't find Len because the interface doesn't contain it on 5.10 due to the changes.

I think your best choice at the moment is to use a different adapter. I might be able to look into this at the end of December. Bit I'm definitely not able to get to this any earlier.

alexmohr commented 1 year ago

It should now work again with 5.10