Giter Site home page Giter Site logo

Comments (4)

rafaeldelucena avatar rafaeldelucena commented on July 28, 2024 1

You can define the size of the buffers

I know this problem from the ESP8266, which would fail at around120 Bytes, where I had to use a modified MQTT client (not Paho) version which streams the messages instead of sendig it as a single packet.

With the C++ Paho MQTTClient I already sent and receive more than 500 bytes using the ESP8266 v12f, only by specifying the size of the read and write buffers.

For the C Client this can be accomplished at initialization

void MQTTClientInit(MQTTClient* client, Network* network, unsigned int command_timeout_ms,
unsigned char* sendbuf, size_t sendbuf_size, unsigned char* readbuf, size_t readbuf_size);

from paho.mqtt.embedded-c.

stozk avatar stozk commented on July 28, 2024

Ah well thanks I'm blind... there it is... 1000 Bytes.

from paho.mqtt.embedded-c.

scaprile avatar scaprile commented on July 28, 2024

Completely off-topic, but since you guys raised it: ESP8266 has two official SDKs, one is RTOS-based and the other is bare metal. The bare metal one requires the developer to ensure the processor has enough time to perform its wifi duties, that includes not calling C-standard library functions but os_ functions and not staying in loops lasting more than (I don't remember correctly) let's say a millisecond or two.
There are also many non-official ones and people using old and buggy SDKs too.
All libraries in the non-OS (bare metal) SDK, including the TCP/IP stack, lwIP, have been modified to fit the chip scenario. You can't expect to drop in a standard library and have it working flawlessly. That includes Paho. Besides that, it carries its own MQTT library, which I don't know how compliant and behaved it is. It is not Paho's fault, it is a working environment constraint not being honored by the developer.

from paho.mqtt.embedded-c.

icraggs avatar icraggs commented on July 28, 2024

I'll see if I can get to add some documentation for this package.

from paho.mqtt.embedded-c.

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.