Hi,
I am designing PX4 hardware, based on the Pixracer (fmu_v4). On my design, I have tried to only use a minimal hardware setup, needed to get PX4 up and running. Compared to the Pixracer, I have replaced the FRAM, with FM25W256-G which turns out is not supported by PX4. This resulted in me not being able to save the parameters for the connections that I wanted to be opened.
As a result, I built my own firmware, and successfully uploaded it. Now, I want to access the system using QGround control and it is not connecting itself to PX4. Turns out, the mavlink port on USB is not active. I tried to manually activate it, unsuccessfully.
while, going through the ports, available, i did not see /ttyACM0/ that usually is what represents USB.
I have attached the Boot log below
[boot] Fault Log info File No 4 Length 3177 flags:0x01 state:1
[boot] Fault Log is Armed
ERROR [PX4_MTD] failed to initialize mtd driver
ERROR [PX4_MTD] mtd failure: -5 bus 2 address 0 class 1
HW arch: PX4_FMU_V4
FW git-hash: dab7b007de17b3449b875735d337149716af80c4
FW version: 1.13.0 0 (17629184)
FW git-branch: master
OS: NuttX
OS version: Release 8.2.0 (134349055)
OS git-hash: c5c7d2b4f26f52f1dfb425ebde83328606b65d4f
Build datetime: Feb 18 2022 15:56:59
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 9.3.1 20200408 (release)
PX4GUID: 0001000000003535343830385114004d0027
MCU: STM32F42x, rev. 3
nsh: mount: mount failed: No such device
INFO [init] formatting /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: No such device
ERROR [init] format failed
INFO [param] selected parameter default file /fs/microsd/params
ERROR [param] open '/fs/microsd/params' failed (2)
ERROR [init] param import failed
ERROR [param] open '/fs/microsd/params' failed (2)
Board architecture defaults: /etc/init.d/rc.board_arch_defaults
Board defaults: /etc/init.d/rc.board_defaults
WARN [dataman] Could not open data manager file /fs/microsd/dataman
ERROR [dataman] dataman start failed
Board sensors: /etc/init.d/rc.board_sensors
ERROR [SPI_I2C] ms5611: no instance started (no device on bus?)
ERROR [SPI_I2C] lis3mdl: no instance started (no device on bus?)
ERROR [SPI_I2C] icm20602: no instance started (no device on bus?)
icm20608g #0 on SPI bus 1 rotation 8
ERROR [SPI_I2C] mpu9250: no instance started (no device on bus?)
Starting Main GPS on /dev/ttyS3
Starting MAVLink on /dev/ttyS1
ERROR [mavlink] DM_KEY_MISSION_STATE lock failed
WARN [mavlink] offboard mission init failed (-1)
INFO [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS1 @ 57600B
No autostart ID found
ekf2 [658:100]
Board extras: /etc/init.d/rc.board_extras
ERROR [mavlink] Device /dev/ttyACM0 does not exist
Usage: mavlink <command> [arguments...]
Commands:
start Start a new instance
[-d <val>] Select Serial Device
values: <file:dev>, default: /dev/ttyS1
[-b <val>] Baudrate (can also be p:<param_name>)
default: 57600
[-r <val>] Maximum sending data rate in B/s (if 0, use baudrate / 20)
default: 0
[-m <val>] Mode: sets default streams and rates
values: custom|camera|onboard|osd|magic|config|iridium|minimal|extvision|extvisionmin|gimbal, default: normal [-n <val>] wifi/ethernet interface name
values: <interface_name>
[-f] Enable message forwarding to other Mavlink instances
[-w] Wait to send, until first message received
[-x] Enable FTP
[-z] Force hardware flow control always on
[-Z] Force hardware flow control always off
stop-all Stop all instances
stop Stop a running instance
[-d <val>] Select Mavlink instance via Serial Device
values: <file:dev>
status Print status for all instances
[streams ] Print all enabled streams
stream Configure the sending rate of a stream for a running instance
[-d <val>] Select Mavlink instance via Serial Device
values: <file:dev>
-s <val> Mavlink stream to configure
-r <val> Rate in Hz (0 = turn off, -1 = set to default)
boot_complete Enable sending of messages. (Must be) called as last step in startup script.
INFO [mavlink] mode: Normal, data rate: 2000 B/s on /dev/ttyS2 @ 115200B
INFO [logger] logger started (mode=all)
INFO [logger] log root dir created: /fs/microsd/log
NuttShell (NSH) NuttX-10.2.0
nsh> e[KINFO [gyro_calibration] gyro 0 (3801098) updating offsets [0.000, 0.000, 0.000]->[-0.026, 0.000, 0.009] 26.6 degC
ERROR [parameters] parameter export to /fs/microsd/params failed (-1) attempt 1
ERROR [parameters] parameter export to /fs/microsd/params failed (-1) attempt 2
ERROR [parameters] parameter export to /fs/microsd/params failed (-1) attempt 3
ERROR [parameters] param export failed (-1)
ERROR [parameters] param auto save failed (-1)
INFO [frsky_telemetry] Scanning timeout: exiting
nsh> e[K
nsh> e[K/dev//dev/lslsls
ls
nsh: /dev/lsls: command not found
nsh> e[K
nsh> e[Kls
ls
/:
bin/
dev/
etc/
fs/
obj/
proc/
nsh> e[K
nsh> e[Kcd dev/
cd dev/
nsh> e[K
nsh> e[Klslslslsls
ls
nsh: lslsls: command not found
nsh> e[K
nsh> e[Kls
ls
/dev:
console
led0
mmcsd0
null
ttyS0
ttyS1
ttyS2
ttyS3
ttyS4
ttyS5
ttyS6
nsh> e[K
nsh> e[K
the edit that i did on the cloned repo is shown below
#!/bin/sh
#
# PX4 FMUv4 specific board extras init
#------------------------------------------------------------------------------
# Run FrSky Telemetry on Pixracer on the FrSky port if not enabled already
if param compare TEL_FRSKY_CONFIG 0
then
frsky_telemetry start -d /dev/ttyS6 -t 15
fi
mavlink start -d /dev/ttyACM0 -b 2000000 -r 800000 -x
mavlink start -d /dev/ttyS2 -b 115200 -r 2000 -x
i added the last 2 lines on “rc.board_extras” and built the code… I followed all the steps outlined in the getting-started guide for building the code, and i did not mess with the other files except the one above, and USB is not there…
what am i doing wrong?