-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AsyncMqttClient::setSecure(bool) -- Need help #53
Comments
I think you can't define `ASYNC_TCP_SSL_ENABLED` in your sketch. You can
either specify the flag in your build script or define the flag in both the
AsyncMqttClient and ESPAsyncTCP libs `h/hpp` files.
Le 28 juin 2017 11:40 AM, "timpur" <notifications@github.com> a écrit :
… Ive tried very thing i can think off.
Currently using:
Arduino: 1.8.3
ESP Arduino: 2.4.0-rc1
AsyncTCP: Latest git pull (27th)
AsyncMQTT: Latest(27th)
Build: Generic ESP8266 Module, 1mb (64kb)
The Sketch im trying to build (test build script):
"
#define ASYNC_TCP_SSL_ENABLED 1
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <Ticker.h>
#include <AsyncMqttClient.h>
AsyncMqttClient mqttClient;
void setup() {
// put your setup code here, to run once:
mqttClient.connect();
mqttClient.setSecure(true);
}
void loop() {
// put your main code here, to run repeatedly:
}
"
The Error:
(~ = my dir)
"
C:\Users~\AppData\Local\Temp\arduino_build_20908\sketch\
sketch_jun28a.ino.cpp.o:(.text.setup+0x4): undefined reference to
`AsyncMqttClient::setSecure(bool)'
C:\Users~\Local\Temp\arduino_build_20908\sketch\sketch_jun28a.ino.cpp.o:
In function `setup':
C:\Users~\AppData\Local\Temp\arduino_modified_sketch_817953/sketch_jun28a.ino:14:
undefined reference to `AsyncMqttClient::setSecure(bool)'
collect2.exe: error: ld returned 1 exit status
"
The build also tells me this:
Using library ESP8266WiFi at version 1.0 in folder: ...
Using library Ticker at version 1.0 in folder: ...
Using library async-mqtt-client at version 0.8.1 in folder: ...
Using library ESPAsyncTCP at version 1.0.0 in folder: ...
If any one has any idea?
Tim.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#53>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AA8eNdIUS8mbbxV-U8y608A2NsZ8frPjks5sIh-SgaJpZM4OHudJ>
.
|
Thank you. You lead me to the problem. In the quest to enable tls in the libs you mentioned, the compiler complained about redefinition in the async tcp config file. There i found: changed 0 to 1 and everything works. I tried many locations of define this, and only this one location worked. Weird but moving on and will start trying tls with homie :) Thanks. |
I didn't have success using a definition in my sketch, but it will work if you set it in build_flags in platformio.ini (only applicable to PlatformIO). |
Its okay I found setting the config in the asyncConfig.h in the Async TCP lib works so all g :). Not the best solution but it works :P |
Different note I'm getting exceptions with TLS testing. Can't get it to connect to http://test.mosquitto.org still debugging the issue. If I can't work it out might have to ask for some more help sorry :P. |
Cant seem to get the ssl example working for test.mosquitto.org on port 8883 with no fingerprint? all i get from debug is (with esp debugging enabled): |
Hi timpur, It seems that some server certificate signature algorithms cause a crash: test.mosquitto.com:8883 uses SHA512, which is causing the crash. |
Awesome thanks for that |
Did test using a 256 bit certificate, worked like a charm but still testing reliability of connection with homie. |
Ive tried very thing i can think off.
Currently using:
Arduino: 1.8.3
ESP Arduino: 2.4.0-rc1
AsyncTCP: Latest git pull (27th)
AsyncMQTT: Latest(27th)
Build: Generic ESP8266 Module, 1mb (64kb)
The Sketch im trying to build (test build script):
"
#define ASYNC_TCP_SSL_ENABLED 1
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <Ticker.h>
#include <AsyncMqttClient.h>
AsyncMqttClient mqttClient;
void setup() {
// put your setup code here, to run once:
mqttClient.connect();
mqttClient.setSecure(true);
}
void loop() {
// put your main code here, to run repeatedly:
}
"
The Error:
(~ = my dir)
"
C:\Users~\AppData\Local\Temp\arduino_build_20908\sketch\sketch_jun28a.ino.cpp.o:(.text.setup+0x4): undefined reference to `AsyncMqttClient::setSecure(bool)'
C:\Users~\Local\Temp\arduino_build_20908\sketch\sketch_jun28a.ino.cpp.o: In function `setup':
C:\Users~\AppData\Local\Temp\arduino_modified_sketch_817953/sketch_jun28a.ino:14: undefined reference to `AsyncMqttClient::setSecure(bool)'
collect2.exe: error: ld returned 1 exit status
"
The build also tells me this:
Using library ESP8266WiFi at version 1.0 in folder: ...
Using library Ticker at version 1.0 in folder: ...
Using library async-mqtt-client at version 0.8.1 in folder: ...
Using library ESPAsyncTCP at version 1.0.0 in folder: ...
If any one has any idea?
Tim.
The text was updated successfully, but these errors were encountered: