PainlessMesh bridge to mosquitto

77 views
Skip to first unread message

Ray Madigan

unread,
Dec 10, 2023, 5:18:39 PM12/10/23
to painlessmesh-user
I have been trying for a couple of days now and cannot get the connection to my mosquitto server and can't see what I am doing wrong.  I have started with the provided example, to establish a connection with mosquitto, I have to add code to setup the wifiClient.  Here is the code, any suggestions would be helpful.

I guess I can't paste the code?  So I will attach it.

The code is documented but:  The only way I can get a successful connection to the mqttServer is to implement setup the WiFiClient and to comment out mesh.init and consequently all other mesh operations.  The mesh network seems to work fine without the Mosquitto bridge implementation.

Is there a better way to ask questions here?
Strange.ino

Ray Madigan

unread,
Dec 11, 2023, 12:33:55 PM12/11/23
to painlessmesh-user
I noticed in the call to:

mesh.init( MESH_PREFIX, MESH_PASSWORD, MESH_PORT, WIFI_AP_STA, 6 );

that there is a hard codded value in the channel identifier.
I tried the common values of 1, 6, and 11 with the same result.
I then went to my wifi network and looked at the configuration and found the setting for the 2.5GHz network to be (Auto).

I feel uncomfortable setting this to 6 because there are several devices connected to the network on the 2.5GHz.

Is there some workaround for this?
Is the real answer to use a board with Ethernet and wifi?

Reply all
Reply to author
Forward
0 new messages