I can't connect to a local MQTT server

Hello,
I'm doing tests with MQTT blocks. I have installed a local Mosquitto server on a Raspberry Pi, and I want to connect to the server from Snap!, but I can't.
The local server does not have a username or password and the router port is open. From MicroBlocks, with the same configuration, it does connect.
Thank you!

Try using a local copy of Snap!.
You can find the source code here:

Download the source code, unzip the downloaded ZIP file, and open the snap.html file.

You can download the source code on GitHub by clicking on Code and then pressing Download ZIP

Screenshot 2023-07-17 132733

First of all ,you need to setup the mosquitto broker to use websockets
My mosquitto.conf file is setup like this

listener 1883
allow_anonymous true
listener 9001
protocol websockets
socket_domain ipv4

This allows websocket access (which is what Snap! uses) on port 9001

2nd thing, that unless you've made your broker work with TLS, it cannot be accessed from the standard https://snap.berkeley.edu domain

Luckily Snap! provide an http domain

So goto Snap! Build Your Own Blocks and use that instead

You should then be able to access your broker on 192.168.1.147:9001

Come back if you still have problems/questions

Thank you very much for the help, @cymplecy @joecooldoo !. Greetings.