Page 1 of 1

Error- 'write: No buffer space available' | driver-8.9.3

Posted: Mon 9. Dec 2019, 17:03
by JeyP4
I bought PCAN's CAN-USB cable.
And modified 'interface' to Setup the networking rules.

Code: Select all

sudo gedit /etc/network/interfaces

Code: Select all

////////////    'interfaces' file
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto can0
iface can0 inet manual
	#pre-up ip link set $IFACE type can bitrate 125000 listen-only off
	pre-up /sbin/ip link set $IFACE type can bitrate 125000 triple-sampling on
	up /sbin/ifconfig $IFACE up
	down /sbin/ifconfig $IFACE down
/////////////
Problem is when I sending canmsg with cangen(cangen -g 1 -I i can0 -v), it stops after 446 messages.

Code: Select all

write: No buffer space available
I installed latest 'peak-linux-driver-8.9.3'.
Installation commands were:

Code: Select all

cd peak-linux-driver-8.9.3
make clean
cd driver/
make clean
make NET=NETDEV_SUPPORT
sudo make install
After latest driver installation

Code: Select all

jai@jai:~$ cat /proc/pcan

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20191029_n (8.9.3) Dec  9 2019 16:35:25 --------------
*---------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] [net] -----------
*--------------------- 1 interfaces @ major 240 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb   can0 ffffffff 254 0x031c 00000000 00000000 0000044d 00000000 0x0000

Code: Select all

jai@jai:~$ uname -a
Linux jai 4.15.0-72-generic #81~16.04.1-Ubuntu SMP Tue Nov 26 16:34:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
My doubt: if I attach real sensor, will CANBUS stop entertaining new sensor msgs after certain number of msgs?

Re: Error- 'write: No buffer space available' | driver-8.9.3

Posted: Mon 9. Dec 2019, 17:20
by M.Maidhof
Hi,

do you have another active CAN node (125k bitrate) connected to the PCAN-USB, and your CAN cables are terminated on both ends?

regards

Michael

Re: Error- 'write: No buffer space available' | driver-8.9.3

Posted: Mon 9. Dec 2019, 17:25
by JeyP4
M.Maidhof wrote:Hi,

do you have another active CAN node (125k bitrate) connected to the PCAN-USB, and your CAN cables are terminated on both ends?

regards

Michael
Oh.

Right now I just connected the CAN-USB cable to host PC.
Do you think if there is another CAN node with proper terminated CANBUS, this issue would resolve?
If yes, then I would try as soon as I receive my sensor. Can you brief why it says 'No buffer space available' after 446 canmsgs when only host-PC is connected?

Re: Error- 'write: No buffer space available' | driver-8.9.3

Posted: Mon 9. Dec 2019, 17:48
by M.Maidhof
Hi,

yes, a CAN system needs at least 2 active nodes, otherwise the CAN controller will get no ack, and will resend the last message again and again, while the transmit buffer will overflow due to the active cangen.

regards

Michael

Re: Error- 'write: No buffer space available' | driver-8.9.3

Posted: Mon 9. Dec 2019, 18:07
by JeyP4
Thanks I will try soon and reply.