"PreArm: VisOdom: not healty" Error in Non GPS geolocalization with Intel RealSense T265

I can’t use raspi-config, the pre-built Is on Ubuntu 18, not on raspbian.

I tryied to do it by hand but I probably messed up something. Do you have a working guide for this step on Ubuntu? The ones I tryied didn’t work well.

Thank both for your help!

You should test the serial portt with a terminal app like minicom, and connect to PC using usb to serial adaptor to make sure the communication works and the port is correctly assigned

I don’t have a serial0 port. I just managed to install raspi-config but even following the instructions from here, I still didn’t have serial0.

I guess it doesn’t work at all on Ubuntu.

It works under UBUNTU but it is a pain to set the serial port, I dont have a UBUNTU load handy but googling a bit shows different method and the most important for you is going to basic == a simple test with minicom as loop back or with a PC.

Ok, I tryied:
NO LOOP: Without the loop minicom shows nothing, not even what I type in, so echo is disabled.
ttyS0: With the loop I get random characters over time, but even the one I type in.
ttyAMA0: Nothing, not even the ones I type in.

Which one I’m going to use and what’s the expected behaviour?

My problem is that the guide talk about serial0, but I can’t understand how to set it up without raspi-config, because I already tryied installing raspi-config on Ubuntu, and it seem to work, but after the procedure, I didn’t have a serial0 port under /dev.

BTW if I connect the cables from pixhawk I get random characters too.

Thank you very much for your help!

Ahh, Ubuntu is a bit different. Raspi-config isn’t used in Ubuntu.

I think /dev/ttyAMA0 may be the correct port and is enabled as a serial console by default. You may need to disable the console via sudo perl -pe 's/console=serial0,115200//' -i /boot/firmware/cmdline.txt and rebooting.

Then try using /dev/ttyAMA0 to connect to the Pixhawk.

I can’t, cmdline.txt doesn’t exists, nor even serial0.

config.txt:

# Please DO NOT modify this file; if you need to modify the boot config, the
# "usercfg.txt" file is the place to include user changes. Please refer to
# the README file for a description of the various configuration files on
# the boot partition.

# The unusual ordering below is deliberate; older firmwares (in particular the
# version initially shipped with bionic) don't understand the conditional
# [sections] below and simply ignore them. The Pi4 doesn't boot at all with
# firmwares this old so it's safe to place at the top. Of the Pi2 and Pi3, the
# Pi3 uboot happens to work happily on the Pi2, so it needs to go at the bottom
# to support old firmwares.

[pi4]
kernel=uboot_rpi_4.bin
max_framebuffers=2

[pi2]
kernel=uboot_rpi_2.bin

[pi3]
kernel=uboot_rpi_3.bin

[all]
arm_64bit=1
device_tree_address=0x03000000

# The following settings are "defaults" expected to be overridden by the
# included configuration. The only reason they are included is, again, to
# support old firmwares which don't understand the "include" command.

enable_uart=1
cmdline=nobtcmd.txt

include syscfg.txt
include usercfg.txt

nobtcmd.txt:

net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc

syscfg.txt:

# This file is intended to contain system-made configuration changes. User
# configuration changes should be placed in "usercfg.txt". Please refer to the
# README file for a description of the various configuration files on the boot
# partition.

#dtparam=i2c_arm=off
dtparam=i2c_arm=on
dtparam=spi=on

include nobtcfg.txt

usercfg.txt:

# Place "config.txt" changes (dtparam, dtoverlay, disable_overscan, etc.) in
# this file. Please refer to the README file for a description of the various
# configuration files on the boot partition.

# Power switch
#dtoverlay=gpio-shutdown
#dtoverlay=gpio-poweroff

nobtcfg.txt:

# This configuration file sets the system up to support the serial console on
# GPIOs 14 & 15. This is the default for Ubuntu on the Pi, but disables the use
# of the Bluetooth module.
#
# If you wish to disable the serial console and use Bluetooth instead, install
# the "pi-bluetooth" package then edit "syscfg.txt" to include "btcfg.txt"
# instead of "nobtcfg.txt"

enable_uart=1
cmdline=nobtcmd.txt
#dtoverlay=pi3-disable-bt

your bluetooth is not disabled in the nobtcfg.txt

The name of the file is nobt*, I intended it as noBlueTooth.
Anyway already tryied to uncomment the line:

dtoverlay=pi3-disable-bt

but I get a lot of spam and the console became pretty useless, it even reboot after a minute or two.
I tryed changing it this way:

dtoverlay=disable-bt

same spam.

I had to change it from the sd on another pc to fix it commenting that line again.

I guess the spam is the console that is assigned by default or Mavlink Message that is binary… ,anyway you can take a look at it:

I followed the instruction in the answer, this way I managed to create /dev/serial0 (ttyS0) and /dev/serial1 (ttyAMA0).

I removed “console=ttyAMA0,115200” from /boot/firmware/nobtcmd.txt

this line is still commented, because if I try to uncomment it, even changing it to “disable-bt”, I get stucked in the boot.

> #dtoverlay=pi3-disable-bt

With the loop test on serial0 I get what I type in and random chars.

In /home/apsync/Github/companion/RPI2/Ubuntu/mavlink-router.conf I have:
*** [UartEndpoint to_fc] Device = /dev/serial0 Baud = 115200 ***

The script /home/apsync/start_t265_to_mavlink/t265_to_mavlink.py doesn’t works.

python3 t265_to_mavlink.py --connect /dev/serial0 --baudrate 115200

gives

Connection Error! Retrying...

I’m out of ideas. It shouldn’t be so hard to do, I really can’t understand why it doesn’t work…

Hi @FaMaFortesque,

If you’re using an RPI4 the pre-built image should just work.

You’re using an RPI4 with a 2GB or 4GB of RAM (not 8GB) and the SD card is at least 16GB?

Yes, Raspberry Pi 4, model B 4GB RAM.
32 or 64 GB SD, I switch every time I restart.

Is this the expected behaviour on boot?
[FAILED] Failed to start Load Kernel Modules
See ‘systemctl status systemd-modules-load.service’ for details

I don’t use Pi lite connect, I connect directly serial2 with GPIO 14 and 15.

Thank you for your help!

@FaMaFortesque,

I haven’t checked the console so I’m not sure if any errors appear on startup. It should work though. I wonder if it is a power problem.

If I remember right, power supply should be 5.1 Volts. I need to check it out.

EDIT

Yes, I was right: 5.1 volts. It should be enougth

I tried again, with a clean image, fresh installed. I powered the RPI4 with a USB-C cable providing 5V and 3A, same results.

Is there a way to understand if there is an hardware problem?