apollo icon indicating copy to clipboard operation
apollo copied to clipboard

NTCAN_NET_NOT_FOUND - CAN device not present

Open lyletbjohnson opened this issue 8 years ago • 12 comments

I'm working with the up-to-date repo and have issues with the canbus module. I'm experiencing another issue, detailed in #2779 which may be related.

Background

This vehicle has successfully run Apollo 2.0 in recent past (~2 months). Due to updates to the repo, or an unintentional bump to the configuration the canbus module reports the errors detailed below.

I'm using the recommended / default hardware and software; no additional components.

Troubleshooting

  1. Both the host machine and docker container show that the ESD CAN channels, enumerated as /dev/can*
$ ls -l /dev/can*
crw-rw-rw- 1 root root 52, 0 Apr  6 16:03 /dev/can0
crw-rw-rw- 1 root root 52, 1 Apr  6 16:03 /dev/can1
crw-rw-rw- 1 root root 52, 2 Apr  6 16:03 /dev/can2
crw-rw-rw- 1 root root 52, 3 Apr  6 16:03 /dev/can3

Question 1.1: Is it possible for the Apollo system to create these device handles without the hardware being present?

When I check lspci, there are no entries with the string esd or ESD. Question 1.2: Is this expected?

  1. CAN libraries exist within third_party/can_card_library/esd_can; here's the directory tree, per the README.
.
├── BUILD
├── esd_can.tar
├── include
│   └── ntcan.h
├── lib
│   ├── libntcan.so
│   ├── libntcan.so.4 -> libntcan.so
│   └── libntcan.so.4.0.1 -> libntcan.so
└── README.md

Can someone please confirm the symbolic links point to the correct location? I find it strange that they both point to the libntcan.so library.

  1. Upon starting the canbus module with ./scripts/canbus.sh start, I receive the following in the data/log/canbus.INFO log
$ tail -f  data/log/canbus.INFO 
I0406 18:23:09.857515  3765 canbus.cc:93] The vehicle controller is successfully created.
I0406 18:23:09.857519  3765 can_sender.h:352] Add send message:60
I0406 18:23:09.857524  3765 can_sender.h:352] Add send message:62
I0406 18:23:09.857528  3765 can_sender.h:352] Add send message:64
I0406 18:23:09.857532  3765 can_sender.h:352] Add send message:66
I0406 18:23:09.857537  3765 can_sender.h:352] Add send message:68
I0406 18:23:09.857540  3765 lincoln_controller.cc:117] Controller is initialized.
I0406 18:23:09.857543  3765 canbus.cc:99] The vehicle controller is successfully initialized.
E0406 18:23:09.858793  3765 esd_can_client.cc:63] open device error code [19]: NTCAN_NET_NOT_FOUND - CAN device not present
E0406 18:23:09.885854  3765 apollo_app.cc:64] canbus Start failed: CANBUS_ERROR: Failed to start can client

lyletbjohnson avatar Apr 06 '18 23:04 lyletbjohnson

Note: I'm also using this public guide to aid in troubleshooting, though I haven't been able to find any inconsistencies between my Apollo 2.0 instance and this documentation:

  • http://www.esd-electronics-usa.com/shared/handbooks/CAN-API_Part2_Installation_Manual.pdf

lyletbjohnson avatar Apr 07 '18 00:04 lyletbjohnson

Troubleshooting update

On my host machine, I find the following in the /var/log/dmesg log:

./dmesg:[    7.844778] esdcan_pcie402: module license 'Proprietary' taints kernel.
./dmesg:[    7.845035] esd CAN driver: init start
./dmesg:[    7.845074] esd CAN driver: Version: 0x00003A03
./dmesg:[    7.845075] esd CAN driver: No esd CAN card found!
./dmesg.0:[    7.859051] esdcan_pcie402: module license 'Proprietary' taints kernel.
./dmesg.0:[    7.859406] esd CAN driver: init start
./dmesg.0:[    7.859448] esd CAN driver: Version: 0x00003A03
./dmesg.0:[    7.859449] esd CAN driver: No esd CAN card found!

I located the kernel module to further troubleshoot.

/lib/modules/4.4.32-apollo-3-RT/kernel/drivers/esdcan/esdcan-pcie402.ko

When I try to load the module, it complains that there is No such device.

$ sudo insmod /lib/modules/4.4.32-apollo-3-RT/kernel/drivers/esdcan/esdcan-pcie402.ko
insmod: ERROR: could not insert module /lib/modules/4.4.32-apollo-3-RT/kernel/drivers/esdcan/esdcan-pcie402.ko: No such device
  1. Have there been reports of the ESD CAN cards failing?

  2. Has this been seen by the Apollo team?

  3. I am unsure how to approach the following: ./dmesg:[ 7.844778] esdcan_pcie402: module license 'Proprietary' taints kernel.. Can anyone offer insight here? I'm not aware of a license file for ESD CAN; just a software agreement to receive the source code / libraries.

lyletbjohnson avatar Apr 07 '18 00:04 lyletbjohnson

@lyletbjohnson Is looks to me more like a hardware connection or a kernel level problem if you can see nothing with lspci, please correct me if I am wrong. @quning78 .

Capri2014 avatar Apr 07 '18 23:04 Capri2014

Hey @Capri2014, I'll go ahead and test with a new card.

Can you / Apollo team still confirm the following open questions? (1.1), 1.2), (2), (5), (6), and (7) need to be answered.

lyletbjohnson avatar Apr 10 '18 20:04 lyletbjohnson

Seems more like a hardware issue, have you tried different can card?

quning18 avatar Apr 12 '18 08:04 quning18

1.1 I believe the can* are created by mknod command, they will be there even if there is no actually CAN devices. 1.2 lspci, you should see a device from ESD. Since you don't seem to see it. It seems to be your PCIe slot is not seeing the CAN card. 2. that seems to be the same as what I have 5. We have observed issues "the CAN card cannot be found" happened before. We fixed it when we got a BIOS update from Neousys(our IPC vendor). Are you using Nuvo6108GC? If so, can you tell us the BIOS version (hit F2 while starting up the IPC)?

YangHan101 avatar Apr 16 '18 22:04 YangHan101

I'll have an update for this thread soon -- I'm awaiting new hardware to validate our findings.

Thanks for the continued support!

lyletbjohnson avatar Apr 18 '18 22:04 lyletbjohnson

@lyletbjohnson Do you have any update on the thread? :)

Zhenni17 avatar Jun 29 '18 23:06 Zhenni17

When I use Conti radar to connect CAN card, and run ./scripts/conti_radar.sh start, I meet the same error log :E0725 15:20:12.160176 24327 esd_can_client.cc:69] open device error code [19]: NTCAN_NET_NOT_FOUND - CAN device not present

chexiaoyu avatar Jul 25 '18 07:07 chexiaoyu

@chexiaoyu, maybe you should open a separate issue.

Do you have an Esd can card installed? Do you have the driver installed as well? Can you post the result of "lspci -tv"?

YangHan101 avatar Jul 26 '18 23:07 YangHan101

Well,I change “CHANNEL_ID_ONE” to “CHANNEL_ID_ZERO” ,and solve the problem.Thank you.

获取 Outlook for iOShttps://aka.ms/o0ukef


收件人: Yang Han [email protected] 发送时间: 星期五, 七月 27, 2018 07:56 收件人: ApolloAuto/apollo 抄送: chexiaoyu; Mention 主题: Re: [ApolloAuto/apollo] NTCAN_NET_NOT_FOUND - CAN device not present (#3755)

@chexiaoyuhttps://github.com/chexiaoyu, maybe you should open a separate issue.

Do you have an Esd can card installed? Do you have the driver installed as well? Can you post the result of "lspci -tv"?

― You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ApolloAuto/apollo/issues/3755#issuecomment-408270005, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ab5EuiF_KeLkHULcxbwIqaNna2lAorAEks5uKlcagaJpZM4TK1Il.

chexiaoyu avatar Jul 27 '18 01:07 chexiaoyu

@chexiaoyu Thanks for the update. @lyletbjohnson I am closing the ticket. If you have more update, please feel free to reopen.

YangHan101 avatar Jul 27 '18 22:07 YangHan101