Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matek H743-slim can't connect with mavros by usb #20410

Closed
UAVlover opened this issue Oct 14, 2022 · 1 comment
Closed

matek H743-slim can't connect with mavros by usb #20410

UAVlover opened this issue Oct 14, 2022 · 1 comment

Comments

@UAVlover
Copy link

UAVlover commented Oct 14, 2022

Describe the bug

I try to use mavros to connect matek H743-slim with my PC, but it failed. ttyACM0 can be found by computer, but there is no mavlink message.

To Reproduce

Steps to reproduce the behavior:

  1. flash FC with bootloader and Firmware
    2.Connect FC to the PC by usb
  2. roslauch mavros px4.launch

Expected behavior

H743-slim can connect with mavros by usb

Log Files and Screenshots

HW arch: MATEK_H743_SLIM
FW git-hash: dc7f29e
FW version: 1.13.1 0 (17629440)
OS: NuttX
OS version: Release 10.2.0 (167903487)
OS git-hash: 91bece51afbe7da9db12e3695cdbb4f4bba4bc83
Build datetime: Oct 14 2022 15:45:51
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 9.3.1 20200408 (release)
PX4GUID: 0006000000003337333931305113004a0031
MCU: STM32H7[4|5]xxx, rev. V
INFO [param] selected parameter default file /fs/microsd/params
INFO [param] importing from '/fs/microsd/params'
INFO [parameters] BSON document size 1411 bytes, decoded 1411 bytes (INT32:31, FLOAT:43)
INFO [param] selected parameter backup file /fs/microsd/parameters_backup.bson
Board architecture defaults: /etc/init.d/rc.board_arch_defaults
Board defaults: /etc/init.d/rc.board_defaults
INFO [dataman] data manager file '/fs/microsd/dataman' size is 62560 bytes
Loading airframe: /etc/init.d/airframes/4001_quad_x
INFO [uavcan] Node ID 1, bitrate 1000000
Board sensors: /etc/init.d/rc.board_sensors
icm42605 #0 on SPI bus 4 rotation 14
mpu6000 #0 on SPI bus 1 rotation 12
dps310 #0 on I2C bus 2 address 0x76
ERROR [SPI_I2C] qmc5883l: no instance started (no device on bus?)
ERROR [init] Failed loading mixer: /etc/mixers/quad_x.main.mix
INFO [init] setting PWM_AUX_OUT none
ekf2 [567:237]
Starting Main GPS on /dev/ttyS1
Starting MAVLink on /dev/ttyS2
INFO [mavlink] mode: Onboard, data rate: 50000 B/s on /dev/ttyS2 @ 500000B
Board extras: /etc/init.d/rc.board_extras
atxxxx #0 on SPI bus 2
Addons script: /fs/microsd/etc/extras.txt
WARN [mavlink] mavlink for device /dev/ttyACM0 is not running
INFO [logger] logger started (mode=all)

Add screenshots to help explain your problem.
image

Drone (please complete the following information):

  • Matek H743-Slim V1.5

Additional context

from the log, I found FC didn't start mavlink at ttyACM0. However, I have found that if I connected with QGC firstly, then closed QGC, after these operations, FC can be connected with mavros. I did some tests as follows, which proved my idea. Becuase of my poor experience, I have failed to fix this bug.

*connected with minicom
nsh> mavlink status

instance #0:
mavlink chan: #0
type: GENERIC LINK OR RADIO
flow control: OFF
rates:
tx: 14016.1 B/s
txerr: 0.0 B/s
tx rate mult: 1.000
tx rate max: 50000 B/s
rx: 0.0 B/s
rx loss: 0.0%
FTP enabled: YES, TX enabled: YES
mode: Onboard
MAVLink version: 1
transport protocol: serial (/dev/ttyS2 @500000)
nsh>

  • connected with QGC mavlink console
    nsh> mavlink status

instance #0:
mavlink chan: #0
type: GENERIC LINK OR RADIO
flow control: OFF
rates:
tx: 15446.7 B/s
txerr: 0.0 B/s
tx rate mult: 1.000
tx rate max: 50000 B/s
rx: 0.0 B/s
rx loss: 0.0%
FTP enabled: YES, TX enabled: YES
mode: Onboard
MAVLink version: 1
transport protocol: serial (/dev/ttyS2 @500000)

instance #1:
GCS heartbeat valid
mavlink chan: #1
type: USB CDC
flow control: ON
rates:
tx: 18914.9 B/s
txerr: 0.0 B/s
tx rate mult: 1.000
tx rate max: 100000 B/s
rx: 47.0 B/s
rx loss: 0.0%
Received Messages:
sysid:255, compid:190, Total: 56 (lost: 0)
FTP enabled: YES, TX enabled: YES
mode: Config
MAVLink version: 2
transport protocol: serial (/dev/ttyACM0 @2000000)
ping statistics:
last: 0.60 ms
mean: 0.53 ms
max: 46.70 ms
min: 0.25 ms
dropped packets: 0

  • script didn't work
    Addons script: /fs/microsd/etc/extras.txt
    INFO [mavlink] mode: Config, data rate: 100000 B/s on /dev/ttyACM0 @ 2000000B
    ERROR [mavlink] could not open /dev/ttyACM0
    INFO [logger] logger started (mode=all)

NuttShell (NSH) NuttX-10.2.0

@UAVlover
Copy link
Author

UAVlover commented Oct 16, 2022

I added " mavlink start -d /dev/ttyACM0 " at the last line of rcS, and create /etc/extras.txt in SD card with "mavlink start -d /dev/ttyACM0" , it worked well now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants