Skip to content

mqtt_client.h working example! #3639

Closed
Closed
@soheils2

Description

@soheils2

Hardware:

Board: ESP32 wroom
Core Installation/update date:
IDE name: Arduino IDE
Flash Frequency:
PSRAM enabled:
Upload Speed: 115200
Computer OS: Windows 10

Description:

I'm working on something that needs MQTT over websocket (my server limitation is mqtt just over WS )

On arduino IDE specifically.

I've looked everywhere for it, but either no one have ability to !ratain or (||) send over websocket packets. :D

I've somehow get to this include in arduino ---> its close src and low language (at least for me!)

#include "mqtt_client.h"

and does this on my code:


void mqtt_init() {
  esp_mqtt_client_config_t mqttConfig;
  mqttConfig.uri = "ws://test.mosquitto.org";
  mqttConfig.port = 8080;
  mqttConfig.transport = MQTT_TRANSPORT_OVER_WS;
  esp_mqtt_client_start(client);
}

and it compiled!
But i dont know anything about callbacks and handle functions

can you help me stablish a mqtt connection over websocket with arduino ide?
tnx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions