Yegor Yefremov
a904183b4e
CMakeLists.txt: add an option to control shared library creation
...
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com >
2025-03-11 18:19:08 +01:00
Marc Kleine-Budde and GitHub
da3914c491
Merge pull request #528 from marckleinebudde/canerrsim
...
canerrsim
2025-03-02 17:19:38 +01:00
Marc Kleine-Budde and GitHub
18b1e7970a
Merge pull request #553 from olerem/j1939_vehicle_position
...
J1939 vehicle position
2025-03-02 17:19:09 +01:00
Zeljko Avramovic and Marc Kleine-Budde
491cabea07
canerrsim: add
...
Link: https://github.com/linux-can/can-utils/issues/525#issue-2311379340
2025-03-02 17:16:21 +01:00
Marc Kleine-Budde and GitHub
f1cea504a4
Merge pull request #583 from yegorich/typos
...
isobusfs: fix typos
2025-03-02 17:09:17 +01:00
Marc Kleine-Budde and GitHub
900c7e9f6e
Merge pull request #584 from yegorich/fix-switch-case
...
slcand.c: add the missing case colon
2025-03-02 17:08:23 +01:00
Yegor Yefremov
b208876e65
slcand.c: add the missing case colon
...
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com >
2025-03-02 15:51:45 +01:00
Yegor Yefremov
72a9fd8ccd
isobusfs: fix typos
...
Typos were found with codespell.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com >
2025-03-02 15:44:40 +01:00
Marc Kleine-Budde
e448d542e8
github-actions: install libgps-dev where available
2025-03-01 22:30:29 +01:00
Oleksij Rempel and Marc Kleine-Budde
71b2aec834
j1939-vehicle-position-srv: Introduce J1939 and NMEA 2000 Vehicle Position Server
...
This patch adds `j1939-vehicle-position-srv`, a server for sending
vehicle position data over CAN using J1939 or NMEA 2000 protocols. It
retrieves GPS data from gpsd or simulates data if gpsd is unavailable.
By default, it operates in J1939 profile but can switch to NMEA 2000
with the `-p nmea2000` option.
Usage Examples:
1. With gpsd:
j1939acd -r 64-95 -c /tmp/1122334455667789.jacd 1122334455667789 vcan0 &
j1939-vehicle-position-srv -i vcan0 -n 0x1122334455667789
2. In simulation mode without gpsd:
j1939-vehicle-position-srv -i vcan0 -s -p nmea2000
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de >
[Yegor: add CMakeLists.txt integration]
Co-developed-by: Yegor Yefremov <yegorslists@googlemail.com >
2025-03-01 22:29:11 +01:00
Marc Kleine-Budde and GitHub
a24bff8b08
Merge pull request #582 from yegorich/clangd
...
CMakeLists.txt: enable CMAKE_EXPORT_COMPILE_COMMANDS by default
2025-03-01 16:47:48 +01:00
Yegor Yefremov
fe9ea67814
CMakeLists.txt: enable CMAKE_EXPORT_COMPILE_COMMANDS by default
...
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com >
2025-03-01 16:15:08 +01:00
Oleksij Rempel and Marc Kleine-Budde
e8559479fb
libj1939: Add function to connect a socket
...
Introduce `libj1939_connect_socket` function to handle socket
connections.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de >
2025-03-01 13:28:52 +01:00
Marc Kleine-Budde and GitHub
6050aa155d
Merge pull request #581 from yegorich/cmake-linting
...
CMakeLists.txt: remove unneeded spaces
2025-03-01 12:33:50 +01:00
Yegor Yefremov
302184f383
CMakeLists.txt: remove unneeded spaces
...
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com >
2025-03-01 10:51:12 +01:00
Oliver Hartkopp
c542c9ada7
gitignore: remove accidentally added Makefile item
...
Fixes: 4577316bd6 ("Update .gitignore")
Link: https://github.com/linux-can/can-utils/pull/577#issuecomment-2690362731
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-02-28 21:34:03 +01:00
Khem Raj and Oliver Hartkopp
2b8c7c5f4b
Include time.h for timespec struct definition
...
Fixes
git/isobusfs/../libj1939.h:33:18: error: field has incomplete type 'struct timespec'
33 | struct timespec next_send_time;
| ^
Signed-off-by: Khem Raj <raj.khem@gmail.com >
2025-02-14 12:41:31 +01:00
Jan Engelhardt and Oliver Hartkopp
4577316bd6
Update .gitignore
2025-02-14 12:40:42 +01:00
Marc Kleine-Budde and GitHub
4364d655b8
Merge pull request #576 from jengelh/master
...
build: give libisobusfs a version
2025-02-12 16:55:15 +01:00
Jan Engelhardt
2e71e396c5
build: give libisobusfs a version
2025-02-10 15:32:27 +01:00
Marc Kleine-Budde and GitHub
01083a64eb
Merge pull request #573 from hartkopp/canxl-asc-conversion
...
CANXL support for ASC conversion tools
v2025.01
2025-01-24 15:39:01 +01:00
Oliver Hartkopp
008f9f8e22
asc2log: add option to disable direction info
...
The ASC file provides an information whether the CAN frame is sent (Tx)
or received (Rx) on the local CAN node.
With the new '-d' option the generation of this information is disabled
for the log file generation to simplify the comparision of log files.
E.g. log1 -> asc -> log2 always created the T/R information in the log2
file which is then hard to compare to the log1 file which might not
have the T/R information at all.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 15:08:46 +01:00
Oliver Hartkopp
66e7c08beb
log2asc: add CAN XL support
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 15:04:43 +01:00
Oliver Hartkopp
4b66e8c56f
asc2log: shrink string buffer for header analysis
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 14:59:57 +01:00
Oliver Hartkopp
e6e3253972
asc2log: shrink string buffer for CAN identifier
...
Since using the %n feature the tmp1 buffer is only used for the handling
of the CAN identifier. So this buffer can be shrinked for that use case.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 14:56:16 +01:00
Oliver Hartkopp
6d69bef837
asc2log: add CAN CC and CAN FD support for CAN XL message events
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 14:51:52 +01:00
Oliver Hartkopp
4d8b247258
asc2log: make use of sscanf consumed characters feature
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 14:48:32 +01:00
Oliver Hartkopp
0e9c53f6d3
asc2log: add CAN XL support for CAN XL message events
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 14:33:59 +01:00
Oliver Hartkopp
99c5c14790
can.h: canxl: support Remote Request Substitution bit access
...
The Remote Request Substitution bit is a dominant bit ("0") in the CAN XL
frame. As some CAN XL controllers support to access this bit a new
CANXL_RRS value has been defined for the canxl_frame.flags element.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 14:22:21 +01:00
Oliver Hartkopp
df8e08fa70
asc2log: prepare helper functions for CAN XL frame handling
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 14:22:21 +01:00
Oliver Hartkopp
cb5ab07f34
asc2log: handle and skip TxRq messages
...
TxRq messages are internal measurement messages that document the time of
a transmission request (to the CAN driver) to be checked against the real
transmission time, when the CAN message has been sent.
There is no such feature in the SocketCAN log format, so we detect this
tag but skip TxRq messages in the ASC log files.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 14:22:21 +01:00
Oliver Hartkopp
0e692bf42e
asc2log: unify multi-line comments
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2025-01-24 14:21:59 +01:00
Marc Kleine-Budde and GitHub
0984817438
Merge pull request #571 from marckleinebudde/cangen-canbusload
...
cangen, canbusload: new features
2025-01-22 15:54:06 +01:00
Zhu Yi and Marc Kleine-Budde
b3da2f62b9
canbusload: support busload visualization
...
Add '-v' option for visualize busload, the output shows a moving
histogram of the past 90 seconds.
canbusload 2024-09-23 17:19:33 (exact bitstuffing)
can0@500k 487 55558 31048 0 99% |XXXXXXXXXXXXXXXXXXX.|
100%|..........................................................................................
95%|..............................................................................XXXXXXXXXXXX
90%|.............................................................................XXXXXXXXXXXXX
85%|.............................................................................XXXXXXXXXXXXX
80%|.............................................................................XXXXXXXXXXXXX
75%|.............................................................................XXXXXXXXXXXXX
70%|.............................................................................XXXXXXXXXXXXX
65%|.............................................................................XXXXXXXXXXXXX
60%|............................................................................XXXXXXXXXXXXXX
55%|............................................................................XXXXXXXXXXXXXX
50%|............................................................................XXXXXXXXXXXXXX
45%|............................................................................XXXXXXXXXXXXXX
40%|............................................................................XXXXXXXXXXXXXX
35%|.........................................XXX................................XXXXXXXXXXXXXX
30%|.........................................XXXX...............................XXXXXXXXXXXXXX
25%|........................................XXXXXX.............................XXXXXXXXXXXXXXX
20%|XXXXXXXX...............................XXXXXXXXXXXXXXXXX....XXXXXXXXXXX...XXXXXXXXXXXXXXXX
15%|XXXXXXXXX.............................XXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
10%|XXXXXXXXX.XXXXXXXXXXXXXXXXXXX..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5%|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Signed-off-by: Zhu Yi <yi.zhu5@cn.bosch.com >
Signed-off-by: Hubert Streidl <hubert.streidl@de.bosch.com >
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com >
Link: https://lore.kernel.org/r/20250120162332.19157-3-mark.jonas@de.bosch.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2025-01-20 18:07:16 +01:00
Zhu Yi and Marc Kleine-Budde
b85418d75c
canbusload: support busload statistic
...
Add '-s' option for display busload statistic, the output contains
minimal, maximum and exponentially-damped moving sums of one second
average (borrowed from Linux load average algorithm) since start or
reset (press 'r' while running).
canbusload 2024-09-23 17:15:18 (exact bitstuffing)
can0@500k 942 107535 60168 0 18% min: 0%, max: 21%, load: 16% 6% 2% |XXX.................|
Signed-off-by: Zhu Yi <yi.zhu5@cn.bosch.com >
Signed-off-by: Hubert Streidl <hubert.streidl@de.bosch.com >
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com >
Link: https://lore.kernel.org/r/20250120162332.19157-2-mark.jonas@de.bosch.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2025-01-20 18:01:10 +01:00
Zhu Yi and Marc Kleine-Budde
6eb97b57c5
cangen: support socket priority
...
Add '-P' option for allow user to set the socket priority. This can be
useful in conjuction with queuing discipline.
Signed-off-by: Zhu Yi <yi.zhu5@cn.bosch.com >
Signed-off-by: Hubert Streidl <hubert.streidl@de.bosch.com >
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com >
Link: https://lore.kernel.org/r/20250120162332.19157-1-mark.jonas@de.bosch.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
2025-01-20 18:01:10 +01:00
Marc Kleine-Budde and GitHub
fc1f6979c0
Merge pull request #568 from marckleinebudde/j1939
...
can-j1939-install-kernel-module: convert to Unix line endings and remove trailing whitespace
2024-12-11 15:02:35 +01:00
Marc Kleine-Budde
24e0c520b6
can-j1939-install-kernel-module: convert to Unix line endings and remove trailing whitespace
2024-12-11 15:01:58 +01:00
Marc Kleine-Budde and GitHub
06561ac3dc
Merge pull request #566 from marckleinebudde/canfdtest
...
canfdtest: compare_frame: add 0x prefix to indicate hex value
2024-12-11 11:03:12 +01:00
Marc Kleine-Budde
7093a73185
canfdtest: compare_frame: add 0x prefix to indicate hex value
2024-12-11 10:24:33 +01:00
Marc Kleine-Budde and GitHub
72f236e3ac
Merge pull request #565 from yegorich/fix-code-analysis-workflow
...
CI: fix codeql-analysis
2024-12-09 11:17:38 +01:00
Yegor Yefremov
3bbc8075eb
CI: fix codeql-analysis
...
v1 is deprecated. Thus, use the latest version v3 instead.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com >
2024-12-09 11:05:40 +01:00
Oliver Hartkopp and GitHub
6526683a10
Merge pull request #556 from hartkopp/master
...
Fix and rework canbusload
2024-08-09 15:02:26 +02:00
Oliver Hartkopp
dced0a6ec7
canbusload: fix and improve the bitrate output
...
With the introduction of CAN FD the bitrate has not been printed
correcty. Fix the CAN FD bitrate output and try to shrink the
bitrates by using kilo or Mega suffixes: 500000 -> 500k
Fixes: 6382765bf6 ("canbusload: count databitrate seperately")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2024-08-08 17:36:49 +02:00
Marc Kleine-Budde and GitHub
6c36d44c83
Merge pull request #555 from marckleinebudde/readme-update-link
...
README: update link to kernel documentation
2024-08-08 14:14:10 +02:00
Marc Kleine-Budde
7260844b73
README: update link to kernel documentation
...
The can.txt is obsolete, move to rendered html instead.
2024-08-08 14:06:59 +02:00
Oliver Hartkopp
be1fc77311
gitignore: add j1939-timedate-cli and j1939-timedate-srv
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2024-08-08 11:03:15 +02:00
Oliver Hartkopp
fc2473424e
canbusload: show RX/TX direction in bargraph
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2024-08-08 10:04:55 +02:00
Oliver Hartkopp
724e6f7c11
canbusload: use recvmsg() instead of recvfrom()
...
To access msg_flags for RX/TX direction detection.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2024-08-07 21:29:49 +02:00
Oliver Hartkopp
7665e1e236
canbusload: add auto detection of CAN interfaces
...
Rework to use a single CAN socket for the received CAN traffic.
This allows to shutdown and restart various CAN interfaces without
terminating the application.
Additionally an auto detection has been implemented with the 'any' CAN
interface. E.g. with any@500000,2000000 CAN interfaces that have not
been defined before are assigned with the given 'any' bitrates when a
CAN frame from this CAN interface has been received.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net >
2024-08-07 19:57:08 +02:00