Coder Social home page Coder Social logo

Comments (11)

PerMalmberg avatar PerMalmberg commented on June 19, 2024 1

There is actually a fork that adds username and password, as well as TLS for mqtt. I've not had the time to engage that author to verify the functionality of those additions and merge them back into this main repo, but if you're willing to I'm more than happy to accept a PR with tests for it.

from smooth.

Paul-Simpson avatar Paul-Simpson commented on June 19, 2024

I've found .../mqtt/packet/Connect.cpp - where the MQTT connect packet is being built up. Looking into this and will revert.

from smooth.

PerMalmberg avatar PerMalmberg commented on June 19, 2024

from smooth.

Paul-Simpson avatar Paul-Simpson commented on June 19, 2024

Thank you - that is great news. I was wading through the TLS and MQTT protocols and thinking it's a non-trivial amount of work to implement from a standing start. I'll take a look at the fork over the weekend.

from smooth.

Paul-Simpson avatar Paul-Simpson commented on June 19, 2024

Update: The fork looks promising, however, I'm having trouble compiling it with:

../lib/smooth/include/smooth/core/network/Wifi.h:31:10: fatal error: wifi_provisioning/manager.h: No such file or directory
#include <wifi_provisioning/manager.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

errors. I've checked that WiFi is turned on in "make menuconfig". I've been googling but have not found anything that helped me. I'm not sure if this rings any bells with you?

from smooth.

PerMalmberg avatar PerMalmberg commented on June 19, 2024

I'm guessing it is part of ESP-IDF?

from smooth.

Paul-Simpson avatar Paul-Simpson commented on June 19, 2024

Yes. I can see the file. Vscode can even follow the include link. I'll look further into it.

from smooth.

Paul-Simpson avatar Paul-Simpson commented on June 19, 2024

Hi, quick update. I've been looking at the luuvt mqtts fork. It works well with ESP-IDF 4.2.x, but I'm seeing compile errors when using with 4.3 or 4.4. The errors are:

In file included from /Users/paulsimpson/esp/esp-idf/components/driver/include/driver/gpio.h:16,
                 from ../externals/smooth/lib/smooth/include/smooth/core/io/spi/Master.h:24,
                 from ../externals/smooth/lib/smooth/include/smooth/application/io/spi/BME280SPI.h:30,
                 from ../externals/smooth/lib/smooth/application/io/spi/BME280SPI.cpp:19:
/Users/paulsimpson/esp/esp-idf/components/hal/include/hal/spi_types.h: In function 'constexpr spi_event_t operator~(spi_event_t)':
/Users/paulsimpson/esp/esp-idf/components/esp_common/include/esp_attr.h:123:79: error: use of old-style cast to 'uint32_t' {aka 'unsigned int'} [-Werror=old-style-cast]
 FORCE_INLINE_ATTR constexpr TYPE operator~ (TYPE a) { return (TYPE)~(INT_TYPE)a; } \
                                                                               ^
/Users/paulsimpson/esp/esp-idf/components/esp_common/include/esp_attr.h:135:29: note: in expansion of macro 'FLAG_ATTR_IMPL'
 #define FLAG_ATTR_U32(TYPE) FLAG_ATTR_IMPL(TYPE, uint32_t)
                             ^~~~~~~~~~~~~~
/Users/paulsimpson/esp/esp-idf/components/esp_common/include/esp_attr.h:136:19: note: in expansion of macro 'FLAG_ATTR_U32'
 #define FLAG_ATTR FLAG_ATTR_U32
                   ^~~~~~~~~~~~~

...is this something that you have seen before? I'm pretty green to PR's etc on GitHub, so please don't be afraid to spell out how I can be of help getting this fixed and in a state where I can PR it. Best Wishes, Paul

from smooth.

PerMalmberg avatar PerMalmberg commented on June 19, 2024

I think this original repo is compatible with 4.3 and 4.4, if I remember correctly another contributor made PR to fix it.

If you can compile this original Smooth repo with them, it's probably easiest to simply look at what luuvt has done and make new PR with those changes and any improvements on top.

I've been busy with other things for the last two years so I don't have the environment, nor the time, to investigate it myself.

from smooth.

Paul-Simpson avatar Paul-Simpson commented on June 19, 2024

Hey - thanks for the pointers. I looked into this issue some more. The latest Smooth compiles just fine with 4.4, so I will look at how I can bring the luuvt mqtts changes into the latest Smooth and then PR that as you suggest.

Aside from the issue, I must say that I'm learning positively a lot from your code and architecture. :) Out of interest (and please feel free not to answer if you're busy) would you have structured it in the same way if you were to start again? I'm asking not because I see any issues, but because by the time I finished building a project, many lessons have been learnt along the way.

from smooth.

PerMalmberg avatar PerMalmberg commented on June 19, 2024

Out of interest (and please feel free not to answer if you're busy) would you have structured it in the same way if you were to start again?

Yes, and no. As with every software project, you learn things as it progresses and there are always things that can be done better. Smooth is actually based on similar software system that I developed and is running on thousands of systems at airports all over the world. I've you've ever landed on any major airport, it has likely affected you :) That one had a different OS, different requirements and was not something I wrote as a spare-time project, but the overall idea is the same.

from smooth.

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.