Arduino Yun (v1) can't authenticate on thinger.io

Hello, I see there are some other posts about Yuns having problems, but mine isn’t fixed by #define disable_TLS or other the other suggestions. Below, I have the example Yun sketch from the documentation with the only changes being: my credentials, debug, and disable TLS.

This is the earlier Yun, the official one from arduino dot cc, and not the rev 2.

Rant: I’m actually using this board to test because there is a library and documentation for it, whereas the Seeeduino GRPS I really want to use for my project seems like it will need more customization. I was bummed to see board-specific libraries for a service that bills itself as “hardware agnostic.” I can get both of these devices on the internet via their own libraries, so I thought hardware agnostic meant those lines of code plus some thinger code would work, not that thinger code would replace the code to get them online. /rant. I hope to get it to work because thinger dot io looks perfect and very capable for what I am trying to do and I like that it’s open source and that fact that I can run my own instance. But I’m trying to use thinger dot io first to remove some of the variables.

Anyway, so now I’m trying to get a supported board to communicate with thinger dot io and authentication is failing. I have double check the 3 authentication inputs, and deleted and created new devices, with the same results. One thing I’m assuming is that the username is the one I use to login to thinger dot io. Is that right? I don’t know what else it would be, but I’m trying to question everything when the example sketch doesn’t work.

#define DISABLE_TLS
#define _DEBUG_

#include <BridgeSSLClient.h>
#include <ThingerYun.h>

#define USERNAME "my_username"
#define DEVICE_ID "my_device_ID"
#define DEVICE_CREDENTIAL "my_device_credential"

ThingerYun thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

void setup() {
  Serial.begin(115200);

  pinMode(LED_BUILTIN, OUTPUT);

  // initialize bridge
  Bridge.begin();

  // pin control example (i.e. turning on/off a light, a relay, etc)
  thing["led"] << digitalPin(LED_BUILTIN);

  // resource output example (i.e. reading a sensor value, a variable, etc)
  thing["millis"] >> outputValue(millis());
}

void loop() {
  thing.handle();
}

Here is the output. Whether or not I have disable_tls commented, it tries to use TLS/SSL. Others have had success with Yun by disabling it, but the sketch above and output below are pasted from my currently live operation and TLS is not correctly disabled. So that’s the more direct question: why isn’t disable_TLS working? The larger question is of course, why can’t my Yun authenticate? And then someday I’ll try the seeeduino again.

[_SOCKET] Connecting to iot.thinger.io:25202...
[_SOCKET] Using secure TLS/SSL connection: yes
[_SOCKET] Connected!
[THINGER] Authenticating. User: my_username Device: my_device_ID
[THINGER] Writing bytes: 40 [FAIL]
[THINGER] Expected:40
[THINGER] Wrote:0
[THINGER] Auth Failed! Check username, device id, or device credentials.
[_SOCKET] Is now closed!

Hi Damon,

This could be an easy thing, but might be helpful. Try changing #define DISABLE_TLS with
#define DISABLE_TLS_

Thanks! That wasn’t quite it, but you added one _ so I added another _ and tried again and it worked. This appears to be the way to do it:

#define _DISABLE_TLS_