Busybox CAN interface

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Busybox CAN interface

10,371 次查看
pastrana
Contributor III

Hi everybody,

I am working with the CAN interface on Linux distribution (Kernel 4.1.15) (my board has an i.MX6ul microprocessor) and I saw that the CAN interface can be controlled using the IP Linux command. And as well as a lot of people, when I try to set the bitrate using the following options:

   ip link set can0 up type can bitrate 125000

I received the next answer:

   ip: either "dev" is duplicate, or "type" is garbage

I saw that the reason of this error is that my IP command version does not implement the bitrate option, and the people recommend to install the "iproute2" package on Busybox (as it is said in this old post: Yocto busybox menuconfig). My IP command only displays:

   Usage: ip [OPTIONS] {address | route | link | tunnel | } {COMMAND}

However, also I saw in recent post such as:

That they are using the full IP command version and they can use the bitrate option.

on the other hand, I saw that iproute2 is discontinued and also there are people that do not recommend to install it, and recommend to keep the tiny version of IP.

Therefore, my question is the fllowing, should I install iproute2 ??(Taking into account that it does not appear on my Busyboox menuconfig) or is it possible to continue with my IP version and make the necessary changes using the file system (/sys/class/net/can0)??

any recommendation? How can I control the CAN interface? Is there any replacement for full IP command??

Thanks a lot and regards,

Javi

标签 (2)
3 回复数

7,443 次查看
pastrana
Contributor III

Hi everyone,

Finally I found a solution. I wrote it here in case someone has the same trouble.

As I said, I am using the 4.1.15 Kernel version and Busybox. You maybe have found this manual: CAN bus Linux driver. However, in my case Busybox do not have iproute2 package. Therefore, I cannot included as it is said that tutorial. Hence, the solution is "easy", to generate a package using Yocto. Afterwards install it.

My doubts continue being there, why it was removed iproute2 from Busybox? Has anyone found some malfunctioning?

Regards,

Javier.

0 项奖励
回复

7,443 次查看
b36401
NXP Employee
NXP Employee

As far as I know iproute2 is not as utility but set of ones like ifconfig, route and netstat.
Do you mean you have no them in your busybox?

Have a great day,
Victor

0 项奖励
回复

7,443 次查看
pastrana
Contributor III

Hi Victor,

As fas as I know Iproute2 is a set of utilities related with the interface network administration. It changes and extends some of the utilities which are used by tools such as route, ifconfig or arp.

The iproute2 package is not included into BusyboxTherefore, it must be included using Yocto, in my case.

My question was: There is any reason why iproute2 was removed from Busybox? There is any consequence for the rest of the network tools if is installed iproute2?

Have a nice day,

Javier.

0 项奖励
回复