[SOLVED] Weird responses from Multiwii... sometimes
Posted: Wed Apr 20, 2016 5:46 pm
Hi, i can't go further, hope some have a new idea. Thanks in advance...
I'm trying to read telemetry and set RC values via MSP protocol. I can build correctly (at least i think so) the frames based on protocol, and it seems i get to connect to Multiwii via UART correctly. BTW it's a Crius Multiwii SE 2.6.
The weird thing is how Multiwii is responding. One time it responds with a correct "62" type frame after i send a "60" type query. BUT the next time i run my application I get a short response (4-6 bytes) that makes no sense to me. BUT, the next time i run my app, all seems correct again... and so on
I'm aware that I have to be persistent on sending instructions repeatedly. I have checked to do it with single frame, also repeatedly in a for loop, also repeatedly in a thread... also with several commands like MSP_IDENT, MSP_ALTITUDE, MSP_SET_RAW_RC.... also I tried with two different Multiwii boards... Anyway: always the same odd behavior alternating coherent and no-sense responses, for each try.
My suspect is that i'm not initializing multiwii serial stuff correctly, but I don't have any idea as I can't find clear documentation.
Any light to guide me?? Thank you!
I'm trying to read telemetry and set RC values via MSP protocol. I can build correctly (at least i think so) the frames based on protocol, and it seems i get to connect to Multiwii via UART correctly. BTW it's a Crius Multiwii SE 2.6.
The weird thing is how Multiwii is responding. One time it responds with a correct "62" type frame after i send a "60" type query. BUT the next time i run my application I get a short response (4-6 bytes) that makes no sense to me. BUT, the next time i run my app, all seems correct again... and so on
I'm aware that I have to be persistent on sending instructions repeatedly. I have checked to do it with single frame, also repeatedly in a for loop, also repeatedly in a thread... also with several commands like MSP_IDENT, MSP_ALTITUDE, MSP_SET_RAW_RC.... also I tried with two different Multiwii boards... Anyway: always the same odd behavior alternating coherent and no-sense responses, for each try.
My suspect is that i'm not initializing multiwii serial stuff correctly, but I don't have any idea as I can't find clear documentation.
Any light to guide me?? Thank you!