lbenthins / ecu-simulator

Tool that simulates some vehicle diagnostic services. It can be used to test OBD-II dongles or tester tools that support the UDS (ISO 14229) and ISO-TP (ISO 15765-2) protocols.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

insmod: ERROR: could not insert module ./net/can/can-isotp.ko: Unknown symbol in module

litaoxyz opened this issue · comments

When I sudo insmod ./net/can/can-isotp.ko ,terminal print “insmod: ERROR: could not insert module ./net/can/can-isotp.ko: Unknown symbol in module”.
The results of "dmesg | tail -n 1" is "can_isotp: Unknown symbol can_rx_register (err -2)".
I want to load this on raspiberry pi 3b+.

The result of "uname -a" is "Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux".
The result of "file net/can/can-isotp.ko" is "net/can/can-isotp.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=f52ef777e54005ea9204e616f0fb5a7335f543a8, not stripped
".
What should I do to solve this problem ? thanks.

When I sudo insmod ./net/can/can-isotp.ko ,terminal print “insmod: ERROR: could not insert module ./net/can/can-isotp.ko: Unknown symbol in module”.
The results of "dmesg | tail -n 1" is "can_isotp: Unknown symbol can_rx_register (err -2)".
I want to load this on raspiberry pi 3b+.

The result of "uname -a" is "Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux".
The result of "file net/can/can-isotp.ko" is "net/can/can-isotp.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=f52ef777e54005ea9204e616f0fb5a7335f543a8, not stripped
".
What should I do to solve this problem ? thanks.

After loaded can.ko by 'modprobe can-raw',problem solved. Thanks.

great!

I use it on raspberry pi3b+,under sudo command.
I use 'cansend can1 7df#020902' to get VIN, but there is no reply in isotpxxx.log and there is no consecutive frames except first reply frame in can_xxx.log.
I wonder if isotp isn't install correctly on my rpi3.

Could you tell me how you install isotp on your rpi3 ?

The logs of simulator starting is here.
2020-02-16T00:59:02.121 - ecu_simulator - INFO - Starting ECU-Simulator
2020-02-16T00:59:02.123 - ecu_simulator - INFO - Setting up CAN interface: can1
2020-02-16T00:59:02.127 - ecu_simulator - INFO - Loading ISO-TP module from: /lib/modules/4.19.75-v7+/extra/net/can/can-isotp.ko
not found in directory /lib/modules/4.19.75-v7+
" is wrong: invalid "bitrate" value

: No such file or directoryad module /lib/modules/4.19.75-v7+/extra/net/can/can-isotp.ko
[ 443.655288] can: isotp protocol (rev 20181217 alpha)
2020-02-16T00:59:26.698 - ecu_simulator - INFO - Receiving on OBD address 0x7df from 0x7e8 Request: 0x0902
2020-02-16T00:59:26.700 - ecu_simulator - INFO - Requested OBD SID 0x9: Request vehicle information
2020-02-16T00:59:26.702 - ecu_simulator - INFO - Requested PID 0x2: Vehicle Identification Number(VIN)
2020-02-16T00:59:26.704 - ecu_simulator - INFO - Sending to 0x7e8 Response: 0x4902005445535456494e30313233343536373839

According to your logs, the ecu-simulator receives the request (0902), processes it, and tries to response to 0x7e8. If you ran 'candump can1' in other terminal, you should see the first frame of the VIN response: can1 0x7e8 0x1014490200544553. You will not see the other frames, since 'cansend can1 7df#020902' just sends the request, but the ISO-TP and OBD protocols need more than that. To make your test works, you need to ran isotprecv (also part of can-utils) in other terminal:

Terminal 1: cansend can1 7df#020902

Terminal 2: isotprecv can1 -s 7e8 -d 7e0
I am not sure about -s and -d. If it does not work, try wit -s 7e0 -d 7e8.

Regarding the installation of the ISO-TP module, based on your logs, I think that you provided the wrong path: No such file or directoryad module /lib/modules/4.19.75-v7+/extra/net/can/can-isotp.ko . However, apparently you had loaded the module before. Therefore, the ecu-simulator was able to receive the request. If the ISO-TP module was not installed, the ecu-simulator does not do anything and exits.

According to your logs, the ecu-simulator receives the request (0902), processes it, and tries to response to 0x7e8. If you ran 'candump can1' in other terminal, you should see the first frame of the VIN response: can1 0x7e8 0x1014490200544553. You will not see the other frames, since 'cansend can1 7df#020902' just sends the request, but the ISO-TP and OBD protocols need more than that. To make your test works, you need to ran isotprecv (also part of can-utils) in other terminal:

Terminal 1: cansend can1 7df#020902

Terminal 2: isotprecv can1 -s 7e8 -d 7e0
I am not sure about -s and -d. If it does not work, try wit -s 7e0 -d 7e8.

Regarding the installation of the ISO-TP module, based on your logs, I think that you provided the wrong path: No such file or directoryad module /lib/modules/4.19.75-v7+/extra/net/can/can-isotp.ko . However, apparently you had loaded the module before. Therefore, the ecu-simulator was able to receive the request. If the ISO-TP module was not installed, the ecu-simulator does not do anything and exits.

Thank you. I use the isotprecv receive the consecutive frames in can_xxx.log.