BeagleBoneBlack canopen error CAN driver

alt
2016-12-30
2017-01-18
  • alt - 2016-12-30

    Hello!

    I connected CANopen bus. connection is correct, as shown in Figure

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

    after the operation "Tool -> Update Beaglebone Black" the connection is restored, as shown in the figure

    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

    IMG: can_ok.png

    IMG: can_error.png

    IMG: can_ok.png

     
  • eschwellinger

    eschwellinger - 2016-12-31

    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

     
  • alt - 2017-01-02

    Happy New Year!

    Thank you for responding quickly.

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

     
  • alt - 2017-01-09

    Hi!

    1) After reboot saved log file -
    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 -

    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!

    codesyscontrol_after_reboot.zip [3.18 KiB]

    codesyscontrol_after_stop_start_service.zip [3.69 KiB]

     
  • alt - 2017-01-11

    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!

    bbb_canopen_slave.zip [942.14 KiB]

    bbb_canopen_master.zip [703.71 KiB]

     
  • eschwellinger

    eschwellinger - 2017-01-12

    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

     
  • alt - 2017-01-15

    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.

     
  • alt - 2017-01-16

    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?

     
  • Siggi - 2017-01-18

    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.

     

Log in to post a comment.