Project

General

Profile

SocketCAN configuration

Added by Fred Frantz over 8 years ago

What is the recommended method for configuring a socketCAN port on the MitySOM3354? I have tried using the iproute2 utility as described in the TI instructions.

http://processors.wiki.ti.com/index.php/AM335X_DCAN_Driver_Guide#Building_D_CAN_driver_into_Kernel

After compiling the executable and copying it to the target, it will not run. The IP utility always runs through busybox, which does not
support CAN.

Thanks,

Fred


Replies (5)

RE: SocketCAN configuration - Added by Jonathan Cormier over 8 years ago

I used the busybox ip utility to configure can when I last tested it.

I found the following script which I created to configure can.
config_can.sh

See the following cantest script which is used to test can by connecting can0 to can1 on devkit. This uses canconfig instead of ip.
cantest.sh

RE: SocketCAN configuration - Added by Fred Frantz over 8 years ago

Thanks for the quick response. What version of busybox are you using?

Thanks,

Fred

RE: SocketCAN configuration - Added by Jonathan Cormier over 8 years ago

It would be the busybox that comes in the TI filesystem we ship with the devkits.

root@mitysom-335x ~ $ busybox
BusyBox v1.13.2 (2011-12-15 15:46:39 CST) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as!

Currently defined functions:
        [, [[, addgroup, adduser, ar, ash, awk, basename, blkid,
        bunzip2, bzcat, cat, chattr, chgrp, chmod, chown, chpasswd,
        chroot, chvt, clear, cmp, cp, cpio, cryptpw, cut, date,
        dc, dd, deallocvt, delgroup, deluser, df, dhcprelay, diff,
        dirname, dmesg, du, dumpkmap, dumpleases, echo, egrep, env,
        expr, false, fbset, fbsplash, fdisk, fgrep, find, free,
        freeramdisk, fsck, fsck.minix, fuser, getopt, getty, grep,
        gunzip, gzip, halt, head, hexdump, hostname, httpd, hwclock,
        id, ifconfig, ifdown, ifup, inetd, init, insmod, ip, kill,
        killall, klogd, last, less, linuxrc, ln, loadfont, loadkmap,
        logger, login, logname, logread, losetup, ls, lsmod, makedevs,
        md5sum, mdev, microcom, mkdir, mkfifo, mkfs.minix, mknod,
        mkswap, mktemp, modprobe, more, mount, mv, nc, netstat,
        nice, nohup, nslookup, od, openvt, passwd, patch, pidof,
        ping, ping6, pivot_root, poweroff, printf, ps, pwd, rdate,
        rdev, readahead, readlink, readprofile, realpath, reboot,
        renice, reset, rm, rmdir, rmmod, route, rtcwake, run-parts,
        sed, seq, setconsole, setfont, sh, showkey, sleep, sort,
        start-stop-daemon, strings, stty, su, sulogin, swapoff,
        swapon, switch_root, sync, sysctl, syslogd, tail, tar, tcpsvd,
        tee, telnet, telnetd, test, tftp, tftpd, time, top, touch,
        tr, traceroute, true, tty, udhcpc, udhcpd, udpsvd, umount,
        uname, uniq, unzip, uptime, usleep, vconfig, vi, vlock,
        watch, wc, wget, which, who, whoami, xargs, yes, zcat

RE: SocketCAN configuration - Added by Jonathan Cormier over 8 years ago

Apparently the filesystem ip utility isn't using busybox.

root@mitysom-335x ~ $ ll /bin/ip
lrwxrwxrwx    1 root     root           17 Sep  3  2015 /bin/ip -> /sbin/ip.iproute2*
root@mitysom-335x ~ $ ip -V   
ip utility, iproute2-ss100823

RE: SocketCAN configuration - Added by Fred Frantz over 8 years ago

After the links were corrected on my system, it works using iproute2 also.

Thanks

    (1-5/5)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)