Code Monkey home page Code Monkey logo

socketcand's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

socketcand's Issues

configure: error: C compiler cannot create executables

I'm have trouble with ./configure
I'm geting Error
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /home/rory/Desktop/socketcand-master': configure: error: C compiler cannot create executables See config.log' for more details

steps takin before error
rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo apt-get install autoconf
rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo apt-get install make
rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo apt-get install gcc
rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo apt-get install libconfig-dev
rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ sudo autoconf
rory@rory-Aspire-4810T ~/Desktop/socketcand-master $ ./configure

(here is a copy of config.log)

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by socketcand configure 0.4.2, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

---------

Platform.

---------

hostname = rory-Aspire-4810T
uname -m = x86_64
uname -r = 3.13.0-37-generic
uname -s = Linux
uname -v = #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games

-----------

Core tests.

-----------

configure:2259: checking for gcc
configure:2275: found /usr/bin/gcc
configure:2286: result: gcc
configure:2515: checking for C compiler version
configure:2524: gcc --version >&5
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2535: $? = 0
configure:2524: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
configure:2535: $? = 0
configure:2524: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2535: $? = 4
configure:2524: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:2535: $? = 4
configure:2555: checking whether the C compiler works
configure:2577: gcc -Wall -Wno-parentheses -DPF_CAN=29 -DAF_CAN=PF_CAN conftest.c >&5
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:2581: $? = 1
configure:2619: result: no
configure: failed program was:
| /* confdefs.h /
| #define PACKAGE_NAME "socketcand"
| #define PACKAGE_TARNAME "socketcand"
| #define PACKAGE_VERSION "0.4.2"
| #define PACKAGE_STRING "socketcand 0.4.2"
| #define PACKAGE_BUGREPORT "https://github.com/dschanoeh/socketcand/issues"
| #define PACKAGE_URL ""
| /
end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2624: error: in /home/rory/Desktop/socketcand-master': configure:2626: error: C compiler cannot create executables See config.log' for more details

----------------

Cache variables.

----------------

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_ac_ct_CC=gcc

-----------------

Output variables.

-----------------

CC='gcc'
CFLAGS=' -Wall -Wno-parentheses -DPF_CAN=29 -DAF_CAN=PF_CAN'
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
OBJEXT=''
PACKAGE_BUGREPORT='https://github.com/dschanoeh/socketcand/issues'
PACKAGE_NAME='socketcand'
PACKAGE_STRING='socketcand 0.4.2'
PACKAGE_TARNAME='socketcand'
PACKAGE_URL=''
PACKAGE_VERSION='0.4.2'
PATH_SEPARATOR=':'
SHELL='/bin/bash'
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
init_script='yes'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
rc_script='no'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
sysroot=''
target_alias=''

-----------

confdefs.h.

-----------

/* confdefs.h */
#define PACKAGE_NAME "socketcand"
#define PACKAGE_TARNAME "socketcand"
#define PACKAGE_VERSION "0.4.2"
#define PACKAGE_STRING "socketcand 0.4.2"
#define PACKAGE_BUGREPORT "https://github.com/dschanoeh/socketcand/issues"
#define PACKAGE_URL ""

configure: exit 77

thanks

Trying to use cannelloni as "socketcancl" (socketcan client), while on other side there is socketcand?

I discovered that socketcand on the embedded side does NOT recognize cannelloni on my VM, which has pass-through mechanisms between VM on PC and embedded HW (Beaglebone Black).

What I do, I set in my VM my private network, which sees all the components (energenie switch, bbb board and VM eth2 interface with built-in DHCP and TFTPD-hpa which work perfectly).

On the VM, I have the following set:

lsmod | grep can
vcan 16384 0
can_gw 20480 0
can_dev 24576 0
can_bcm 24576 0
can_raw 20480 2
can 49152 3 can_raw,can_bcm,can_gw
ifconfig vcan0
vcan0: flags=193<UP,RUNNING,NOARP> mtu 72
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1 (UNSPEC)
RX packets 54555 bytes 861125 (840.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 54555 bytes 861125 (840.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

True CAN-Fd vcan0 interface.

The VM private IP eth2 looks like:
eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.15.2 netmask 255.255.255.0 broadcast 192.168.15.255
inet6 fe80::210:60ff:fe31:5757 prefixlen 64 scopeid 0x20
ether 00:10:60:31:57:57 txqueuelen 1000 (Ethernet)
RX packets 51066 bytes 3185024 (3.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 103432 bytes 65516832 (62.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

NMAP command gives me the following:
nmap -T5 -sP 192.168.15.0/24

Starting Nmap 7.40 ( https://nmap.org ) at 2018-08-14 12:59 GMT
Nmap scan report for 192.168.15.21
Host is up (0.0037s latency).
MAC Address: 88:B6:27:01:66:EA (Gembird Europe BV)
Nmap scan report for 192.168.15.53
Host is up (0.010s latency).
MAC Address: 88:F0:77:5A:14:1C (Cisco Systems)
Nmap scan report for 192.168.15.101
Host is up (0.0023s latency).
MAC Address: F0:45:DA:83:09:B4 (Unknown)
Nmap scan report for 192.168.15.2
Host is up.
Nmap done: 256 IP addresses (4 hosts up) scanned in 1.70 seconds

So, my BBB IP is 192.168.15.101 !

The VM Cannelonni is configured as:
cannelloni -I vcan0 -R 192.168.15.101 -r 28601 -l 28601&

On the BBB side, I have very similar VCAN interfaces, and similar VCAN0 CAN-Fd capable interface.

But I am not able to connect with the command:
socketcand -v -i vcan0 -p 28601 -l eth0&

My best guess is that beacon is working, but I do NOT see any receiving CAN-Fd packets which Cannelloni sends to 192.168.15.101 , port 28601.

And here is the CLI transcript what I did on the BBB side:

root@beaglebone:~ ps -aux | grep socketcand
root 1607 0.0 0.2 10196 1324 pts/0 Sl 12:07 0:00 socketcand -v -i vcan0 -p 28601 -l eth0
root 1656 0.0 0.2 2776 1208 pts/0 S+ 13:05 0:00 grep socketcand
root@beaglebone:~ nc 192.168.15.101 28601
client connected
< hi > < open vcan0 >
connecting BCM socket...
< ok > < rawmode >
state changed to 2
< ok >

And I do NOT see any received packets. neither any beacon discovery.

I have here two questions about this problem:
[1] Does socketcand recognize cannelloni CAN packets? If not, why, and how to rework socketcand, so it could be achievable?
[2] Does any another socketcancl (socketcan client) exist which is compatible with socketcand?

Please, help!

Thank you,
Zoran Stojsavljevic

Bus aliases

It would be nice to have bus name aliases in the discovery beacon. This would help the user to recognize busses.

make: error: Compilation error in ARM processor

Hi All,

Tried to compile socketcand for ARM processor, used cross compilation, added below lines in Makefile
CROSS_COMPILE = arm-linux-gnueabihf-
ccache $(CROSS_COMPILE)gcc

Compilation is not successful, got the following error,
[email protected]:/socketcandFolder/sock utils/socketcand/socketcand-master$ make
ccache arm-none-linux-gnueabi-gcc -Wall -Wno-parentheses -DPF_CAN=29 -DAF_CAN=PF_CAN -DHAVE_CONFIG_H -I . -I ./include -o socketcand ./socketcand.c ./statistics.c ./beacon.c ./state_bcm.c ./state_raw.c ./state_isotp.c ./state_control.c -lpthread -lconfig
./socketcand.c:68:23: error: libconfig.h: No such file or directory
./socketcand.c: In function 'main':
./socketcand.c:177: error: 'config_t' undeclared (first use in this function)
./socketcand.c:177: error: (Each undeclared identifier is reported only once
./socketcand.c:177: error: for each function it appears in.)
./socketcand.c:177: error: expected ';' before 'config'
./socketcand.c:192: warning: implicit declaration of function 'config_init'
./socketcand.c:192: error: 'config' undeclared (first use in this function)
./socketcand.c:193: error: 'CONFIG_TRUE' undeclared (first use in this function)
./socketcand.c:193: warning: implicit declaration of function 'config_read_file'
./socketcand.c:194: warning: implicit declaration of function 'config_lookup_int'
./socketcand.c:195: warning: implicit declaration of function 'config_lookup_string'
make: *** [socketcand] Error 1
[email protected]:
/socketcandFolder/sock utils/socketcand/socketcand-master$

Looking forward to solve this issue.

Best Regards,
Gajalakshmi

write: No buffer space available

Hi, I try to establish CAN communication between a java application (running in virtual machine Ubuntu 14.04) and a device using CAN/USB convertor (http://www.systec-electronic.com/en/products/industrial-communication/interfaces-and-gateways/can-usb-adapter-usb-canmodul1). The java application uses kayak-core to send CAN frames. When the driver is loaded and the bitrate is set properly, the java application is started and the communication works fine. However after a while the communication stops working. The CAN/USB convertor does not indicate any error, the java application runs without any warning, however the CAN bus is silent (no messages transmitted or received by the java application). When I try to send a single CAN message from linux terminal using "cansend can0 100#00" command it says "write: No buffer space available". It seems that it is problem of socketcan, does it not? Can you give me an advise how to fix this issue?

I use these commands

  1. load driver and set bitrate
    sudo modprobe can_raw
    sudo modprobe can_dev
    sudo make firmware_install
    sudo insmod systec_can.ko
    sudo ip link set can0 up type can bitrate 125000
  2. provide access for can0
    socketcand -i can0

The details and statistics of can0 are:

17: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can 00:04:cb:18:00:00 brd 00:00:00:00:00:00 promiscuity 0
can state ERROR-ACTIVE restart-ms 0
bitrate 250000 sample-point 0.875
tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
systec_can: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..255 brp-inc 1
clock 48000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
766656 95832 0 0 0 0
TX: bytes packets errors dropped carrier collsns
354108 95831 0 0 0 0

ENOBUFS handling

If too many frames will be sent over the SocketCAN interface, send() comes with -1 and errno is set to ENOBUFS. Some of the can-utils (cangen) provide extra option to ignore this error. If such an error occurs cangen would just resend the CAN frame in question.

This question (http://dics.voicecontrol.ro/process_mails/arata_discutia/173374/[PATCH]_candump:_add_option_to_ignore_ENOBUFS.html) was once brought up on the linux-can mailing list, but still there is no official solution for this issue.

Unauthorized BUS

Hi

I try to use the socketcand with java kayak test class but i m facing a problem :

client connected
client try to acces unauthorized bus

Does someone know what to do please ?

candump can0 & can send working on the Rpi.

socketcand not connecting to socketCAN

Compiled on Fedora using all current developmental headers.
Code:
sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0
socketcand -i vcan0

Output:
Error in beacon send()

must terminate with Ctrl+C.

TCP connection failed.

Hi,
I get successfully CAN-utils working. Also, built SocketCand without any errors.
When I try to connect to socketcand from putty / telnet, it always gives me "< hi >" but when I finish my command and press Enter, the connection is lost.
Please advise.

Regards,
DN

do_configure for socketcand package failed

Hello,

I am writing the recipe for the socketcand package. It looks so far very simple:

PR = "r0"

RDEPENDS_${PN}-dev += "${PN}-staticdev"

SRCREV = "df7fb4ff8a4439d7737fe2df3540e1ab7465721a"

SRC_URI = "git://github.com/dschanoeh/socketcand.git;protocol=http"

S = "${WORKDIR}/git"

inherit autotools


I did install the following:
sudo apt-get install autoconf
sudo apt-get install libconfig-dev

The error is in do_config():

| checking for config_init in -lconfig... no
| configure: error: in
`/home/netmodule.intranet/stojsavljevic/projects/beaglebone-black/yocto-rocko/poky/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/socketcand/1.0-r0/build':
| configure: error: config test failed (--without-config to disable)

What should I include in the recipe to make it work (both autoconf
and ./configure work normally for the normal installation)???

Thank you,
Zoran

Error in beacon send()

when i run it like this : socketcand -v -i wlan0 -p 29536 -l 192.168.16.112 ,it report "Error in beacon send()" ,what does this mean ? i run it on my laptop by the way . Is this a bug ?

configure error

autoconf ./configure
The log shown below
checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for config_init in -lconfig... no configure: error: in /home/suzixin/car/socketcand':
configure: error: config test failed (--without-config to disable)
See config.log' for more details
config.log

CAN FD support

Is it correct that socketcand does not support the data-communication protocol CAN FD (CAN Flexible Data Rate)? Or did I miss something?
CAN FD frames created with can-utils are not displayed in raw mode.

warning: ‘sigset’ may be used uninitialized in this function [-Wmaybe-uninitialized]

~/socketcand# make
gcc -Wall -Wno-parentheses -DPF_CAN=29 -DAF_CAN=PF_CAN -DHAVE_CONFIG_H -I . -I ./include -o socketcand ./socketcand.c ./statistics.c ./beacon.c ./state_bcm.c ./state_raw.c ./state_isotp.c ./state_control.c -lpthread
gcc -Wall -Wno-parentheses -DPF_CAN=29 -DAF_CAN=PF_CAN -DHAVE_CONFIG_H -I . -I ./include -o socketcandcl ./socketcandcl.c
./socketcandcl.c: In function ‘main’:
./socketcandcl.c:179:24: warning: ‘sigset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
sigint_action.sa_mask = sigset;

Help output not useful

dschanoeh,

The help for socketcand doesn't really describe how it works or the basic usage pattern. Do both ends of the can bus (real or virtual) spawn a socketcand instance? Can you provide a simple end-to-end example with two vcan interfaces?

My goal is to use socketcand to proxy a can/vcan device over ethernet.

Here is what I'm trying:

$ ./socketcand -i vcan0 -v -l lo -p 12345 &
$ nc 127.0.0.1 12345
< hi >< open vcan0 >
< ok >< rawmode >
$ cangen vcan0 &
$ tcpdump -nni lo udp

Should I be seeing traffic on lo? I'm seeing a bunch of output in the socketcand window, but obviously no traffic on my network interface.

Any help is appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.