Can't connect to thinger with ENC28J60


#1

Hello,
i can’t connect my arduino with the ENC28J60 to my local Thinger.io Server.
Here is my code for the Arduino:

#define THINGER_SERVER "192.168.1.9"
#define _DEBUG_
// UIPEthernet for ENC28J60: https://github.com/ntruchsess/arduino_uip
#include <UIPEthernet.h>
#include <ThingerENC28J60.h>


#define USERNAME "*****"
#define DEVICE_ID "Arduino_Uno_01"
#define DEVICE_CREDENTIAL "************"

ThingerENC28J60 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

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

  // ENC28J60 using fixed IP Address. DHCP is too big for the sketch.
  uint8_t mac[] = {0x54, 0x34, 0x41, 0x30, 0x30, 0x31};
  Ethernet.begin(mac, IPAddress(192, 168, 1, 8));

//  pinMode(2, OUTPUT);
//
//  // pin control example (i.e. turning on/off a light, a relay, etc)
//  thing["led"] << digitalPin(2);
//
//  // resource output example (i.e. reading a sensor value)
//  thing["millis"] >> outputValue(millis());


  // more details at http://docs.thinger.io/arduino/
}

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

This ist the output of the debugging mode:

[NETWORK] Starting connection…
[NETWORK] Connected!
[_SOCKET] Connecting to 192.168.1.9:25200…
[_SOCKET] Using secure TLS/SSL connection: no


#2

Hello, Try to answer it.
I assume that you have own thinger server, isn’t it? (192.168.1.9)
Don’t write your server definition in the sketch, but write it in the thingerio library named “ThingerClient.h” located on Arduino folder --> library -->Thingerio.

Hopes it help.