* write: No buffer space available
@ 2013-03-07 9:55 Michael Thénault
2013-03-07 16:36 ` Oliver Hartkopp
0 siblings, 1 reply; 4+ messages in thread
From: Michael Thénault @ 2013-03-07 9:55 UTC (permalink / raw)
To: linux-can
hello,
I'm working on a arm system with the 2.6.38.8 kernel.
When I try to send can frames (with cansend, cangen or sockets) the tx
queue is getting full and then i get this error :
write: No buffer space available
I've been monitoring the CAN bus with an oscilloscope and nothing
seems to happen.
I saw a thread with the similar problem, and there was some problem
with the one-shot mode. This mode doesn't work with me :
# ip link set can0 up type can one-shot on
RTNETLINK answers: Operation not supported
here are some details :
# ip -details -statistics link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-PASSIVE restart-ms 0
bitrate 125000 sample-point 0.875
tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 4 4 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 3 3 0 0
what am i doing wrong ?
Thank you in advance for your help
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: write: No buffer space available
2013-03-07 9:55 write: No buffer space available Michael Thénault
@ 2013-03-07 16:36 ` Oliver Hartkopp
2013-03-08 10:24 ` Michael Thénault
0 siblings, 1 reply; 4+ messages in thread
From: Oliver Hartkopp @ 2013-03-07 16:36 UTC (permalink / raw)
To: Michael Thénault; +Cc: linux-can
Hello Michael,
there are more than one threads handling the "no buffer space" question :-)
Usually there is no correct CAN network attached to the CAN interface, means:
- there is a least a second CAN node which can acknowledge the sent CAN frames
- the bitrate is identical for all CAN nodes
- the CAN bus is terminated properly (with 2x 120 = 60 Ohms)
If you have a working CAN network try to attach your Linux box and read the
data from the working environment first.
So you can be sure, that the bitrate settings and terminations are correct.
Regards,
Oliver
On 07.03.2013 10:55, Michael Thénault wrote:
> hello,
>
> I'm working on a arm system with the 2.6.38.8 kernel.
> When I try to send can frames (with cansend, cangen or sockets) the tx
> queue is getting full and then i get this error :
>
> write: No buffer space available
>
> I've been monitoring the CAN bus with an oscilloscope and nothing
> seems to happen.
> I saw a thread with the similar problem, and there was some problem
> with the one-shot mode. This mode doesn't work with me :
>
> # ip link set can0 up type can one-shot on
> RTNETLINK answers: Operation not supported
>
> here are some details :
>
> # ip -details -statistics link show can0
> 4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
> link/can
> can state ERROR-PASSIVE restart-ms 0
> bitrate 125000 sample-point 0.875
> tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
> mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
> clock 8000000
> re-started bus-errors arbit-lost error-warn error-pass bus-off
> 0 0 0 4 4 0
> RX: bytes packets errors dropped overrun mcast
> 0 0 0 0 0 0
> TX: bytes packets errors dropped carrier collsns
> 0 0 3 3 0 0
>
> what am i doing wrong ?
> Thank you in advance for your help
> --
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: write: No buffer space available
2013-03-07 16:36 ` Oliver Hartkopp
@ 2013-03-08 10:24 ` Michael Thénault
2013-03-08 10:39 ` Max S.
0 siblings, 1 reply; 4+ messages in thread
From: Michael Thénault @ 2013-03-08 10:24 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: linux-can
Hello,
Indeed after connecting the arm board to a termination, I'm able to
see traffic with the oscilloscope.
I noticed that after sending only one frame with cansend, I see
traffic all the time with the oscilloscope. I guess that the reason is
the lack of ACK frames coming from other nodes, which causes re-sends.
Thanks again,
Michael
2013/3/7 Oliver Hartkopp <socketcan@hartkopp.net>:
> Hello Michael,
>
> there are more than one threads handling the "no buffer space" question :-)
>
> Usually there is no correct CAN network attached to the CAN interface, means:
>
> - there is a least a second CAN node which can acknowledge the sent CAN frames
> - the bitrate is identical for all CAN nodes
> - the CAN bus is terminated properly (with 2x 120 = 60 Ohms)
>
> If you have a working CAN network try to attach your Linux box and read the
> data from the working environment first.
>
> So you can be sure, that the bitrate settings and terminations are correct.
>
> Regards,
> Oliver
>
>
> On 07.03.2013 10:55, Michael Thénault wrote:
>
>> hello,
>>
>> I'm working on a arm system with the 2.6.38.8 kernel.
>> When I try to send can frames (with cansend, cangen or sockets) the tx
>> queue is getting full and then i get this error :
>>
>> write: No buffer space available
>>
>> I've been monitoring the CAN bus with an oscilloscope and nothing
>> seems to happen.
>> I saw a thread with the similar problem, and there was some problem
>> with the one-shot mode. This mode doesn't work with me :
>>
>> # ip link set can0 up type can one-shot on
>> RTNETLINK answers: Operation not supported
>>
>> here are some details :
>>
>> # ip -details -statistics link show can0
>> 4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
>> link/can
>> can state ERROR-PASSIVE restart-ms 0
>> bitrate 125000 sample-point 0.875
>> tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
>> mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
>> clock 8000000
>> re-started bus-errors arbit-lost error-warn error-pass bus-off
>> 0 0 0 4 4 0
>> RX: bytes packets errors dropped overrun mcast
>> 0 0 0 0 0 0
>> TX: bytes packets errors dropped carrier collsns
>> 0 0 3 3 0 0
>>
>> what am i doing wrong ?
>> Thank you in advance for your help
>> --
>> 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
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: write: No buffer space available
2013-03-08 10:24 ` Michael Thénault
@ 2013-03-08 10:39 ` Max S.
0 siblings, 0 replies; 4+ messages in thread
From: Max S. @ 2013-03-08 10:39 UTC (permalink / raw)
To: Michael Thénault; +Cc: Oliver Hartkopp, linux-can
Hello,
On Fri, 2013-03-08 at 11:24 +0100, Michael Thénault wrote:
> Hello,
>
> Indeed after connecting the arm board to a termination, I'm able to
> see traffic with the oscilloscope.
> I noticed that after sending only one frame with cansend, I see
> traffic all the time with the oscilloscope. I guess that the reason is
> the lack of ACK frames coming from other nodes, which causes re-sends.
Yes. If there is no other node to ack the frame, the can controller will
resend the frame continuously. unless, i think, if you set it up to use
oneshot mode.
M.S.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-08 10:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 9:55 write: No buffer space available Michael Thénault
2013-03-07 16:36 ` Oliver Hartkopp
2013-03-08 10:24 ` Michael Thénault
2013-03-08 10:39 ` Max S.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).