An archive of community.esquilo.io as of Saturday January 26, 2019.

Esquilo cannot connect to Nest Cloud Site

jake_linnenbank

I've connected my Esquilo to my local network using both the AP setup and the EOS shell, and it seems to be working fine. However, my device does not appear when using the https://find.esquilo.io/ utility, so I have to scan my network for the IP address. Once I have it, I'm able to use the web IDE and flash code and do all the other stuff as expected.

However, when I try to register my Esquilo with my Nest account through the IDE, it keeps saying:

Unable to Connect to Nest
Your Esquilo is unable to connect to the Nest cloud site.
Please verify that the Wi-Fi network it is connected to can access the Internet and try again.

My network is definitely connected to the internet, and I have even run some HTTPC examples using IFTTT which seem to work seamlessly. So I'm not sure why it wouldn't show up in find.esquilo.io and be unable to connect to the Nest cloud.

Any ideas on what could be causing this?

patrick

The root cause is probably that your ESTP client is not connecting to our site. To verify, you can issue the following command in the console pane at the bottom of the IDE:

system("netcfg estp")

If the answer is "closed", you are not connected.

One subtle cause of this can be having the incorrect time, as it will cause issues with the certs. You didn't disable SNTP by chance? (in the Network Services menu).

You can also check this with the command:

system("time")

You should get something like:

2015-07-08T17:54:38Z

jake_linnenbank

The ESTP client is returning closed when I check it, and SNTP is enabled still and points to sntp.esquilo.io.

When I check the time, it's still set to 1970, and everytime I reset it, it returns to 1970-01-01T00:00:00. I tried disabling, reseting, and re-enabling the SNTP but that had no effect. I can ping the SNTP server from the esquilo and it seems to respond:

system("ping sntp.esquilo.io")
Press any key to stop.
Pinging sntp.esquilo.io [104.131.44.56] with 56 bytes of data:
Reply from 104.131.44.56: bytes=56 time=239ms TTL=41
Reply from 104.131.44.56: bytes=56 time=237ms TTL=41
Reply from 104.131.44.56: bytes=56 time=237ms TTL=41
Reply from 104.131.44.56: bytes=56 time=246ms TTL=41

When I check the log, it says it's starting the SNTP client, but obviously something is stopping it from updating the time:

system("log")
1970-01-01T00:00:00Z INFO Esquilo Operating System (EOS)
1970-01-01T00:00:00Z INFO for Esquilo Air
1970-01-01T00:00:00Z INFO Version 0.2
1970-01-01T00:00:00Z INFO Copyright (c) 2014-2015 Esquilo Corp.
1970-01-01T00:00:00Z INFO Starting USB CDC
1970-01-01T00:00:00Z INFO Initializing WICED
1970-01-01T00:00:00Z INFO Starting Wiced
1970-01-01T00:00:01Z INFO WLAN MAC Address: 00:0B:6C:42:12:52
1970-01-01T00:00:01Z INFO WLAN Firmware: wl0: Nov  7 2014 16:03:45 version 5.90.230.12 FWID 01-85207c18
1970-01-01T00:00:01Z INFO Initializing RTCS
1970-01-01T00:00:01Z INFO Initializing station interface
1970-01-01T00:00:01Z INFO Initializing access point interface
1970-01-01T00:00:01Z INFO Starting web server
1970-01-01T00:00:01Z INFO Starting SNTP client
1970-01-01T00:00:01Z INFO Starting ESTP process
1970-01-01T00:00:01Z INFO Starting network monitor task
1970-01-01T00:00:01Z INFO Starting SD manager
1970-01-01T00:00:01Z INFO Starting Squirrel VM
patrick

Hmm. I wonder if UDP is being blocked somewhere. Can you try the following from the same subnet on a Mac or Linux machine, please?

sudo ntpdate -u sntp.esquilo.io

jake_linnenbank

That seems to give the right date and time:

sudo ntpdate -u sntp.esquilo.io
 9 Jul 12:48:15 ntpdate[7613]: adjust time server 104.131.44.56 offset -0.009552 sec
patrick

Can you please post the output of system("eos task");. I just want to make sure SNTP is starting.

jake_linnenbank

Here's the output from the console:

system("eos task");
Task Name        Task # Stack Prio State                          Error
---------------- ------ ----- ---- ------------------------------ ----------
USB CDC               1  1200    2 LWEVENT_BLOCKED TIMEOUT        0x00000000
Idle Task             2   224    7 READY                          0x00000000
Main                  3  1500    4 BLOCKED                        0x00000000
WICED Worker          4  1500    2 LWMSGQ_READ_BLOCKED            0x00000000
WICED                 5  1500    1 LWSEM_BLOCKED                  0x00000000
TCP/IP                6  2000    1 RCV_SPECIFIC_BLOCKED TIMEOUT   0x00000000
HTTP Handler          7  2500    2 READY                          0x00000000
HTTP Server           8  1500    2 SEND_BLOCKED                   0x00000000
SNTP Server           9  1500    3 SEND_BLOCKED                   0x00000000
ESTP client          10  3000    3 READY TIMEOUT                  0x00000000
Network Monitor      11  1500    4 READY TIMEOUT                  0x00000000
SD Manager           12  1500    4 READY TIMEOUT                  0x00000000
Squirrel VM          13  8000    2 READY                          0x00000000
HTTP Session         14  2000    2 SEND_BLOCKED                   0x00000000
patrick

I'm kind of stumped. Our theory is that maybe something about the Esquilo's SNTP UDP packet is causing it to get dropped somewhere. Obviously from our tests, your router is passing NTP. I'm wondering if ntpdate is actually getting UDP blocked and falling back to TCP, or if there's something specific about our format. We have tested at lots of locations (i.e. routers, firewalls, ISPs), but it's far from exhaustive.

All the debugging steps I can think of now are a bit of a pain. Like using wireshark to verify ntpdate is succeeding with UDP, taking the Esquilo to another location, checking your firewall settings, etc.

By the way, what is your firewall setup? A standard wireless router or something fancy?

jake_linnenbank

Thanks anyway Patrick. It looks like it must be something with my router setup (it's just a normal off the shelf dsl router with a standard setup). I just tried to connect the Esquilo to my phone's hotspot, and it immediately gets the correct time and shows up on find.esquilo.io. So it seems something on my wifi network is preventing the Esquilo from receiving the ntp packets.

mdoan7

I've seen the same behavior. Except in my case... I can reach one board through the cloud while a second board refuses to show any signs of playing nicely with the cloud. The nest page detail screen for that board shows stale ip addresses for when it was first registered. It's since gotten a new local ip address but this is not reflected via nest.

Like you, i have to shell in to get the new ip address and then use that to access this board. I'll run the diag steps listed above and see if I can move it further.

Scott_Shumate

Could anyone having problems connecting to the Nest please post their router make and model? It seems like there is a UDP NAT traversal problem here that we need to reproduce internally in order to fix.

Thanks!

jake_linnenbank

I'm using a D-Link DSL-2740B-F1

mdoan7

Netgear R7000. One Air appears in the nest... the other does not.

david_weaver20

I am having the same problem. Its odd as the very first time I connected it to the network it found it. Next time I plugged it in it couldn't. Now have to enter the ip address. Sending the command: system("netcfg estp") when it first starts up returns open. Send it again and it just hangs, Have to reset.

Using Sky Broadband router

david_weaver20

Just had a look in the firewall setting of router, Disabled the setting for my server and now all is working. Re-enabled setting and still everything works. Odd but happy now.

patrick

What setting did you disable and reenable?

david_weaver20

I had a firewall rule set up for inbound HTTP to port 80 directed to server. I disabled that and it worked straight away.

rockethacker

i had the exact same issue. i resolved it by changing the sntp address (under the "network services" dialog) to one of the servers here http://tf.nist.gov/tf-cgi/servers.cgi

patrick

Thanks for posting that. That's really odd that using a different NTP server would fix this, but it's good to know.

If anyone else on the thread has a similar experience, please post about it.

jake_linnenbank

I tried changing NTP servers but had no luck from US or Australian servers - the time still remains the same

steveb48

I seem to have the same issue. I'm using an Apple Time Capsule for my access point / router. Should I try the workarounds listed or would you like more info before I start changing things?

thanks,
Steve

system("netcfg estp")
Status : open
Client IP Address : 172.16.1.171
Client IP Mask : 255.255.0.0
Server IP Address : 172.16.0.1
system("time")
2015-07-24T22:16:51Z

patrick

Hi Steve,

Everything looks great in the output you listed. Your board is connected to the cloud site.

What is not working for you? Nest registration?

steveb48

Well that's odd. I was getting an error during the registration but now it works.

Steve

patrick

@steveb48 Thanks for the update. The tunnel can be a little finicky sometimes on startup. I'm not sure why yet. I'm glad to hear it's working ok for you now.

dan

I've tried everything shown here and none of the solutions work. I've verified that all services are working and I am able to run a sync on the SD card, which indicates connectivity to both the internet and the Esquilo site. Time is being retrieved by sntp. Perhaps there are issues with time zones or small differences in times on the PC and the sntp server. This particular feature is not significant to my applications, so I'll probably let it go.