rpicopter / mw-mavlink

Control you MultiWii with QGroundControl!
5 stars 1 forks source link

Stuck on step "Setting up mw..." #5

Open PepCZ opened 6 years ago

PepCZ commented 6 years ago

Hi,

Perfect project. Just run on old CRIUS board and raspberry (debian stretch). All fine, little strugless with serial comunications and some dependencies in python. I have problem with mw-mavlink service it stuck on "Setting up mw...". Any ideas?

Thank you.

PepCZ commented 6 years ago

Problem is with message 24 4d 3c 00 7a 7a ($M<zz). I get $M!zz as respond

gregd72002 commented 6 years ago

Looks like your GPS has no fix or there is issue with recognizing the GPS configuration

https://github.com/rpicopter/mw-mavlink/blob/4aaf11bf91dd193e8a138822ee7ac0ddc9a5dab4/mw.c#L146

message 3c is 122 (MSP_NAV_CONFIG), the service will continue to request MSP_NAV_CONFIG until response received.

gregd72002 commented 6 years ago

Here is the Multiwii part: https://github.com/multiwii/multiwii-firmware/blob/upstream_shared/Protocol.cpp#L46

PepCZ commented 6 years ago

Thanks!!! I was having bad configuration of GPS in my multiwii. For information, can i run it without GPS (comment this part in mw_init() and change definition of TASKS)?

gregd72002 commented 6 years ago

The safer option would be to disable GPS on MultiWii side.

Alternatively you can try to change this function and return 0 always. But this is something I have not tried myself.

https://github.com/rpicopter/mw-service/blob/75980513a3c30551247dfbddc0ee77a36f65e0e0/msp.c#L130

PepCZ commented 6 years ago

Sorry for delay.

It works! Thanks!

Now i can connect QGroundControl with raspberry. There is one issue. I am using QGRoundControl v2.8.0 and this happend in mw-mavlink service:

pi@raspberrypi:~/mwml/mw-mavlink $ mw-mavlink -t 192.168.0.53 -p 14550 -l 14551 -d /temp/ Initializing UDP... UDP initialized on port: 14551 GC address: 192.168.0.53:14550 Setting up mw... Initializing PARAMS... Opening config: /usr/local/etc/mw/mw-mavlink.cfg... Setting up mavlink... Started. <- MsgID: 20 Requesting param id: -1, component: 0 Segmentation fault

gregd72002 commented 6 years ago

I suspect this issue might be caused by protocol version mismatch.

Are you able to try different QGroundControl version and report back? https://github.com/mavlink/qgroundcontrol/releases?after=v3.1.1

I'd suggest to try 2.9.7/2.9.7b and 3.0.0 (these are the versions I tried last time).