Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Adafruit MQTT Library
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Adafruit MQTT Library

by tlerdrden on Mon Jul 27, 2020 8:29 am

Hello Adafruit,
I have an Arduino Uno Wifi Rev.2 and I am trying to use your MQTT Library for posting data to Adafruit IO. Library version is 1.3.0.
Problems I have when I try to compile:

Arduino:1.8.13 (Windows 10), Tarjeta:"Arduino Uno WiFi Rev2, None (ATMEGA4809)"


In file included from C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.h:25:0,


from C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:22:


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp: In member function 'const arduino::__FlashStringHelper* Adafruit_MQTT::connectErrorString(int8_t)':


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:278:12: note: in expansion of macro 'F'


return F(


^


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:281:12: note: in expansion of macro 'F'


return F(


^


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:284:12: note: in expansion of macro 'F'


return F("The MQTT service is unavailable");


^


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:286:12: note: in expansion of macro 'F'


return F("The data in the user name or password is malformed");


^


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:288:12: note: in expansion of macro 'F'


return F("Not authorized to connect");


^


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:290:12: note: in expansion of macro 'F'


return F("Exceeded reconnect rate limit. Please try again later.");


^


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:292:12: note: in expansion of macro 'F'


return F("You have been banned from connecting. Please contact the MQTT "


^


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:295:12: note: in expansion of macro 'F'


return F("Connection failed");


^


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:297:12: note: in expansion of macro 'F'


return F("Failed to subscribe");


^


C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const arduino::__FlashStringHelper*' in return


#define F(str) (str)


^


C:\Users\xxx\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp:299:12: note: in expansion of macro 'F'


return F("Unknown error");


^


exit status 1


Error compilando para la tarjeta Arduino Uno WiFi Rev2.

tlerdrden
 
Posts: 80
Joined: Fri Nov 30, 2012 4:46 pm

Re: Adafruit MQTT Library

by brubell on Tue Jul 28, 2020 9:46 am

Hi - could you please file this issue on the repository page: https://github.com/adafruit/Adafruit_IO_Arduino/issues

brubell
 
Posts: 988
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.