Giter Club home page Giter Club logo

Comments (15)

alex-spataru avatar alex-spataru commented on May 21, 2024 2

Update: with the latest commit, Serial Studio supports sending RX data to a MQTT server/broker in CSV format. Here is a screenshot with the MQTT server for the CanSat competition:

Screen Shot 2021-02-28 at 21 19 01

The next step is to allow Serial Studio to act as a MQTT subscriber. This would also allow other instances of Serial Studio in the network/world to visualize the data received and processed by a SS ground station.

Finally, here is a screenshot of the MQTT settings pane:

Screen Shot 2021-02-28 at 21 29 44

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024 2

But do you plan to support MQTT key/cert authentication for MQTT?

Taking a look at the headers of the library that I am using for MQTT communications, I think that is possible. I need to do some testing, but this feature will be eventually implemented.

Good luck for the can-sat competition 👍

Thanks a lot! I will go back to working on SS as soon as I have some free time 😄

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024 2

Hi, just to let you know that I just released a new version that adds SSL/TLS support for MQTT connections. Please let me know how it works for you.

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024 1

Update: I just forked the Qt-MQTT project so that I can integrate it with Serial Studio using sub-modules.

Serial Studio, when opened opens a defined python file as sub-process.
Each time a new data-set arrives into serial studio, the data is split to the different graph widgets, but also to
a special handler function (per-widget) in this python file with the new data as argument in JSON format.

This could be (relatively) easily done with QProcess, and we could give users more power with what to do with incoming data. I will take your proposal into consideration. I think that letting users modify the Python script to suit their own needs could be very useful.

I am currently in a pretty tight deadline to get this to work, and I am a lot more familiar with Qt/C++ than with Python. Also, the qt-mqtt library has some examples that I can use to get an idea on how to implement support for MQTT in Serial Studio.

The course of action that I am considering is:

  • Integrate the Qt MQTT library and get it to work before I reach the deadline.
  • Add support for calling Python scripts and pass the received data to these scripts to allow users to extend the functionality of Serial Studio. This can be related to the ideas discussed in #17.

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024 1

Edit: Unfortunately, I cannot use Qt MQTT due to licensing issues. AFAIK, I cannot use GPLv3 code in a MIT-licensed project. And I personally feel GPLv3 too restrictive for the usage cases that users may have for this project.

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024

Hi,

This feature will be eventually implemented, I need to get it working for the CanSat competition because they require us to use MQTT to send incoming data over to their server. For the moment, I am currently playing with qtmqtt and learning more about MQTT in general.

So far, I would like to give users the possibility of:

  • Receiving data over MQTT and displaying it.
  • Generating and sending MQTT frames with incoming serial/network data (e.g. AFAIK, this is what I need to do for the competition).

As I said before, I am still learning about MQTT (and probably I could be saying some nonsense here 😆). The steps that I am considering to take are:

  1. Learn (and understand) what MQTT is and how it works.
  2. Integrate the qtmqtt library (or another C/C++ MQTT library) with Serial Studio and make sure that it works on all major platforms.
  3. Build the GUI options/fields for the MQTT client.
  4. Write the appropriate classes to let the GUI and other application modules interact with the MQTT library.
  5. Do internal tests, create a release & get community feedback.

Of course, any suggestions are welcome. Again, thanks a lot for the idea & the contributions that you've made.

from serial-studio.

fusedFET avatar fusedFET commented on May 21, 2024

That sound's great!

I have never used qtmqtt before, but it seems to be the most logical choice to keep a unifrom library stack.

Just a proposition:
Serial Studio, when opened opens a defined python file as sub-process.
Each time a new data-set arrives into serial studio, the data is split to the different graph widgets, but also to
a special handler function (per-widget) in this python file with the new data as argument in JSON format.

This would allow to simply process and republish data received on serial studio to some MQTT endpoint.
It might be simpler than changing the GUI to support generating MQTT frames.
At least in python it is quite simple to generate those frames, even more if some specific format is required by your competition :)
(Beside the fact that you could maybe even use this to make some automated testing with serial studio ?)

If I can help you somehow with scripts or, some tests on a cloud architecture or similar feel free to ping me :)

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024

I just created a new release that allows Serial Studio TO send/receive data over MQTT. RX data is sent in a CSV-like format, and other instances of Serial Studio can display the broadcasted data using the same *.json file (you just need to set the "mode" combobox to "Subscriber").

Please let me know how it works for you. Greetings!

from serial-studio.

fusedFET avatar fusedFET commented on May 21, 2024

That looks great 👍, but do you plan to support MQTT key/cert authentication for MQTT?
I have some issues to add the classic password authentication to my brokers.

Good luck for the can-sat competition 👍

from serial-studio.

bmalcheski avatar bmalcheski commented on May 21, 2024

Any chance you'll be adding TLS encryption w/ and w/o certs?

Any intention to add further MQTT configuration options such as QoS, last will, keep alive, etc?

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024

Hi,

The MQTT library that I use for Serial Studio has support for SSL configuration with and without certificates, QoS, will retain and keep alive. I just need to add the UI controls to interface with the functions of the library.

Do you know of any broker that I can use to test these features? I don't know if HiveMQ allows me to test these configurations...

from serial-studio.

bmalcheski avatar bmalcheski commented on May 21, 2024

So no TLS support though? I looked through the header files you mentioned previously and didn't see anything about it TLS support myself. I bring it up because I was going to use SS to help me do some debug logging but can't if it doesn't support TLS. You may already be aware, but using MQTT with AWS requires SSL with certs. The issue I've run into is many edge devices I've used don't have the ability to use cert files hence encryption w/o authentication.

I would think that HiveMQ supports those features. They have a bunch of articles regarding them... Otherwise, Mosquitto is another option. Obviously, you can't change the configs for either of the publicly hosted test servers but you can run your own instance to manipulate the broker config regarding these features.

https://www.hivemq.com/downloads/
https://mosquitto.org/download/

This looks like a great project and a very useful tool!

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024

Thanks a lot for the links! I'll work on this issue during the weekend. I am currently on exam period. Regarding TLS, I believe that the QSslSocket class supports it (and thus QMQTT with SSL compilation flags enabled).

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024

Hi! I am currently implementing the requested features. Advanced MQTT options & SSL/TLS config can be set in a separate dialog that can be shown from the MQTT tab. Here is a screenshot of the dialog:

Screen Shot 2021-11-12 at 2 24 15

For the moment, I have finished adding support for QOS, Keep-Alive and retain flags. SSL/TLS support is underway. Please let me know if I should change anything or if I forgot to add something to the MQTT config. dialog.

from serial-studio.

alex-spataru avatar alex-spataru commented on May 21, 2024

Update: I can confirm that the TLS/SSL feature works correctly with the latest commit. I will draft a new version in the upcoming days :)

from serial-studio.

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.