-
Notifications
You must be signed in to change notification settings - Fork 717
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
CAN not working with no error message or "No buffer space available" #262
Comments
This means you CAN controller fails to send CAN frames, this is consistent with the
Have a look the program you're using to send, it probably opens a new socket after |
nvm, The problem was easier than I thought. I just changed directly at ifconfig:
When I did it even the But the old SD card is still with a problem and I have no idea why.. The txqueuelen is ok, my code is ok, my rasp +CANbus are working and no error messages.. At least I can keep working in this new SD card. Thx for your reply |
Who is closing the socket here?
Please paste the output of |
This way you have a longer queue on the CAN interface, making your
...as you don't do a |
I open a can raw socket, and close it in the end of the function
I was sending a 16 bytes lenght in a block, as About triple-sampling I'm really not sure, I've seen it as suggestion in one forum, and I'm not sure how it works
it was an error when I did ctrl +c ctrl +v after some tests.. Sorry about it. I'm using 1Mbit, |
Please look at you code again, in case of an error during
You always have to send a complete Don't use triple sampling for now. I suggest to look at the output of |
The output of
I also included |
This is looks like the non working version. Can you post the same output for the working version? |
The working version stopped working now when I disconected and reconected the can bus. I tried with 3 different Pican2 and two MCP2515 modules and its not working anymore |
You mean disconnect and reconnect while the CAN bus is active and you are sending data? First try to send and receive a single frame over a proper CAN bus. If this is working you can play more advanced games like disconnecting from the bus, etc 😄 |
This is the send code:
And my main:
I deleted some parts of my code just ignoring what is not about CAN. |
No, I was testing all my CAN shields, the first one was working properly, as I told you, then I |
Now it is working again, and the output for
The only thing I did was changing from windows powershell to linux terminal to open with ssh |
I'm a bit lost now. Can you sum up what's working and what not. |
it seems that the order in which I turn on the devices makes it work or not. If I turn on raspberry first, it works. But if I turn on EPOS first it doesn't work. The strange thing is that it didn't happen before. I'll try again with the SD card that stopped working. |
Hello guys, |
Could you try ifconfig canX txqueuelen 2000 With canX X your actual can interface. |
Yes, I did it. It delays the error for 1-2 minutes. No I try to ftrace it. |
Let's discuss this on the linux-can mailing list: linux-can@vger.kernel.org |
where |
is it not the same as with ifconfig canX txqueuelen 2000? |
Yes, but |
this is the same, but you do not need to write every time after rebooting :) |
:))) https://lore.kernel.org/all/b5066414-fb63-71af-997c-07c1c531a218@photo-meter.com/ |
Hi everyone, I'm experiencing almost the same issue again. And I'm a bit confused again. I was using the maxon driver EPOS2 70/10 to drive a many motors and it was working well. Now I have an EPOS4 70/15 which have exact the same registers and works using arduino but dont with raspberry. I receive the errors |
Hi everyone, I've been using can for over a year, but now it stopped working.
My setup is a raspberry pi 3B+ with pican2 and EPOS2 70/10 for a maxon motor.
I haven't changed anything in the code and tried old codes that was working before. I also bought a second pican2 in case of the first one was broken, but nothing again. When I try to run candump with can0 I receive no error message, but it works for vcan0.
I also tried with different SD cards (my backup that was working) and new raspberry and nothing again.
I checked
/boot/config.txt:
and
/etc/networking/interfaces
:My final test was making a new SD card changing the OS (I was using raspex, and this new one uses raspberry pi OS), but now I receive two different error messages:
write: No buffer space available
but after a few minutes it changes to
socket: Too many open files
In both cases the result for
ifconfig
is:I dont know where I can check something else to found what is wrong here, I would be grateful if someone could help me.
The text was updated successfully, but these errors were encountered: