Sentinel PX4 ( NO GPs Lock and firmware problem )
-
@tom Or outside of the adb shell do
adb pull /tmp/test.txt .
to pull it off and upload that file here -
@Samer-Jaradat said in Sentinel PX4 ( NO GPs Lock and firmware problem ):
gps start -d 7 -b 115200
Please change the line
qshell gps start -d 7 -b 115200
in/etc/modalai/voxl-px4.config
toqshell gps start
and see if that solves the GPS issue, -
no txt file created after do this command on my computer / tmp
-
@Samer-Jaradat Don't worry about the text file. You pasted the output directly into the forum so that's just as good.
-
@Eric-Katzfey
adb shell creat this result after do this command.voxl2:/$ /etc/modalai/voxl-px4.config
bash: /etc/modalai/voxl-px4.config: Permission denied -
@Samer-Jaradat Don't try to execute that file directly. It is used by px4. Just edit it, save it, and then reboot your drone.
-
OK, but i don't know how we can edit it,
please tell me how i can edit it and save it. -
@Samer-Jaradat Please find a tutorial online about using the program
vi
to edit files in Linux. -
when i open vi program this is the result as shown on my pc i cant show the command that need to editing
GNU nano 2.9.3 /etc/modalai/voxl-px4.config
#!/bin/sh
PX4 commands need the 'px4-' prefix in bash.
(px4-alias.sh is expected to be in the PATH)
Figure out what platform we are running on.
Eventually there will be a utility called voxl-platform that will
return the platform tag or an error code. This utility is not yet
ubiquitous so it may be that it isn't available. Trying to call a
non existent program will generate an error code by the OS. If the
program exists and doesn't return an error code then use the results.
PLATFORM=
/usr/bin/voxl-platform 2> /dev/null
RETURNCODE=$?
if [ $RETURNCODE -ne 0 ]; then
# If we couldn't get the platform from the voxl-platform utility then check
# /etc/version to see if there is an M0052 substring in the version string.$
# then we assume that we are on M0052. Otherwise assume M0054.
VERSIONSTRING=$(</etc/version)
[ Read 271 lines ]
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos
^X Exit ^R Read File ^\ Replace ^U Uncut Text^T To Linter ^_ Go To Line -
@Eric-Katzfey
this is file open when i use vi program ( no command qshell gps start -d 7 -b 115200 in script file )
this is all file command :#!/bin/sh
PX4 commands need the 'px4-' prefix in bash.
(px4-alias.sh is expected to be in the PATH)
Figure out what platform we are running on.
Eventually there will be a utility called voxl-platform that will
return the platform tag or an error code. This utility is not yet
ubiquitous so it may be that it isn't available. Trying to call a
non existent program will generate an error code by the OS. If the
program exists and doesn't return an error code then use the results.
PLATFORM=
/usr/bin/voxl-platform 2> /dev/null
RETURNCODE=$?
if [ $RETURNCODE -ne 0 ]; then
# If we couldn't get the platform from the voxl-platform utility then check
# then we assume that we are on M0052. Otherwise assume M0054.
VERSIONSTRING=$(</etc/version)
M0052SUBSTRING="M0052"
if [[ "$VERSIONSTRING" == "$M0052SUBSTRING" ]]; then
PLATFORM="M0052"
else
PLATFORM="M0054"
fi
fiWe can only run on M0052 or M0054 so exit with error if that is not the case
if [ $PLATFORM = "M0052" ]; then
/bin/echo "Running on M0052"
if [ "$RC" == "CRSF" ]; then
/bin/echo "Error, crossfire not supported on M0052!"
exit 0
fi
elif [ $PLATFORM = "M0054" ]; then
/bin/echo "Running on M0054"
else
/bin/echo "Error, cannot determine platform!"
exit 0
fiuorb start
muorb startIn order to just exit after starting the uorb / muorb modules define
the environment variable MINIMAL_PX4. (e.g. export MINIMAL_PX4=1)
This is useful for testing / debug where you may want to start drivers
and modules manually from the px4 command shell
if [ ! -z $MINIMAL_PX4 ]; then
/bin/echo "Running minimal script"
exit 0
fi#!/bin/sh
PX4 commands need the 'px4-' prefix in bash.
(px4-alias.sh is expected to be in the PATH)
Figure out what platform we are running on.
Eventually there will be a utility called voxl-platform that will
return the platform tag or an error code. This utility is not yet
ubiquitous so it may be that it isn't available. Trying to call a
non existent program will generate an error code by the OS. If the
program exists and doesn't return an error code then use the results.
PLATFORM=
/usr/bin/voxl-platform 2> /dev/null
RETURNCODE=$?
if [ $RETURNCODE -ne 0 ]; then
# If we couldn't get the platform from the voxl-platform utility then check
# then we assume that we are on M0052. Otherwise assume M0054.
VERSIONSTRING=$(</etc/version)
M0052SUBSTRING="M0052"
if [[ "$VERSIONSTRING" == "$M0052SUBSTRING" ]]; then
PLATFORM="M0052"
else
PLATFORM="M0054"
fi
fiWe can only run on M0052 or M0054 so exit with error if that is not the case
if [ $PLATFORM = "M0052" ]; then
/bin/echo "Running on M0052"
if [ "$RC" == "CRSF" ]; then
/bin/echo "Error, crossfire not supported on M0052!"
exit 0
fi
elif [ $PLATFORM = "M0054" ]; then
/bin/echo "Running on M0054"
else
/bin/echo "Error, cannot determine platform!"
exit 0
fiuorb start
muorb startIn order to just exit after starting the uorb / muorb modules define
the environment variable MINIMAL_PX4. (e.g. export MINIMAL_PX4=1)
This is useful for testing / debug where you may want to start drivers
and modules manually from the px4 command shell
if [ ! -z $MINIMAL_PX4 ]; then
/bin/echo "Running minimal script"
exit 0
fiSleep a little here. A lot happens when the uorb and muorb start
and we need to make sure that it all completes successfully to avoid
any possible race conditions.
/bin/sleep 1
IMU (accelerometer / gyroscope)
Start this first because it gets the high rate interrupts coming in to the
DSP. Without this the DSP will oversleep and miss critical timeouts.
TODO: Why is that the case?
if [ "$IMU" == "ROTATE_IMU_YAW_180" ]; then
/bin/echo "Starting IMU driver with yaw 180 rotation"
qshell icm42688p start -s -R 4
else
qshell icm42688p start -s
fi/bin/sleep 1
Load in all of the parameters that have been saved in the file
param load
Start logging and use timestamps for log files when possible.
Add the "-e" option to start logging immediately. Default is
to log only when armed
logger start -t
We do not change the value of SYS_AUTOCONFIG but if it does not
show up as used then it is not reported to QGC and we get a
#!/bin/sh
PX4 commands need the 'px4-' prefix in bash.
(px4-alias.sh is expected to be in the PATH)
Figure out what platform we are running on.
Eventually there will be a utility called voxl-platform that will
return the platform tag or an error code. This utility is not yet
ubiquitous so it may be that it isn't available. Trying to call a
non existent program will generate an error code by the OS. If the
program exists and doesn't return an error code then use the results.
PLATFORM=
/usr/bin/voxl-platform 2> /dev/null
RETURNCODE=$?
if [ $RETURNCODE -ne 0 ]; then
# If we couldn't get the platform from the voxl-platform utility then check
# then we assume that we are on M0052. Otherwise assume M0054.
VERSIONSTRING=$(</etc/version)
M0052SUBSTRING="M0052"
if [[ "$VERSIONSTRING" == "$M0052SUBSTRING" ]]; then
PLATFORM="M0052"
else
PLATFORM="M0054"
fi
fiWe can only run on M0052 or M0054 so exit with error if that is not the case
if [ $PLATFORM = "M0052" ]; then
/bin/echo "Running on M0052"
if [ "$RC" == "CRSF" ]; then
/bin/echo "Error, crossfire not supported on M0052!"
exit 0
fi
elif [ $PLATFORM = "M0054" ]; then
/bin/echo "Running on M0054"
else
/bin/echo "Error, cannot determine platform!"
exit 0
fiuorb start
muorb startIn order to just exit after starting the uorb / muorb modules define
the environment variable MINIMAL_PX4. (e.g. export MINIMAL_PX4=1)
This is useful for testing / debug where you may want to start drivers
and modules manually from the px4 command shell
if [ ! -z $MINIMAL_PX4 ]; then
/bin/echo "Running minimal script"
exit 0
fiSleep a little here. A lot happens when the uorb and muorb start
and we need to make sure that it all completes successfully to avoid
any possible race conditions.
/bin/sleep 1
IMU (accelerometer / gyroscope)
Start this first because it gets the high rate interrupts coming in to the
DSP. Without this the DSP will oversleep and miss critical timeouts.
TODO: Why is that the case?
if [ "$IMU" == "ROTATE_IMU_YAW_180" ]; then
/bin/echo "Starting IMU driver with yaw 180 rotation"
qshell icm42688p start -s -R 4
else
qshell icm42688p start -s
fi/bin/sleep 1
Load in all of the parameters that have been saved in the file
param load
Start logging and use timestamps for log files when possible.
Add the "-e" option to start logging immediately. Default is
to log only when armed
logger start -t
We do not change the value of SYS_AUTOCONFIG but if it does not
show up as used then it is not reported to QGC and we get a
missing parameter error.
param touch SYS_AUTOCONFIG
Start all of the device drivers on DSP
Magnetometer
if [ "$GPS" == "MATEK" ]; then
# Use this line for the magnetometer in the Matek Systems M8Q-5883 module
/bin/echo "Starting Mateksys M8Q-5883 magnetometer"
qshell qmc5883l start -R 10 -X -b 1
elif [ "$GPS" == "HERE3" ]; then
# Use this line for the magnetometer in the Here3 GPS module
/bin/echo "Starting Here3 ak09916 magnetometer"
qshell ak09916 start -R 2 -X
else
# Use this line for the magnetometer in the Holybro GPS module
/bin/echo "Starting Holybro magnetometer"
qshell ist8311 start -R 10 -X -b 1
fiLED driver for the Pixhawk 4 GPS module
Older units have i2c address 0x39 (57) and newer ones 0x38 (56)
M0054 only supports the newer one. M0052 can support either.
if [ $PLATFORM = "M0052" ]; then
qshell rgbled_ncp5623c start -X -b 1 -f 400 -a 57
fi
102,18 33%
# Use this line for the magnetometer in the Here3 GPS module
/bin/echo "Starting Here3 ak09916 magnetometer"
qshell ak09916 start -R 2 -X
else
# Use this line for the magnetometer in the Holybro GPS module
/bin/echo "Starting Holybro magnetometer"
qshell ist8310 start -R 10 -X -b 1
fiLED driver for the Pixhawk 4 GPS module
Older units have i2c address 0x39 (57) and newer ones 0x38 (56)
M0054 only supports the newer one. M0052 can support either.
if [ $PLATFORM = "M0052" ]; then
qshell rgbled_ncp5623c start -X -b 1 -f 400 -a 57
fi
if [ "$GPS" == "HOLYBRO" ]; then
/bin/echo "Starting Holybro LED driver"
qshell rgbled_ncp5623c start -X -b 1 -f 400 -a 56
elif [ "$GPS" == "HERE3" ]; then
# Use this line for the Here3 GPS module LED controller
/bin/echo "Starting Here3 LED"
qshell rgbled start -X -f 400
fiBarometer
qshell icp10100 start -I -b 5
ESC driver
We start this even if there is a PX4IO module. If there is
a PX4IO (M0065) module it will be plugged into the RC port
117,1 39%
-
@Eric-Katzfey
this is our GPS status right nowINFO [muorb] SLPI: qshell gotten: gps status
INFO [muorb] SLPI: Main GPS
INFO [muorb] SLPI: protocol: UBX
INFO [muorb] SLPI: status: NOT OK, port: 6, baudrate: 0
INFO [muorb] SLPI: sat info: disabled
INFO [muorb] SLPI: rate reading: 0 B/s
INFO [muorb] SLPI: Ok executing command: gps status
INFO [muorb] SLPI: Sending qshell retval with timestamp 855143719, current timestamp 855143720
INFO [qshell] qshell return value timestamp: 855143719, local time: 855147735
pxh> -