Beaglebone black에서 CANbus 인터페이스를 불러올 수 없습니다.

Beaglebone black에서 CANbus 인터페이스를 불러올 수 없습니다.

시작 시 인터페이스를 자동으로 불러오기 위해 /etc/network/interfaces다음과 같이 파일을 편집했습니다.

debian@beaglebone:~$ sudo nano /etc/network/interfaces

그리고 파일 끝에 다음을 추가합니다.

auto can1
iface can1 inet manual
    pre-up /sbin/ip link set can1 type can bitrate 250000 #triple-sampling on restart-ms 100
    up /sbin/ifconfig can1 up
    down /sbin/ifconfig can1 down

$ sudo /sbin/ip link set can1 up type can bitrate 250000하지만 재부팅할 때 작동 하도록 하려면 여전히 작업을 수행해야 합니다 $ candump can1.

어떻게 해야 합니까?

[업데이트] 차이가 있을 경우를 대비해 이것은 내 전체 "/etc/network/interfaces/"입니다.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp
# Example to keep MAC address between reboots
#hwaddress ether DE:AD:BE:EF:CA:FE

##connman: ethX static config
#connmanctl services
#Using the appropriate ethernet service, tell connman to setup a static IP address for that service:
#sudo connmanctl config <service> --ipv4 manual <ip_addr> <netmask> <gateway> --nameservers <dns_server>

##connman: WiFi
#
#connmanctl
#connmanctl> tether wifi off
#connmanctl> enable wifi
#connmanctl> scan wifi
#connmanctl> services
#connmanctl> agent on
#connmanctl> connect wifi_*_managed_psk
#connmanctl> quit

console


auto can1
iface can1 inet manual
    pre-up /sbin/ip link set can1 type can bitrate 250000
    up /sbin/ifconfig can1 up
    down /sbin/ifconfig can1 down

[업데이트] 광산/boot/uEnv.txt

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.14.108-ti-r131
#uuid=
#dtb=am335x-boneblack-emmc-overlay.dtb

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo
uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo
#uboot_overlay_addr2=/lib/firmware/BB-UART4-RS485-00A0.dtbo
#uboot_overlay_addr3=/lib/firmware/BB-UART5-00A0.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

답변1

정말 미안해. 전체를 살펴보던 중 etc/network/interfaces이상한 줄을 발견했습니다.

console

auto can1그 선 바로 위에요 . 나는 이것이 누군가가 파일에 작성한 오타라고 생각합니다.

해당 줄을 제거하면 인터페이스가 원래 예상대로 시작됩니다.

다들 감사 해요

관련 정보