Pages: [1]   Go Down
Author Topic: connect to xively help  (Read 432 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
I am new in the ethernet world.
And try to  connect  a UNO + ethernet shield  to Xively
 xively sensor client code is used  as test
Here the copy of  begin:
=====================================================
#include <SPI.h>
#include <Ethernet.h>

#define APIKEY         "6bdqlXOuFxslViiNH47bHQ4BgquDNA5FhTTv6u9yTN1XXUe4" // replace your xively api key here
//#define FEEDID         "sa_CqVcUqxTaHY38NXZe" // replace your feed ID
#define FEEDID         235989283 // replace your feed ID
#define USERAGENT      "popol" // user agent is the project name

// assign a MAC address for the ethernet controller.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
// fill in your address here:
byte mac[] = {
   0x90, 0xA2, 0xDA, 0x0D, 0xF2, 0x5C};

// fill in an available IP address on your network here,
// for manual configuration:
 IPAddress ip(10,0,1,20);
// initialize the library instance:
 EthernetClient client;

// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
 IPAddress server(216,52,233,122);      // numeric IP for api.xively.com
//char server[] = "api.xively.com";   // name address for xively API

==================================================
The answer  on Serial monitor is:
=================================================
connecting...
FEEDID235989283
APIKEY6bdqlXOuFxslViiNH47bHQ4BgquDNA5FhTTv6u9yTN1XXUe4
User-Agent: popol
sensor1  79
HTTP/1.1 401 Unauthorized
Date: Thu, 22 May 2014 15:31:21 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 50
Connection: close
WWW-Authenticate: Basic realm="Web Password"
X-Request-Id: 527babf0daa9df0ff2b6e3ca5c091754da4f7ba3
Set-Cookie: _pachcore_app_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTZkMmEyMzZiYTRlMzMwZjIwYTljNmE2ZTY3MDRhNDVlBjsAVA%3D%3D--c0753558828101d07e7876ddd16e61e83b618f33; domain=.xively.com; path=/; expires=Thu, 05-Jun-2014 15:31:21 GMT; HttpOnly

You do not have permission to access this resource
disconnecting.
==============================================
Thanks  for any information why I hang on..
Regards

Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

please modify your post
- use code tags (# button above the smileys)
- post the whole code (better strip it to a minimal version that shows the problem)
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: