Code Monkey home page Code Monkey logo

Comments (9)

sandeepmistry avatar sandeepmistry commented on August 19, 2024 2

@q2dg yes, even AVR boards like the Uno should be fine. See comments in #53 (comment) for more metrics.

from arduino-mqtt.

256dpi avatar 256dpi commented on August 19, 2024 1

Thanks for raising this.

The underlying library (Paho) uses constants to activate QOS1 an QOS2 and as the Arduino IDE offers no library configuration via constants, enabling these features would result in more program space usage for all users.

Therefore, this feature is delayed until the Arduino IDE offers a suitable solution.

Ongoing discussions:

from arduino-mqtt.

sandeepmistry avatar sandeepmistry commented on August 19, 2024

@q2dg what boards would you like to use the QoS1 and QoS2 with?

from arduino-mqtt.

256dpi avatar 256dpi commented on August 19, 2024

Since the increase in programming space usage is minimal, I think we should enable support for all QoS levels in v2.

The usage table again for future reference:

QoS0: 25768 bytes (9%)
QoS1: 26240 bytes (10%)
QoS2: 26552 bytes (10%)

from arduino-mqtt.

q2dg avatar q2dg commented on August 19, 2024

@sandeepmistry Hello! Well, I'm not a skilled technician but I think SAMD's boards (Zero and MKRxxx) -at least- could do the job, don't you think?

from arduino-mqtt.

alim-s-ajiev avatar alim-s-ajiev commented on August 19, 2024

I am trying to use this library with ESP8266 and QoS1. I have not written any app code yet, just in selecting sutable library yet, but I suppose that some modification would be useful in src/lib/MQTTClient.h:

#ifdef ESP8266
extern "C" void yield( void );
#endif

// only used in single-threaded mode where one command at a time is in process
template<class Network, class Timer, int a, int b>
int MQTT::Client<Network, Timer, a, b>::waitfor(int packet_type, Timer& timer)
{
    int rc = FAILURE;

    do
    {
        if (timer.expired())
            break; // we timed out
#ifdef ESP8266
        yield();
#endif
    }
    while ((rc = cycle(timer)) != packet_type);

    return rc;
}

Please, fix me if I am wrong!

from arduino-mqtt.

256dpi avatar 256dpi commented on August 19, 2024

@alim-s-ajiev The library has been tested and successfully used with the ESP8266. No modification should be necessary to use it with the current feature set.

from arduino-mqtt.

alim-s-ajiev avatar alim-s-ajiev commented on August 19, 2024

Yes, you are right! It turns out that yield() is called inside cycle method for ESP8266 WiFi.

Thank you very much!

from arduino-mqtt.

256dpi avatar 256dpi commented on August 19, 2024

This is beeing addressed in #59.

from arduino-mqtt.

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.