CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

BeagleBoneBlack canopen error CAN driver
https://forum.codesys.com/viewtopic.php?f=26&t=7479
Page 1 of 1

Author:  alt [ Fri Dec 30, 2016 10:03 am ]
Post subject:  BeagleBoneBlack canopen error CAN driver

Hello!

I connected CANopen bus. connection is correct, as shown in Figure
Attachment:
can_ok.png


after rebooting the controller connection is lost, as shown in the figure. Diagnosis of an error. "NetID 0: No CAN driver"
Attachment:
can_error.png


after the operation "Tool -> Update Beaglebone Black" the connection is restored, as shown in the figure
Attachment:
can_ok.png


What is the reason and what can be done?
I tried different versions of packages (3.5.9.0 and 3.5.10.0)
CoDeSys version 3.5 SP9+
I'm use bone-debian-8.6-lxqt-4gb-armhf-2016-11-06-4gb.img

Author:  Edwin Schwellinger [ Sat Dec 31, 2016 7:22 am ]
Post subject:  Re: BeagleBoneBlack canopen error CAN driver

Hi,
at moment no idea why this happens.
Have no hw here to check. But never seen it before.
Somehow the can driver is not ready at the point when the runtime is starting up.

Could you test if a restart lead to a working bootproject

/etc/init.d/codesyscontrol stop
/etc/init.d/codesyscontrol start


then a

cat /tmp/codesyscontrol.log and give us this output.

BR
Edwin

Author:  alt [ Mon Jan 02, 2017 8:53 am ]
Post subject:  Re: BeagleBoneBlack canopen error CAN driver

Happy New Year!

Thank you for responding quickly.

I am able to check only on 9 January.
Just write the result.

Author:  alt [ Mon Jan 09, 2017 11:39 am ]
Post subject:  Re: BeagleBoneBlack canopen error CAN driver

Hi!

1) After reboot saved log file -
Attachment:
codesyscontrol_after_reboot.zip

possible reason:
Socket_CanMiniDriver_Setup[1050]: using /opt/codesys/scripts/rts_set_baud.sh
Socket_CanMiniDriver_Setup[1063]: registering can interface 0
openRxSocket[583]: Opened socket for reading (can0)
openRxSocket[589]: ioctl(SIOCGIFINDEX): No such device

canopen bus NOT worked

2) After restart working bootproject
(/etc/init.d/codesyscontrol stop
/etc/init.d/codesyscontrol start) saved log file -
Attachment:
codesyscontrol_after_stop_start_service.zip


not exist error ioctl for can0

canopen bus worked

Somehow the can driver is not ready at the point when the runtime is starting up?
Help me, please!

Author:  alt [ Wed Jan 11, 2017 3:45 pm ]
Post subject:  Re: BeagleBoneBlack canopen error CAN driver

Hi,

I found a temporary solution.

I edited file /etc/rc.local
and add next strings:
sleep 15
systemctl stop codesyscontrol
sleep 1
systemctl start codesyscontrol

CAN bus work after a reboot, but now the boot is taking longer than 16 seconds.
Something wrong in codesyscontrol!
Need help developers!

Author:  Edwin Schwellinger [ Thu Jan 12, 2017 9:14 am ]
Post subject:  Re: BeagleBoneBlack canopen error CAN driver

hi,

our problem at the moment is on our board this does not happen.
Then can0 interface starts relieable.
So I would give this a try:

add in /etc/network/Interfaces then can0 interface

Example:

auto can0
iface can0 inet static
address 192.168.99.1
netmask 255.255.255.0
network 192.168.99.0

Could you please try this an give a feedback if this solves it reliable for every startup?

BR
Edwin

Author:  alt [ Sun Jan 15, 2017 10:37 am ]
Post subject:  Re: BeagleBoneBlack canopen error CAN driver

Hi,
Thanks for the advice!
I'll try tomorrow and I will write immediately.
Network settings work through the file /etc/network/interfaces in Debian 8.6?
I thought all the network settings in Debian 8.6 (Jessie) made through the service ConnMan, and file /etc/network/interfaces is not used.

The original post I got this from can be found here: https://groups.google.com/forum/#!topic ... fNwIk_dWlg.
Thanks to Brian Anderson for the original comment.

Author:  alt [ Mon Jan 16, 2017 2:59 pm ]
Post subject:  Re: BeagleBoneBlack canopen error CAN driver

Hi,

I'm try add in /etc/network/Interfaces then can0 interface

auto can0
iface can0 inet static
address 192.168.99.1
netmask 255.255.255.0
network 192.168.99.0

NOT worked!
(After restart BBB, command ifconfig not show can0)

What else can I try?

Author:  Siggi [ Wed Jan 18, 2017 8:15 am ]
Post subject:  Re: BeagleBoneBlack canopen error CAN driver

Hi all!

Same problem with my app. Thank you alt your previous post, it was very helpful for me (rc-local solution).

One more thing... Have you any experience, whats happening when BBB starting on the CANbus, because I have an other CAN capable device and if BBB starting then the other device going to wrong?! It means the ARM processor will stop when my BBB booting.

Regards, Siggi.

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/