PPM rcio RCinput not working with Navio+ and APM, Radio receiver goes green for Binding

So my rcio does not appear to be working at all. I get the “RC Not Calibrated” error. No RC response in apmplanner. Below is the output of a bunch of commands that may help diagnose problem. What am I missing? I am still new to the world of Quads and to Emlid.

hardware setup:
QUAD 450mm build, Raspberry2, Navio+ bolted on.
frsky x8r receiver <–> frsky sbus to cppm converter <–> navio+ PPM connection
Receiver power supplied by PPM connection, so cable installed with signal circuit wired correctly.

apmplanner2 does show the quad responding to movement of pitch yaw roll. So, yea, WiFi connection is working along with some of the sensors on Navio+.

The radio binds to the receiver on powerup. i.e. receiver goes green after a few flashes of red.
0 is response to “sudo cat /sys/kernel/rcio/status/live”

directory /sys/kernel/rcio/rcin shows 16 chx and connected files.
All only show “0” when “sudo cat”, move radio transmitter controls, still “0”

I downloaded the newest img from the emlid website. So latest RT image. What ever APM version that was on img.
uname -a
Linux navio 4.4.6-4d0ae01-emlid-v7+ #3 SMP PREEMPT Wed Apr 6 13:25:26 MSK 2016 armv7l GNU/Linux

output of lsmod:
Module Size Used by
btrfs 1023918 0
xor 5530 1 btrfs
xor_neon 2900 1 xor
raid6_pq 94084 1 btrfs
zlib_deflate 20290 1 btrfs
cpufreq_stats 3463 0
cfg80211 438534 0
rfkill 15930 2 cfg80211
rcio_spi 2576 0
rcio_core 2231 1 rcio_spi
8192cu 518065 0
rcio_rcin 2184 1 rcio_core
rcio_adc 1556 1 rcio_core
rcio_pwm 2711 1 rcio_core
rcio_status 1545 1 rcio_core
bcm2835_gpiomem 3036 0
i2c_bcm2708 4770 0
spi_bcm2835aux 4779 0
spi_bcm2835 7222 0
bcm2835_wdt 3225 0
uio_pdrv_genirq 3100 0
uio 8256 1 uio_pdrv_genirq
i2c_dev 5859 2

Is there any test software that will see what is coming in on the PPM port from the raspberry PI side of things?

Navio+ has no RCIO coprocessor. This feature was introduced with Navio2. PPM Input on Navio+ is handled by the DMA engine in the BCM processor.

Could you please post a photo of how the Navio, receiver and converter are connected?

Do you have a servo that you can plug into the receiver directly to test that it is working?

@mikhail.avkhimenia So the Navio+ has no RCIO coprocessor. Does Navio+ use the directory “/sys/kernel/rcio” for the PPM RC input?

I have attached two photos.
The first showing the FrskyConverter to Navio+PPM connection. Notice the Orange cable is the signal. Cable plugged into the PPM port of Navio+
The second is the X8R s-bus to FrskyConverter. ( Sorry. It is a lousy picture. My setup is not with me, I can get a better photo later if needed, let me know.) You can see the connector and Orange signal plugged into the s-bus of the X8R. The frskyConverter is the left bottom of the X8R. (The blurry blob)
If the Orange cable is the signal from end to end, it should be connected correctly.

Do I have a servo? No, but i do have the QBrain ESC. So I used the connector with the three wires to connect to the X8R receiver directly. I powered on my quad, transmitter and receiver, moved the sticks to find the one that operated the propeller less motor and success. The motor spun up and down as I moved the stick.

No.

What exactly do you mean? If use use Navio+, you should follow instruction for Navio+. Please, beware that debian packages for Navio+ and Navio2 are different.

What directories or files does Navio+ use for trouble shooting? It was mentioned above about DMA engine handling PPM input.

PPM Input on Navio+ is handled by the DMA engine in the BCM processor.

What exactly do you mean? If use use Navio+, you should follow
instruction for Navio+. Please, beware that debian packages for Navio+
and Navio2 are different.

@george.staroselskiy - I just investigated the difference in the two Navio+ and Navio2 docs. They are different. My comment that would have helped me is: Rename the images with “Navio+” “NavioPlus” or with “Navio2” inserted in the name. I saw “emlid raspberry” on a new image and download it. I believe you found my problem. I said I had a Navio+, but my Linux image is for the Navio2. Thank you @george.staroselskiy for your insight.

I some how downloaded a newer image that I thought was for the generic Emlid Raspberry PI. It appears I need fall back to the previous image i was using. My results should be better.

I downloaded the newest img from the emlid website. So latest RT image. What ever APM version that was on img.
uname -a
Linux navio 4.4.6-4d0ae01-emlid-v7+ #3 SMP PREEMPT Wed Apr 6 13:25:26 MSK 2016 armv7l GNU/Linux

The Raspbian image is the same. ArduPilot binaries are not. That’s why you need to install the Debian package I mentioned above.

so the “Linux navio 4.4.6-4…” (emlid-raspbian-20160408.img.xz) is okay for all Navio versions? (it is not listed in docs for Navio+, only the “emlid-raspberrypi2-raspbian-rt-20150401.img” is listed)

i have done the sudo wget ‘https://files.emlid.com/apm/apm.deb’ -O apm.deb before.

If the emlid-raspbian-20160408-img.xz is okay for Navio+, then I will start over with this img and do the downloads again.

Oh, sorry! We’ll update the docs. Yep, all the images are okay for all Navios.

I have loaded the new Linux RT raspbian for Raspberry PI 2 - Navio. No MD5SUM for validation.
Did the down load of APM for Navio+. Again no MD5SUM for validation. This auto restarted multiple times during download.

things did not work. APM would never stay running, no errors on terminal.
I tried out the Navio Examples for the various sensors/devices. built them.
pigpio.h was not found and failed the PPM decoder. So no test of PPM.
Most running programs failed. could not find the i2c or /dev/???.
The Gyro and GPS seemed to spit out data that may be valid.
I am not sure of what is connected to what. But seems like some kind of driver(s) not be loaded.

Any pointers to the direction to proceed?

The PPM example for Navio+ is broken but all others are expected to work.

ls -l /dev/i2c* doesn’t yield an output, does it?

Could you please try running it under gdb?

i.e. sudo gdb ArduCopter-quad

The moment it quits, you can get a backtrace by entering bt on the prompt. This is a very useful piece of information.

pi@quad:~ $ ls -l /dev/i2c*
ls: cannot access /dev/i2c*: No such file or directory
pi@quad:~ $ uname -a
Linux quad 4.4.6-4d0ae01-emlid-v7+ #3 SMP PREEMPT Wed Apr 6 13:25:26 MSK 2016 armv7l GNU/Linux

It seems like you’ve been playing around with some of the settings using raspi-config. Am I right?
Either way, I2C got turned off somehow. You need to enable it again. Please, check it one more time. Has the setup changed since you posted the lsmod output? If not, I suggest dmesg | grep -i i2c and look for a hint there.

yep, i did play around with raspi-config. expanded the filesystem, changed passwd, etc. went down the list. I told it to enable the i2c and spi.

I may have changed to much or not enough, so i made a new uSD card, fresh image with the emlid-raspbina-20160408.img
I only expanded the filesystem, changed the password, timezone and host name in raspi-config.
I also setup the wifi ssid and psk to match my AP. Need to check it still.

pi@quad:~ $ uname -a
Linux quad 4.4.6-4d0ae01-emlid-v7+ #3 SMP PREEMPT Wed Apr 6 13:25:26 MSK 2016 armv7l GNU/Linux
pi@quad:~ $ lsmod
Module Size Used by
cpufreq_stats 3463 0
cfg80211 438534 0
rfkill 15930 2 cfg80211
rcio_spi 2576 0
rcio_core 2231 1 rcio_spi
rcio_rcin 2168 1 rcio_core
rcio_adc 1556 1 rcio_core
rcio_pwm 2417 1 rcio_core
rcio_status 1453 1 rcio_core
bcm2835_gpiomem 3036 0
bcm2835_wdt 3225 0
spi_bcm2835aux 4779 0
spi_bcm2835 7222 0
i2c_bcm2708 4770 0
8192cu 518065 0
uio_pdrv_genirq 3100 0
uio 8256 1 uio_pdrv_genirq
i2c_dev 5859 0

Could you please try running the ls -l /dev/i2c* and examples on that fresh install.

If they work (all are expected to be working except PPM), try

  1. sudo apt-get install pigpio && sudo pigpiod
  2. Launch the PPM example
  3. Connect the receiver and check the RC input

This is a tedious process. Sorry for that.

pi@quad:~ $ ls -l /dev/i2c*
crw-rw---- 1 root i2c 89, 1 Aug 18 16:26 /dev/i2c-1

That looks a lot better. Note to self: Don’t mess with the raspi-config settings for i2c and spi
Now to try steps 1-3
sudo apt-get install pigpio && sudo pigpiod
E: Unable to locate package pigpio

Downloaded the Navio+ Examples. pigpio is still needed.
LED app looks cool.

Please, install the library using these instructions.

sudo apt-get update && sudo apt-get install pigpio has always worked for me. Try once more?

sudo apt-get install pigpio #did not work by itself again
BUT
sudo apt-get update && sudo apt-get install pigpio #Success
#This downloaded some pigpio and the Examples built using pigpio.h

I ran all the Examples. Most were good.
The PPM_decoder did not work for me.
I also tried the apmplanner2 with quad apm and RC tx/rx
The “RC not calibrated” keeps coming out.

So it looks like I am back to my original problem.
“PreArm: RC not calibrated”

What is the best way to proceed debugging this problem of mine?
work on the C++ Example of PPM_decoder or on apm on quad?

Are you completely sure you’re inserting a chord out of the receiver in PPM (and not AUX) on your Navio+? The photos are blurry, so I couldn’t put it out :frowning:

On the Navio+, i have the chord/cable inserted in the PPM. The AUX spot is empty. Sorry for the blurry pictures, from Moto E phone.

I have looked at the code for PPM-decoder.cpp
Can a jumper be made to set the signal line high or low? Does this need a pullup or pulldown resistor? and of what size?

The comment “PPM input on Navio’s 2.54 header” has “ppmInputGpio = 4”
Is this (4) the PI gpio number or a Navio offset number or Broadcom number or ?
What is the number scheme for AUX, PPM, 1, 2, 3, … 13 on the Navio+?

The “ppmChannelsNumber = 8” Does this matter? Questions I have: Is my X8R sBus transmitting 8 or 16? Would this need to be changed?

Is there a way to show any hits/pulses/edges coming in on the PPM?
I have already tested the receiver against the ESC. Motor spun up and down by stick action. I need to find some one with an oscilloscope, to make life easier.

I have the Navio+ and RaspberryPi2 screwed together. From another post, I will take it apart blow out the contacts and put it back together. See if this helps the situation.

Answers to questions from a month ago from myself, agibson1007:

  1. Can a jumper be made to set the signal line high or low? I made a jumper with a 22k resistor to pull the signal line up or down. i modified the PPM.cpp code to print out a message on the edge trigger function entry. No effect. I still need to see if the function is called on complete PPM message or just signal coming in.

  2. What is the number scheme for AUX, PPM, 1, 2, 3, … 13 on the Navio+?
    My speculation as to assignments and a few extra io points thrown in (please correct me if i am wrong and i will edit/update this):
    Navio+ AUX pins = ?
    Navio+ PPM signal pin = RPI_GPIO_4 = Pi 2.54 header pin7
    Navio+ PWM Output 1 = PCA9685 Channel 3
    Navio+ PWM Output 2 = PCA9685 Channel 4
    Navio+ PWM Output 3 = PCA9685 Channel 5
    Navio+ PWM Output 4 = PCA9685 Channel 6
    Navio+ PWM Output 5 = PCA9685 Channel 7
    Navio+ PWM Output 6 = PCA9685 Channel 8
    Navio+ PWM Output 7 = PCA9685 Channel 9
    Navio+ PWM Output 8 = PCA9685 Channel 10
    Navio+ PWM Output 9 = PCA9685 Channel 11
    Navio+ PWM Output 10 = PCA9685 Channel 12
    Navio+ PWM Output 11 = PCA9685 Channel 13
    Navio+ PWM Output 12 = PCA9685 Channel 14
    Navio+ PWM Output 13 = PCA9685 Channel 15
    RPI_GPIO_27= Pi 2.54 Header pin 13 = talk to Navio+ PCA9685
    Navio+ tri-LED Blue = PCA9685 Channel 0
    Navio+ tri-LED Green = PCA9685 Channel 1
    Navio+ tri-LED Red = PCA9685 Channel 2
    Navio+ A LED = ?
    Navio+ B LED = ?
    Navio+ C LED = ?

  3. The “ppmChannelsNumber”…? …? I looked at this, read a bunch, I am just going to leave it at 8 for now.

  4. Is there a way to show any hits/pulses/edges coming in on the PPM input? from #1 above i did modify PPM.cpp to show something when the edge function was triggered. Nothing came in. So I am still looking for some one with an oscilloscope.

  5. I have taken the Navio+ and the RaspberryPi2 apart. Put it back together. Still no response on the PPM input.

I need to find a proper way to shut down the RaspberryPI 2B, i wiped out my uSD card.