Joel Winarske and Marc Kleine-Budde
8a3e0453aa
CMake first pass ( #90 )
...
* CMake first pass
* canbusload dep fix
* Add Eclipse Debug, and Android Studio generation examples
* travis additions
* Update .travis.yml
CMAKE_BUILT_TYPE typo fix
* add android ndk variants(less mips)
2018-08-17 09:50:30 +02:00
Oliver Hartkopp
47f2e7a180
slcand: move setting of loop variable back into code context
...
With commit 33a9249571 ("slcand: daemonise only once setup is complete")
the daemonize syscall is moved behind serial tty setup.
This patch moves the missing assignment of the loop variable slcand_running
to get it into the code context of the while() loop.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2018-04-29 19:02:55 +02:00
Marc Kleine-Budde and GitHub
872b73766c
Merge pull request #81 from mansr/master
...
slcand: daemonise only once setup is complete
2018-04-25 16:34:36 +02:00
Mans Rullgard
33a9249571
slcand: daemonise only once setup is complete
...
Delay the daemon() call until the interface has been configured. This
simplifies scripts that wish to use the new interface immediately.
Signed-off-by: Mans Rullgard <mans@mansr.com >
2018-04-20 13:46:15 +01:00
Marc Kleine-Budde and GitHub
01041fddd6
Merge pull request #79 from ftheile/consistent-sizeof
...
Consistent arguments to sizeof().
2018-04-03 14:22:33 +02:00
Frank Theile
f51c897d68
Consistent arguments to sizeof().
...
In calls to functions taking a pointer 'p' and a length 'l':
if a struct variable v is passed in for p, then also pass sizeof(v) for
l.
2018-04-03 11:56:28 +02:00
Oliver Hartkopp and GitHub
9d52f81058
Merge pull request #78 from ftheile/patch-1
...
bzero() is deprecated
2018-03-30 19:03:02 +02:00
Frank Theile and GitHub
6ca4ce8ac9
bzero() is deprecated
...
Use memset() instead of bzero().
2018-03-30 19:00:05 +02:00
Oliver Hartkopp and GitHub
8389744f79
Merge pull request #77 from Shmink/master
...
valgrind no longer reports uninitialised byte(s) from bind call.
2018-03-24 20:56:57 +01:00
Tom Nicklin
b00cb24f12
valgrind no longer reports uninitialised byte(s) from bind call.
2018-03-24 19:53:13 +00:00
Marc Kleine-Budde
c5fd57df34
include: import header files from kernel
v2018.02.0
2018-02-11 14:39:01 +01:00
Marc Kleine-Budde and GitHub
a6469df2c0
Merge pull request #65 from BastianStender/bst/j1939-fix-jacd
...
jacd: add verbosity and fix missing interface
2018-01-22 14:52:32 +01:00
Bastian Stender
cf039f14fb
jacd: provide interface index while opening socket and address claiming
...
This is a direct consequence of not allowing bind to any device
("3cb6a1204598 j1939: socket: bind() cleanups"), i.e. can_ifindex == 0.
This means before this change jacd would receive from any interface that
was opened by another program.
Without this patch jacd fails with:
acd: bind(): No such device
A more verbose call shows the missing interface:
$ jacd -v 1122334455667788
jacd: ready for can0:1122334455667788
- socket(PF_CAN, SOCK_DGRAM, CAN_J1939);
- setsockopt(, SOL_SOCKET, SO_BINDTODEVICE, can0, 4);
- setsockopt(, SOL_CAN_J1939, SO_J1939_FILTER, <filter>, 84);
- setsockopt(, SOL_CAN_J1939, SO_J1939_RECV_OWN, 1, 4);
- bind(, :fe,0ee00,1122334455667788, 24);
jacd: bind(): No such device
Signed-off-by: Bastian Stender <bst@pengutronix.de >
2018-01-22 14:12:44 +01:00
Bastian Stender
6133ac94f0
jacd: print relevant API calls on verbose
...
The output is now comparable to testj1939's -v output.
Signed-off-by: Bastian Stender <bst@pengutronix.de >
2018-01-22 14:12:44 +01:00
Marc Kleine-Budde and GitHub
a7de2f68b7
Merge pull request #66 from BastianStender/bst/j1939-testj1939-cleanup
...
testj1939: use address to string function from libj1939
2018-01-22 13:07:26 +01:00
Bastian Stender
1f3f2f6163
testj1939: use address to string function from libj1939
...
canaddr2str() from testj1939 and libj1939's libj1939_addr2str provide
the same functionality. Remove the local helper function and use
libj1939_addr2str instead.
Signed-off-by: Bastian Stender <bst@pengutronix.de >
2018-01-22 12:27:15 +01:00
Marc Kleine-Budde
0bc94df9ca
libj1939: mark functions as static
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-19 16:38:54 +01:00
Marc Kleine-Budde
2ccb75dd84
can-j1939: remove obsolete sections from documentation
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 15:00:48 +01:00
Marc Kleine-Budde
d4fe7170e8
can-j1939: remove trailing whitespace
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 15:00:48 +01:00
Bastian Stender and Marc Kleine-Budde
680d5c30c3
testj1939: initialize verbose variable
...
Signed-off-by: Bastian Stender <bst@pengutronix.de >
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 14:53:43 +01:00
Marc Kleine-Budde
8839679a4c
Merge branch 'master' of https://github.com/kurt-vd/test-can-j1939
2018-01-18 14:53:38 +01:00
Marc Kleine-Budde
79d84118cb
GNUmakefile: add missing files to tarball
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 14:51:26 +01:00
Kurt Van Dijck and Marc Kleine-Budde
58c44ea3c4
can-j1939: add jacd address claim daemon
...
The can-j1939 kernel part only follows & validates inbound & outbound
address claim packets. Jacd implements the part that chooses an address
and emits the address claim packet.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be >
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 13:13:31 +01:00
Kurt Van Dijck and Marc Kleine-Budde
2cd00814a1
can-j1939: add jsr program
...
jsr sends data on <stdin> to j1939, and received j1939 data
is put on <stdout>.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be >
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 11:04:15 +01:00
Kurt Van Dijck and Marc Kleine-Budde
c50b5a39de
can-j1939: add jspy 'sniffer' program
...
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be >
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 11:04:15 +01:00
Kurt Van Dijck and Marc Kleine-Budde
1d3f8a1893
can-j1939: add libj1939
...
libj1939 provides a parser for struct sockaddr_can with j1939 info
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be >
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 11:04:15 +01:00
Kurt Van Dijck and Marc Kleine-Budde
19ee95491a
can-j1939: update headers with j1939
...
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be >
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 11:04:15 +01:00
Marc Kleine-Budde
635a04f79f
travis: include config file in tarball
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-18 11:04:15 +01:00
Marc Kleine-Budde
2ed3e4f960
travis: we don't need sudo
2018-01-17 18:00:59 +01:00
Yegor Yefremov and Marc Kleine-Budde
c011ccd742
Add Travis-CI support
...
This configuration performs build tests for GCC and Clang
compilers.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com >
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-17 16:47:29 +01:00
Marc Kleine-Budde
d8c86cd995
GNUmakefile.am: add missing vxcan.h to be included in tarball
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-17 15:54:43 +01:00
Marc Kleine-Budde
9a967265bc
include: import header files from kernel v4.15-rc5
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-17 15:51:31 +01:00
Oliver Hartkopp and GitHub
6bbcf9d90c
Merge pull request #62 from sgh/master
...
Set low-latency flag on serial port.
Thanks for monitoring!
2018-01-14 14:46:36 +01:00
Søren Holm
d052ad1a6b
Set low-latency flag on serial port.
...
Some serial drivers does not default to lowlatency mode by default.
2018-01-14 14:16:20 +01:00
Marc Kleine-Budde
cf949a926a
unconditionally define _GNU_SOURCE
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2018-01-09 14:42:17 +01:00
Oliver Hartkopp
ee0233505b
canplayer: ensure 6 decimal places in timestamp
...
Ensure the fractions of seconds are 6 decimal places long to catch
3rd party or handcrafted logfiles that treat the timestamp as float.
See: https://github.com/linux-can/can-utils/issues/60
Reported-by: https://github.com/hauptmech
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2017-12-13 20:12:32 +01:00
Oliver Hartkopp
33640c8643
candump: make hardware timestamps Linux version agnostic
...
Hardware timestamps have been introduced in Linux 2.6.30. Check for the
availability of SO_TIMESTAMPING and print an appropriate error message if
missing. Additionally fix some style issues and define the proper length
of ctrlmsg[].
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2017-12-06 10:16:09 +01:00
Oliver Hartkopp and GitHub
7b8607ca89
Merge pull request #59 from FabianInostroza/hw_timestamp
...
Add option to read hardware timestamps.
2017-12-06 10:15:00 +01:00
Fabián Inostroza
eeb0dc2390
Fix style and add reference to timestamps struct offset.
2017-12-02 16:43:52 -03:00
Fabián Inostroza
3195717961
Remove deprecated flag. See timestamping.txt
2017-12-02 16:07:04 -03:00
Fabián Inostroza
fbebc61881
Add option to read hardware timestamps.
2017-12-02 03:33:43 -03:00
Oliver Hartkopp and GitHub
60de0d9783
Merge pull request #58 from jschall/patch-1
...
increase TTYPATH_LENGTH
tnx jschall!
2017-11-29 11:00:08 +01:00
jschall and GitHub
f1c3ed1461
increase TTYPATH_LENGTH
...
ttypath can't fit filenames such as /dev/serial/by-id/usb-Zubax_Robotics_Zubax_Babel_1D002A00185732523935382000000000-if00
2017-11-28 13:02:01 -08:00
Oliver Hartkopp and GitHub
5b518a0a5f
Merge pull request #50 from darbedar/main-optimization
...
omit extra sets and clears - tnx!
2017-08-30 22:05:34 +02:00
Heydar Elahi
c45ee0cdbe
omit extra sets and clears
...
old code does extra sets and clears in case of quiet==1 so I've changed if statement orders and used else if
2017-08-09 18:53:35 +04:30
Oliver Hartkopp and GitHub
846eddd854
Merge pull request #49 from darbedar/master
...
Another macro usage
2017-08-09 10:47:40 +02:00
Heydar Elahi
1ae8714d0d
Another macro usage
...
Used same macro instead of array
2017-08-09 11:56:05 +04:30
Oliver Hartkopp and GitHub
c6ed797918
Merge pull request #48 from darbedar/master
...
use a macro for standardization & fix protocol violation location
2017-08-09 08:40:07 +02:00
Heydar Elahi
23249c5cd8
Protocol violation location mistake in error message
...
I changed "id.28-to-id.28" to "id.28-to-id.21"
2017-08-09 10:44:19 +04:30
Heydar Elahi
243bab70d5
use a macro
...
the hex_asc_upper_lo macro which is defined before do the same thing.
2017-08-09 02:36:47 +04:30