-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any write to CAN_BCM socket returns -1 with errno = 22 #505
Comments
Hi Łukasz, I tried your exact setup with a virtual CAN interface "vcan0" and it works as expected:
Maybe there's something wrong with your can0 interface?!? Can you please check if your system runs fine with a virtual CAN interface? |
I have another idea what might be wrong.
Can you please check whether the E.g. with
|
So, i have both modules:
and operating vcan0:
but output is the same:
Bingo!
How can i solve this issue? Just to make that clear - i use Raspbian directly to compile files (no cross-compilation). |
IIRC there was a discussion some time ago. Can you try to add (or change) into |
In my case the right file is under This solution works fine!
Can You please tell me what is wrong? I just want to understand the issue as a beginner. Thank You. |
How about downgrade my OS to Bullseye and use external toolchain like this one? |
Hi Łukasz, the problem is, that the
has this
where the IIRC Marc prepared a patch to solve this. I have to take a look at it. |
Hi guys!
I am just a beginner so please, be patient to my ineptitude.
I was trying to write simple code to test BCM sockets, but anytime i want to add some new rule, the write function returns an error and errno is set to 22. I decided then to run bcmserver and add rule through a socket, but the results are the same. Here are the details:
I am using RaspberryPi 4 with CAN FD shield.
First, simple configuration of interface:
Next loading can_bcm module:
I've add a few printf's to the original bcmserver.c file, then recompiled. if i send the command:
the output from bcmserver is:
code that gives the last line looks like this:
After two days and many different combinations with msg structure, interface numbers and socket options i must give up.
Please tell me what am i doing wrong.
BR.
Łukasz
The text was updated successfully, but these errors were encountered: