Navio2 duty_cycle file missing

I’m getting:

pi@navio:~ $ sudo ArduCopter-quad -A udp:192.168.86.105:14550 
Could not detect RPi version, defaulting to 1
LinuxPWM_Sysfs: chip=0 channel=0 Unable to open file /sys/class/pwm/pwmchip0/pwm0/duty_cycle: No such file or directory

You are probably not using latest sd-card image for Navio2 and most recent apm deb package.

See this post [Solved] Kernel pwm driver

I grabbed it right from the current documentation just an hour before posting this, but thanks for the link to the thread!

@mrdoornbos

Sorry, the version for Raspberry Pi 1 hasn’t been tested much lately. That’s why we highly recommend our customers to use Raspberry Pi 2.

The image will be updated either way, but that’s not a priority right now.

This is on a Pi 2…

Could you please provide an output of the following commands?

uname -a
lsmod

I’m getting the same error. This is on a raspberry pi 2.

pi@navio:~/ardupilot/ArduCopter $ sudo ./ArduCopter.elf -A udp:192.168.1.2:14550
Raspberry Pi 2 with BCM2709!
LinuxPWM_Sysfs:Unable to open file /sys/class/pwm/pwmchip0/pwm0/duty_cycle: No such file or directory

pi@navio:~/ardupilot/ArduCopter $ uname -a
Linux navio 4.1.20-v7+ #867 SMP Wed Mar 23 20:12:32 GMT 2016 armv7l GNU/Linux
pi@navio:~/ardupilot/ArduCopter $ lsmod
Module Size Used by
cpufreq_stats 3283 0
arc4 1718 2
rt2800usb 17370 0
rt2800lib 71591 1 rt2800usb
rt2x00usb 8480 1 rt2800usb
rt2x00lib 36641 3 rt2x00usb,rt2800lib,rt2800usb
mac80211 524361 3 rt2x00lib,rt2x00usb,rt2800lib
cfg80211 407580 2 mac80211,rt2x00lib
crc_ccitt 1142 1 rt2800lib
rfkill 16036 2 cfg80211
bcm2835_rng 1763 0
bcm2835_gpiomem 2860 0
spi_bcm2835 7074 0
i2c_bcm2708 4920 0
uio_pdrv_genirq 2944 0
uio 7753 1 uio_pdrv_genirq
i2c_dev 5671 0
ipv6 338724 36

Daniel, have you built Arducopter yourself or used our .deb package?

I downloaded the .deb file and also built it myself. I get the same result either way. One thing I did see was that my /sys/class/pwm folder is emtpy.

@katrask

You shouldn’t have apt-get upgrade which upgrades the kernel to the newer version. We use a modified kernel which differs from the Raspberry Pi Foundation’s one. That’s why you get the error.

So I suggest to reflash the SD card. We’re almost there on the update of the image of the distribution. Stay tuned. But if you want to test right away you cannot upgrade. Once more, it’ll be fixed in a couple of days.

Alright, thank you for the quick response.