Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#684 - bug in kmod-can #5721

Closed
openwrt-bot opened this issue Apr 7, 2017 · 6 comments
Closed

FS#684 - bug in kmod-can #5721

openwrt-bot opened this issue Apr 7, 2017 · 6 comments
Labels

Comments

@openwrt-bot
Copy link

marconi:

When I installed "kmod-can-usb-8dev", I got an error from "kmod-can" :

root@ap121u:~# opkg install kmod-can-usb-8dev

Installing kmod-can-usb-8dev (4.4.50-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.0/targets/ar71xx/generic/packages/kmod-can-usb-8dev_4.4.50-1_mips_24kc.ipk

Installing kmod-can (4.4.50-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.0/targets/ar71xx/generic/packages/kmod-can_4.4.50-1_mips_24kc.ipk
Configuring kmod-can.
can-dev is already loaded

Configuring kmod-can-usb-8dev.

Collected errors:

  • pkg_run_script: package "kmod-can" postinst script returned status 255.
  • opkg_configure: kmod-can.postinst returned 255.

When I plugged in the device ( http://www.8devices.com/products/usb2can ), then "ip l" didn't look right :

7: can0: mtu 16 qdisc noop state DOWN qlen 10 link/[280]

I tried it on an "Onion Omega" with LEDE 17.01.0 , I got the same symptom as the AP121U.

When I tried it on an "Onion Omega" with "CHAOS CALMER (15.05.1)", it worked OK.

It's even broken with the "virtual CAN' device : kmod-can-vcan

Supply the following if possible:

  • Device problem occurs on

Both "Alfa AP121U" and "Onion Omega" showed the problem

  • Software versions of LEDE release, packages, etc.

LEDE Reboot (17.01.0, r3205-59508e3)

  • Steps to reproduce

install kmod-vcan :

opkg install kmod-can-vcan

notice kmod-can error message : "returned 255"

create virtual CAN interface :

ip link add dev vcan0 type vcan

print link info :

ip l

notice "link/[280]" (instead of "link/can"

@openwrt-bot
Copy link
Author

yousong:

Please check if the usb_8dev kmod was correctly inserted. The following info can be helpful

  • Output of command "lsmod | grep usb_8dev"
  • "dmesg | tail -n32" after the opkg install command finished with error message about exit code 255
  • Output of command "modprobe usb_8dev"

@openwrt-bot
Copy link
Author

marconi:

This has nothing to do with the usb_8dev hardware (the problem exists on the virtual interface : vcan).

FYI, this is still a problem on Reboot (17.01.1, r3316-7eb58cf109) :

root@oo0:/# opkg install kmod-can-vcan Installing kmod-can-vcan (4.4.61-1) to root... Downloading http://downloads.lede-project.org/releases/17.01.1/targets/ar71xx/generic/packages/kmod-can-vcan_4.4.61-1_mips_24kc.ipk Installing kmod-can (4.4.61-1) to root... Downloading http://downloads.lede-project.org/releases/17.01.1/targets/ar71xx/generic/packages/kmod-can_4.4.61-1_mips_24kc.ipk Configuring kmod-can. [ 77.257909] can: controller area network core (rev 20120528 abi 9) [ 77.262785] NET: Registered protocol family 29 [ 77.279625] CAN device driver interface can-dev is already loaded Configuring kmod-can-vcan. [ 77.398133] vcan: Virtual CAN interface driver Collected errors: * pkg_run_script: package "kmod-can" postinst script returned status 255. * opkg_configure: kmod-can.postinst returned 255. root@oo0:/# ip link add dev vcan0 type vcan root@oo0:/# ip l 1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: mtu 1500 qdisc fq_codel state DOWN qlen 1000 link/ether 40:a3:6b:c1:08:f9 brd ff:ff:ff:ff:ff:ff 4: wlan0: mtu 1500 qdisc noqueue state UP qlen 1000 link/ether 40:a3:6b:c1:08:fa brd ff:ff:ff:ff:ff:ff 5: vcan0: mtu 16 qdisc noop state DOWN qlen 1 link/[280]

@openwrt-bot
Copy link
Author

yousong:

Hi, this is indeed caused by a flaw of modprobe within 17.01. The issue was already fixed in master branch but did not get backported yet.

As for the link/[280] issue, it was probably caused by the fact that busybox ip utility does not recognise the link type. Installing ip-full should solve the it. This is a relatively minor one.

To temporarily get around the first issue, you can edit /lib/functions.sh and insert a call to "true" at the end of "insert_modules" function. This is ugly hack of course...

I will propose in the mailing list to at least add a patch for ubox utility of 17.01

@openwrt-bot
Copy link
Author

marconi:

Awesome !

I tried your "get around / ugly hack" and it seems to work : I installed kmod-can-usb-8dev and plugged the device in and seems to work :

[ 2848.089761] usb 1-1: new full-speed USB device number 2 using ehci-platform
[ 2848.309757] usb 1-1: device descriptor read/64, error -71
[ 2848.588980] usb_8dev 1-1:1.0 can0: firmware: 1.7, hardware: 1.0

I'll test more when I can get access to a CANbus (modern cars and boats use CANbus).

I also installed "ip-full" and the "link/[280]" output becomes "link/can"

Thanks !

@openwrt-bot
Copy link
Author

yousong:

I just check with mips_24kc, the new fixed ubox package is now available. "opkg install ubox" should bring it up to date.

@openwrt-bot
Copy link
Author

marconi:

That works.

I did "opkg upgrade ubox" and then "opkg install kmod-can" and there was no error.

FYI, "opkg install kmod-can-usb-8dev" installs the CANbus device driver and plugging the device in shows "usb_8dev 1-1:1.0 can0: firmware: 1.7, hardware: 1.0" in dmesg.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant