Code Monkey home page Code Monkey logo

Comments (6)

christianrauch avatar christianrauch commented on July 30, 2024

I think for reading from the flight controller, you do not need to activate MSP RX input. This setting is only if you want to send control commands. I would try to connect to the flight controller in its default/factory configuration.

If you can connect via Betaflight GUI, you should also be able to connect via the msp library.

The message what(): read: End of file is an unhandled exception somewhere in the code. It is generated if there is nothing left to read. However, I think this should not occur. The ASIO should wait for new characters on the serial port. I am not sure how this is caused. I never encountered this.

The message buffer returned EOF; reading char directly from port is more a warning. The library reads from the serial port and writes into a buffer. Another thread reads from this buffer and if the buffer is empty, it reads directly from the serial port.
Messages like unsupported: 100 mean that you are requesting message type that is not supported by the flight controller. You can ignore them for the example programs but should deal with this in your own code (e.g. handle unavailable message types).

The remaining messages indicate that there is a communication issue on the serial line.

Are you directly using a serial connection between the flight controller and the onboard PC or are you using a USB connection and a USB-Serial converter on the firmware board?

A serial connection (two-wire data line) might be more likely affected by noise which causes data corruption and message drops. A USB connection is better shielded and produces fewer errors.

from msp.

seanjkanderson avatar seanjkanderson commented on July 30, 2024

Thanks for this Christian.

I think the issue comes down to something related to running this on an Odroid (Raspberry Pi-like but more powerful). While I've been able to open the BetaFlight Configurator on the headerless machine using the Chrome extension, I only was able to connect to it randomly once and then it wasn't streaming IMU measurements. I am using a USB connection (USB to USB-serial converter), so the connection is pretty good.

I'm not sure the shortcoming is with the ARM processor/software versions in this case. I did try to reduce the baud rates and that didn't help.

I am able to configure this flight controller if I plug it into my Mac though, and I've been able to read the data back on my Mac using the python pyMultiWii library.

Thanks!

from msp.

christianrauch avatar christianrauch commented on July 30, 2024

If the physical connection to the flight controller is corrupted, then there is nothing that the msp library (or any other software) can do for you.

Can you connect via the msp library from your PC? If yes, then this is not an issue with the library.

Can you connect from your Odroid via pyMultiWii? If no, then this is probably a hardware issue or some problem with the serial configuration in the Odroid operation system.

I have successfully connected to the flight controller via multiple Raspberry Pis and a laptop running Raspbian or Ubuntu.

from msp.

seanjkanderson avatar seanjkanderson commented on July 30, 2024

It appears it's not an issue with the library. It's either just because I haven't managed to configure it correctly on linux or it's an issue with the ARM architecture.

from msp.

christianrauch avatar christianrauch commented on July 30, 2024

It should not be an issue with the ARM architecture per se as it works just fine on Raspberry Pi board (which also use an ARM processor). Maybe it is just related to the Odroid hardware or firmware. Better check if other users have similar problems with the serial connection.

from msp.

seanjkanderson avatar seanjkanderson commented on July 30, 2024

I'm still struggling along with this haha.

I have managed to get it mostly running when using pyMultiWii (py2) or a more basic example (py3) on both my Mac and Odroid (where it wasn't previously running), but when I move the flight controller/quad rotor quickly it exits with a

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdd in position 0: unexpected end of data

I'm still unable to get it to work with this library, and I would like to interface with it with C++ ultimately. Overall, it seems like the serial port is being "overloaded" or something along these lines. I've tried reducing the serial update rate to 100Hz and also ran it up at 2000Hz. And my baud rate is 115200 still. Any ideas?

from msp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.