Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,001 Views

Able to send data over the commandline to IO analytics cloud, but fails the same when trying with Arduino Script

I successfully registered my IOT device to the IOT analytics and able to send message using the command line

:iotkit-admin observation temp 35

But when I am trying to run the iotkitSImpleExample.ino I am not getting any message in the IOT Analytics Dashboard.

code sample

void setup() {

Serial.begin(115200);

// call begin on the IoTkit object before calling any other methods

iotkit.begin();

}

loop() {

....

iotkit.send("temp", temp);

delay(2000);

}

When I check the log_er.txt file I am seeing the following error "Ethernet-Class-error: canot ioctl to get SIOCGIFFLAGS.

Please help to identify the problem.

Tags (1)
6 Replies
idata
Community Manager
96 Views

Hi,

Which image are you using? Make sure to use the latest one, which you can download from here https://software.intel.com/en-us/iot/hardware/edison/downloads https://software.intel.com/en-us/iot/hardware/edison/downloads. You can also use one of the previous images if you want to discard any issue related to the latest one, http://iotdk.intel.com/src/3.0/edison/iot-devkit-yp-poky-edison-20160315.zip http://iotdk.intel.com/src/3.0/edison/iot-devkit-yp-poky-edison-20160315.zip.

 

I would like to know if you're using a guide to accomplish this. If so, could you please provide it? I guess you're using this tutorial https://software.intel.com/en-us/intel-iot-platforms-getting-started-cloud-analytics https://software.intel.com/en-us/intel-iot-platforms-getting-started-cloud-analytics.

 

I've been doing some research and find out that adding the Ethernet library is required for the sketch to work on the Edison. Did you already add it? It would be helpful if you could paste your whole code in here.

Regards,

 

-Pablo
96 Views

Which image are you using? Make sure to use the latest one, which you can download from here https://software.intel.com/en-us/iot/hardware/edison/downloads https://software.intel.com/en-us/iot/hardware/edison/downloads. You can also use one of the previous images if you want to discard any issue

>> Linux edison 3.10.17-poky-edison+ # 1 SMP PREEMPT Fri Jun 19 12:06:40 CEST 2015 i686 GNU/Linux

I followed the attached PDF for the IOT analytics configuration.

Can you please guide me to Ethernet library to be used for Edison,I use the Arduino installed libraries.

Please find in the attachment for the sample I tried.

Regards,

Anand

idata
Community Manager
96 Views

Hi Anand,

 

 

Could you please enter the following line cat /etc/version and tell me the output? What do you get? With this command you'll get the current version of your Edison.

 

Could you please try with this guide? http://www.instructables.com/id/Connecting-Intel-Edison-Sensors-to-the-Cloud/?ALLSTEPS http://www.instructables.com/id/Connecting-Intel-Edison-Sensors-to-the-Cloud/?ALLSTEPS. I'm looking at your code, and it seems to be lacking two of the libraries, aJSON and IOTKIT. Please give a try and let us know your results.

 

 

Regards,

 

-Pablo
96 Views

My etc/version info is : 201606061707.

I updated the software as you mentioned earlier after that I am not able to register or access the device from iot-analytics,

Now I am struggling to register my device. I deleted my device id in IOT analytics site and now I am trying to add again my device but now I am getting always error as below. Even tried add the device in the analytics->Add device option also I am getting error "device exists"

------error------

● iotkit-agent.service - iotkit-agent

Loaded: loaded (/lib/systemd/system/iotkit-agent.service; disabled)

Active: inactive (dead)

root@edison:/# systemctl stop iotkit-agent

root@edison:/# iotkit-admin initialize

2016-06-21T19:01:35.220Z - info: Initialized

root@edison:/# iotkit-admin activate 4YixmNAH

2016-06-21T19:02:28.091Z - info: Activating ...

2016-06-21T19:02:41.010Z - error: Activation Rejected: {"code":1409,"message":" Device already exists"} --> error

2016-06-21T19:02:41.020Z - error: Error in the activation process ... 300

root@edison:/#

----------------

 

I tried iotkit-admin initialize

iotkit-admin reset

And also tried > run do_ota . Still the same issue.

Regards,

Anand

idata
Community Manager
96 Views

Hi Anand,

 

 

Are you trying to flash your Edison using the run do_ota method? If this is the case, this is no longer the supported method to flash the board. If you want to flash the board I would suggest you to use the Flash Tool Lite or the Flashall script, here you can find the instructions /docs/DOC-98643 https://communities.intel.com/docs/DOC-98643.

 

Could you please try these steps?
  1. Remove the device from the dashboard (in case you haven't before).
  2. Run "iotkit-admin reset-code && iotkit-admin reset-components && iotkit-admin initializa" on your Edison.
  3. Request de new device ID by entering "iotkit-admin device-id".
  4. Add the device device in dashboard using this device-id.
  5. Copy activation code from dashboard.
  6. Run "iotkit-admin test". What do you get after this?
  7. Run "iotkit-admin ".
  8. Start the iotkit agent now "systemctl enable iotkit-agent && systemctl start iotkit-agent".
Let us know your results.

 

 

Kind regards,

 

-Pablo
idata
Community Manager
96 Views

H Anand,

 

 

Do you have updates on this case?

 

 

Regards,

 

-Pablo
Reply