Could you please help
1 mosquitto seem to be installed on RPi
BUT
on test Client(null) not like in the book where clientsub/867 ..etc
mosquitto_sub -d -t testTopic
Client (null) sending CONNECT
Client (null) received CONNACK (0)
Client (null) sending SUBSCRIBE (Mid: 1, Topic: testTopic, QoS: 0, Options: 0x00)
mosquitto_pub -d -t testTopic -m “Hello world!”
Client (null) sending CONNECT
Client (null) received CONNACK (0)
Client (null) sending PUBLISH (d0, q0, r0, m1, ‘testTopic’, … (12 bytes))
Client (null) sending DISCONNECT
Client (null) received SUBACK
Subscribed (mid: 1): 0
Client (null) received PUBLISH (d0, q0, r0, m0, ‘testTopic’, … (12 bytes))
Hello world!
Client (null) sending PINGREQ
Client (null) received PINGRESP
Next ESP32
When I using the ESP32 to get connected
Connecting to Wi-Fi…
[WiFi-event] event: 0
[WiFi-event] event: 2
[WiFi-event] event: 4
[WiFi-event] event: 7
WiFi connected
IP address:
192.168.0.17
Connecting to MQTT…
Disconnected from MQTT.
Connecting to MQTT…
Disconnected from MQTT.
Connecting to MQTT…
Disconnected from MQTT.
Publishing on topic counter at QoS 1, packetId: 0Connecting to MQTT…
Disconnected from MQTT.
Connecting to MQTT…
Disconnected from MQTT.
Connecting to MQTT…
Disconnected from MQTT.
Connecting to MQTT…
Disconnected from MQTT.
Publishing on topic counter at QoS 1, packetId: 0
clearly WIFI established but not the MQTT
pleae help any idea where I go wrong?
(the only change I made to your program commentin out the BROKER AND PASSWORD use
24 //#define BROKER_USER “REPLACE_WITH_BROKER_USERNAME”
25 //#define BROKER_PASS “REPLACE_WITH_BROKER_PASSWORD”
164 //mqttClient.setCredentials(BROKER_USER, BROKER_PASS);
)
clealy WIFI works but no MQTT connection
Did you come accross this problem?
Please help
Zoltan
Hi.
Can you tell me which eBook and on what page are you getting the problems?
Regards,
Sara
Hi again.
The first print seems that everything is fine with the broker.
Why aren’t you using the broker username and password in the code?
Regards,
Sara
Becouse I have no security concerns. I commented out all references to it so I do not think it is relevant to the problem.
But when you set up the broker, did you add a username and password?
See page 105: Enable Remote Access/Authentication
Did you follow those steps?
Even if you don’t want to set up username and password you’ll need to change the configuration file as shown on that section (except the password file). Otherwise, you won’t be able to communicate with the broker from another machine.
But did you add the lines to enable remote access? See page 105 and 106.
You need to follow steps 2, 3, and 4 (on step 4, don’t add the last line if you don’t want a password)
Yes. and thank you for yor help.
I always check before I contact you and most of my questions are answered from experiences of people before me but this wasn’t.
Thank you again
You are doing an incredibly good work (both of you)
Zoltan
Great!
I’m glad the issue is solved.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara
One thing I seem to experienced:
DO NOT MESS WITH THE HOST NEME
reaspberrypi it should be
when I renamed my RPi Somthing gone wrong but I do not know
where the host name is enbeded to be raspberrypi