mlesniew / PicoMQTT

ESP MQTT client and broker library
GNU Lesser General Public License v3.0
219 stars 25 forks source link

Compile-Error with PICOMQTT_DEBUG #16

Closed MCSE-2000 closed 9 months ago

MCSE-2000 commented 10 months ago

I have enabled debug (PICOMQTT_DEBUG) and now I get the following errors: /mnt/..../libraries/PicoMQTT/src/PicoMQTT/incoming_packet.cpp:70:19: error: #if with no expression 70 | #if PICOMQTT_DEBUG | ^ /mnt/..../libraries/PicoMQTT/src/PicoMQTT/incoming_packet.cpp:81:19: error: #if with no expression 81 | #if PICOMQTT_DEBUG | ^ /mnt/.../libraries/PicoMQTT/src/PicoMQTT/incoming_packet.cpp:97:19: error: #if with no expression 97 | #if PICOMQTT_DEBUG | ^

But after the correction from #if PICOMQTT_DEBUG to #ifdef PICOMQTT_DEBUG no DEBUG information comes.

My problem was that the client did not work. I took 2 ESP-01, one with basic_server.ino (static IP 192.168.2.40) and one with basic_client.ino (static IP 192.168.2.41). I only got the following messages: Publishing message in topic 'picomqtt/esp-E8:68:E7:80:0A:03': Hello #1 Publishing message in topic 'picomqtt/esp-E8:68:E7:80:0A:03': Hello #2 Publishing message in topic 'picomqtt/esp-E8:68:E7:80:0A:03': Hello #3 ...

No answer Received message from server.

UPDATE 01.10.2023: The client is working now. The ESP-01S has a defect. The ESP-01S client did not respond to a PING. But in the FritzBox it was displayed ONLINE and the WiFi.status was WL_CONNECTED. Another ESP-01 with the MAC E8:68:E7... did not work either. With an old ESP-01 now also the client works. But DEBUG info I still do not get.

mlesniew commented 10 months ago

Define PICOMQTT_DEBUG to 1.

pt., 29 wrz 2023, 20:32 użytkownik MCSE-2000 @.***> napisał:

I have enabled debug (PICOMQTT_DEBUG) and now I get the following errors: /mnt/..../libraries/PicoMQTT/src/PicoMQTT/incoming_packet.cpp:70:19: error: #if with no expression 70 | #if PICOMQTT_DEBUG | ^ /mnt/..../libraries/PicoMQTT/src/PicoMQTT/incoming_packet.cpp:81:19: error: #if with no expression 81 | #if PICOMQTT_DEBUG | ^ /mnt/.../libraries/PicoMQTT/src/PicoMQTT/incoming_packet.cpp:97:19: error:

if with no expression

97 | #if PICOMQTT_DEBUG | ^

— Reply to this email directly, view it on GitHub https://github.com/mlesniew/PicoMQTT/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLXJYZ765IOJYYXWDV2WOTX44H5PANCNFSM6AAAAAA5M3AVGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MCSE-2000 commented 10 months ago

Okay, thank you