🇺🇸Adafruit will not be shipping orders on Independence Day Monday 7/4/2022. Please allow extra time for your order to ship and plan accordingly.🇺🇸
0

Internet time CC3000
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Internet time CC3000

by herone on Thu Jun 19, 2014 2:13 pm

Hi! i'm using the internet time with the CC3000 wifi shield, in order to add it to my project. In the main project i'm using a CC3000 wifi shield with a static IP Address, written like this:

Code: Select all | TOGGLE FULL SIZE

    ipAddress = cc3000.IP2U32(192, 168, 1, 130);
    uint32_t netMask = cc3000.IP2U32(255, 255, 255, 0);
    uint32_t defaultGateway = cc3000.IP2U32(192, 168, 1, 255);
    uint32_t dns = cc3000.IP2U32(8, 8, 4, 4);

    if (!graph.cc3000.setStaticIPAddress(ipAddress, netMask, defaultGateway, dns)) {
      Serial.println(F("Failed to set static IP!"));
      while (1);
    }
    Serial.println("IP addres set ok");


ipAddress is a global variable (i need to be able to see it on a LCD Screen, so it must be global.)

That is not a issue, but when I started to check how internet time example works the issues begon. First i changed SSID and password, then i uploaded the sketch and there is the result:

[qoute]
Hello, CC3000!

RX Buffer : 131 bytes
TX Buffer : 131 bytes

Initialising the CC3000 ...
Firmware V. : 1.24
MAC Address : 0x08 0x00 0x28 0x59 0x22 0x62

Deleting old connection profiles

Attempting to connect to Red NuiFi
Connected!
Request DHCP

IP Addr: 192.168.1.130
Netmask: 255.255.255.0
Gateway: 192.168.1.255
DHCPsrv: 0.0.0.0
DNSserv: 8.8.4.4
Locating time server...
Attempting connection...
connected!
Issuing request...
Awaiting response...error
Locating time server...
Attempting connection...
connected!
Issuing request...
Awaiting response...error
0Current UNIX time: 30 (seconds since 1/1/1970 UTC)

[/quote]

I thoug it could be a issue related with the fixed IP of the previuos sketch because it shows always the same ip address, so I've go back to the first project and modify the code to obtain a no-static ip address by commenting the first code, and putting this:

Code: Select all | TOGGLE FULL SIZE
    if (!cc3000.setDHCP()) {
      Serial.println(F("Failed to set DHCP!"));
      while(1);
      }


then i've runned and it modifies the ip and it gets the time from the server, so, my question is possible to retrieve internet time with a fixed ip??

this is the output from the working example:

(Hello, CC3000!

RX Buffer : 131 bytes
TX Buffer : 131 bytes

Initialising the CC3000 ...
Firmware V. : 1.24
MAC Address : 0x08 0x00 0x28 0x59 0x22 0x62

Deleting old connection profiles

Attempting to connect to Red NuiFi
Connected!
Request DHCP

IP Addr: 192.168.1.105
Netmask: 255.255.255.0
Gateway: 192.168.1.1
DHCPsrv: 192.168.1.1
DNSserv: 192.168.1.1
Locating time server...
Attempting connection...
connected!
Issuing request...
Awaiting response...OK
Locating time server...
Attempting connection...
connected!
Issuing request...
Awaiting response...OK
1403201466Current UNIX time: 1403201465 (seconds since 1/1/1970 UTC)
herone
 
Posts: 42
Joined: Thu Jan 02, 2014 6:27 am

Re: Internet time CC3000

by Franklin97355 on Thu Jun 19, 2014 9:12 pm

Have you seen this? http://forums.adafruit.com/viewtopic.php?f=31&t=47004&p=237018

Also when you are setting the static IP the first responses you posted
Code: Select all | TOGGLE FULL SIZE
IP Addr: 192.168.1.130
Netmask: 255.255.255.0
Gateway: 192.168.1.255
DHCPsrv: 0.0.0.0
DNSserv: 8.8.4.4
Locating time server...
Attempting connection...
connected!

shows your Gateway as 192.168.1.255
and your DNSserv as 8.8.4.4
while in the second the Gateway is 192.168.1.1 (as it should be) and DNSserv is also 192.168.1.1
Could you post all the code in you sketch so we can have a look?

Franklin97355
 
Posts: 22674
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Internet time CC3000

by odwdinc on Sun Jun 29, 2014 12:33 pm

Hi i'm trying to run just the demo
provided with the library InternetTime
Code: Select all | TOGGLE FULL SIZE
æ’èHello, CC3000!

RX Buffer : 131 bytes
TX Buffer : 131 bytes

Initialising the CC3000 ...
Firmware V. : 1.24
MAC Address : 0x08 0x00 0x28 0x57 0x96 0xE2

Deleting old connection profiles

Attempting to connect to 00101010.1
Connected!
Request DHCP

IP Addr: 10.0.0.6
Netmask: 255.255.255.0
Gateway: 10.0.0.1
DHCPsrv: 10.0.0.1
DNSserv: 10.0.0.1
Locating time server...
Attempting connection...
connected!
Issuing request...
Awaiting response...error
Current UNIX time: 33 (seconds since 1/1/1970 UTC)
Locating time server...
Attempting connection...
connected!
Issuing request...
Awaiting response...error
Current UNIX time: 64 (seconds since 1/1/1970 UTC)
Locating time server...
Attempting connection...
connected!
Issuing request...
Awaiting response...error
Current UNIX time: 94 (seconds since 1/1/1970 UTC)

odwdinc
 
Posts: 2
Joined: Sat Sep 21, 2013 1:41 pm

Re: Internet time CC3000

by Franklin97355 on Sun Jun 29, 2014 12:44 pm

Sorry but that is not the code you are running on you micro. Could you post that?

Franklin97355
 
Posts: 22674
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Internet time CC3000

by odwdinc on Sun Jun 29, 2014 1:43 pm

ok is just the demo include in the library
Code: Select all | TOGGLE FULL SIZE
/***************************************************
  This is an example for the Adafruit CC3000 Wifi Breakout & Shield

  Designed specifically to work with the Adafruit WiFi products:
  ----> https://www.adafruit.com/products/1469

  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried, Kevin Townsend and Phil Burgess for
  Adafruit Industries.  BSD license, all text above must be included
  in any redistribution
 ****************************************************/

/*
This example queries an NTP time server to get the current "UNIX time"
(seconds since 1/1/1970, UTC (GMT)), then uses the Arduino's internal
timer to keep relative time.  The clock is re-synchronized roughly
once per day.  This minimizes NTP server misuse/abuse.

The RTClib library (a separate download, and not used here) contains
functions to convert UNIX time to other formats if needed.
*/

#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>

// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ   3  // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT  5
#define ADAFRUIT_CC3000_CS    10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
                                         SPI_CLOCK_DIVIDER); // you can change this clock speed but DI

#define WLAN_SSID       "00101010.1"        // cannot be longer than 32 characters!
#define WLAN_PASS       "******"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY   WLAN_SEC_WPA2

Adafruit_CC3000_Client client;

const unsigned long
  connectTimeout  = 15L * 1000L, // Max time to wait for server connection
  responseTimeout = 15L * 1000L; // Max time to wait for data from server
int
  countdown       = 0;  // loop() iterations until next time server query
unsigned long
  lastPolledTime  = 0L, // Last value retrieved from time server
  sketchTime      = 0L; // CPU milliseconds since last server query


void setup(void)
{
  Serial.begin(115200);
  Serial.println(F("Hello, CC3000!\n"));

  displayDriverMode();
 
  Serial.println(F("\nInitialising the CC3000 ..."));
  if (!cc3000.begin()) {
    Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
    for(;;);
  }

  uint16_t firmware = checkFirmwareVersion();
  if (firmware < 0x113) {
    Serial.println(F("Wrong firmware version!"));
    for(;;);
  }
 
  displayMACAddress();
 
  Serial.println(F("\nDeleting old connection profiles"));
  if (!cc3000.deleteProfiles()) {
    Serial.println(F("Failed!"));
    while(1);
  }

  /* Attempt to connect to an access point */
  char *ssid = WLAN_SSID;             /* Max 32 chars */
  Serial.print(F("\nAttempting to connect to ")); Serial.println(ssid);
 
  /* NOTE: Secure connections are not available in 'Tiny' mode! */
  if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
    Serial.println(F("Failed!"));
    while(1);
  }
   
  Serial.println(F("Connected!"));
 
  /* Wait for DHCP to complete */
  Serial.println(F("Request DHCP"));
  while (!cc3000.checkDHCP()) {
    delay(100); // ToDo: Insert a DHCP timeout!
  }

  /* Display the IP address DNS, Gateway, etc. */ 
  while (!displayConnectionDetails()) {
    delay(1000);
  }
}


// To reduce load on NTP servers, time is polled once per roughly 24 hour period.
// Otherwise use millis() to estimate time since last query.  Plenty accurate.
void loop(void) {

  if(countdown == 0) {            // Time's up?
    unsigned long t  = getTime(); // Query time server
    if(t) {                       // Success?
      lastPolledTime = t;         // Save time
      sketchTime     = millis();  // Save sketch time of last valid time query
      countdown      = 24*60*4-1; // Reset counter: 24 hours * 15-second intervals
    }
  } else {
    countdown--;                  // Don't poll; use math to figure current time
  }

  unsigned long currentTime = lastPolledTime + (millis() - sketchTime) / 1000;

  Serial.print(F("Current UNIX time: "));
  Serial.print(currentTime);
  Serial.println(F(" (seconds since 1/1/1970 UTC)"));

  delay(15000L); // Pause 15 seconds
}


/**************************************************************************/
/*!
    @brief  Displays the driver mode (tiny of normal), and the buffer
            size if tiny mode is not being used

    @note   The buffer size and driver mode are defined in cc3000_common.h
*/
/**************************************************************************/
void displayDriverMode(void)
{
  #ifdef CC3000_TINY_DRIVER
    Serial.println(F("CC3000 is configure in 'Tiny' mode"));
  #else
    Serial.print(F("RX Buffer : "));
    Serial.print(CC3000_RX_BUFFER_SIZE);
    Serial.println(F(" bytes"));
    Serial.print(F("TX Buffer : "));
    Serial.print(CC3000_TX_BUFFER_SIZE);
    Serial.println(F(" bytes"));
  #endif
}

/**************************************************************************/
/*!
    @brief  Tries to read the CC3000's internal firmware patch ID
*/
/**************************************************************************/
uint16_t checkFirmwareVersion(void)
{
  uint8_t major, minor;
  uint16_t version;
 
#ifndef CC3000_TINY_DRIVER 
  if(!cc3000.getFirmwareVersion(&major, &minor))
  {
    Serial.println(F("Unable to retrieve the firmware version!\r\n"));
    version = 0;
  }
  else
  {
    Serial.print(F("Firmware V. : "));
    Serial.print(major); Serial.print(F(".")); Serial.println(minor);
    version = major; version <<= 8; version |= minor;
  }
#endif
  return version;
}

/**************************************************************************/
/*!
    @brief  Tries to read the 6-byte MAC address of the CC3000 module
*/
/**************************************************************************/
void displayMACAddress(void)
{
  uint8_t macAddress[6];
 
  if(!cc3000.getMacAddress(macAddress))
  {
    Serial.println(F("Unable to retrieve MAC Address!\r\n"));
  }
  else
  {
    Serial.print(F("MAC Address : "));
    cc3000.printHex((byte*)&macAddress, 6);
  }
}


/**************************************************************************/
/*!
    @brief  Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
  uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
 
  if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
  {
    Serial.println(F("Unable to retrieve the IP Address!\r\n"));
    return false;
  }
  else
  {
    Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
    Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
    Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
    Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
    Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
    Serial.println();
    return true;
  }
}

// Minimalist time server query; adapted from Adafruit Gutenbird sketch,
// which in turn has roots in Arduino UdpNTPClient tutorial.
unsigned long getTime(void) {

  uint8_t       buf[48];
  unsigned long ip, startTime, t = 0L;

  Serial.print(F("Locating time server..."));

  // Hostname to IP lookup; use NTP pool (rotates through servers)
  if(cc3000.getHostByName("pool.ntp.org", &ip)) {
    static const char PROGMEM
      timeReqA[] = { 227,  0,  6, 236 },
      timeReqB[] = {  49, 78, 49,  52 };

    Serial.println(F("\r\nAttempting connection..."));
    startTime = millis();
    do {
      client = cc3000.connectUDP(ip, 123);
    } while((!client.connected()) &&
            ((millis() - startTime) < connectTimeout));

    if(client.connected()) {
      Serial.print(F("connected!\r\nIssuing request..."));

      // Assemble and issue request packet
      memset(buf, 0, sizeof(buf));
      memcpy_P( buf    , timeReqA, sizeof(timeReqA));
      memcpy_P(&buf[12], timeReqB, sizeof(timeReqB));
      client.write(buf, sizeof(buf));

      Serial.print(F("\r\nAwaiting response..."));
      memset(buf, 0, sizeof(buf));
      startTime = millis();
      while((!client.available()) &&
            ((millis() - startTime) < responseTimeout));
      if(client.available()) {
        client.read(buf, sizeof(buf));
        t = (((unsigned long)buf[40] << 24) |
             ((unsigned long)buf[41] << 16) |
             ((unsigned long)buf[42] <<  8) |
              (unsigned long)buf[43]) - 2208988800UL;
        Serial.print(F("OK\r\n"));
      }
      client.close();
    }
  }
  if(!t) Serial.println(F("error"));
  return t;
}

odwdinc
 
Posts: 2
Joined: Sat Sep 21, 2013 1:41 pm

Re: Internet time CC3000

by Franklin97355 on Sun Jun 29, 2014 6:15 pm

I'm confused, you said it was working with the demo code and then it would not after you modified it. Does the code you posted run and if so what output does it give you?

Franklin97355
 
Posts: 22674
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Internet time CC3000

by theZman on Mon Jul 07, 2014 4:59 pm

Hi,

I am encountering an error with the demo code. I am using a tinyduino board so I changed the pin set up and the network & password, everything else should be identical. I get connections to everything including an ntp, however, I get an "awaiting response ... error" in the serial monitor.
Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>

// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ   2  // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT  A3
#define ADAFRUIT_CC3000_CS    8
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
                                         SPI_CLOCK_DIVIDER); // you can change this clock speed but DI

#define WLAN_SSID       "Network"        // cannot be longer than 32 characters!
#define WLAN_PASS       "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY   WLAN_SEC_UNSEC

Adafruit_CC3000_Client client;

const unsigned long
  connectTimeout  = 15L * 1000L, // Max time to wait for server connection
  responseTimeout = 15L * 1000L; // Max time to wait for data from server
int
  countdown       = 0;  // loop() iterations until next time server query
unsigned long
  lastPolledTime  = 0L, // Last value retrieved from time server
  sketchTime      = 0L; // CPU milliseconds since last server query


void setup(void)
{
  Serial.begin(115200);
  Serial.println(F("Hello, CC3000!\n"));

  displayDriverMode();
 
  Serial.println(F("\nInitialising the CC3000 ..."));
  if (!cc3000.begin()) {
    Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
    for(;;);
  }

  uint16_t firmware = checkFirmwareVersion();
  if (firmware < 0x113) {
    Serial.println(F("Wrong firmware version!"));
    for(;;);
  }
 
  displayMACAddress();
 
  Serial.println(F("\nDeleting old connection profiles"));
  if (!cc3000.deleteProfiles()) {
    Serial.println(F("Failed!"));
    while(1);
  }

  /* Attempt to connect to an access point */
  char *ssid = WLAN_SSID;             /* Max 32 chars */
  Serial.print(F("\nAttempting to connect to ")); Serial.println(ssid);
 
  /* NOTE: Secure connections are not available in 'Tiny' mode! */
  if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
    Serial.println(F("Failed!"));
    while(1);
  }
   
  Serial.println(F("Connected!"));
 
  /* Wait for DHCP to complete */
  Serial.println(F("Request DHCP"));
  while (!cc3000.checkDHCP()) {
    delay(100); // ToDo: Insert a DHCP timeout!
  }

  /* Display the IP address DNS, Gateway, etc. */ 
  while (!displayConnectionDetails()) {
    delay(1000);
  }
}


// To reduce load on NTP servers, time is polled once per roughly 24 hour period.
// Otherwise use millis() to estimate time since last query.  Plenty accurate.
void loop(void) {

  if(countdown == 0) {            // Time's up?
    unsigned long t  = getTime(); // Query time server
    if(t) {                       // Success?
      lastPolledTime = t;         // Save time
      sketchTime     = millis();  // Save sketch time of last valid time query
      countdown      = 24*60*4-1; // Reset counter: 24 hours * 15-second intervals
    }
  } else {
    countdown--;                  // Don't poll; use math to figure current time
  }

  unsigned long currentTime = lastPolledTime + (millis() - sketchTime) / 1000;

  Serial.print(F("Current UNIX time: "));
  Serial.print(currentTime);
  Serial.println(F(" (seconds since 1/1/1970 UTC)"));

  delay(15000L); // Pause 15 seconds
}


/**************************************************************************/
/*!
    @brief  Displays the driver mode (tiny of normal), and the buffer
            size if tiny mode is not being used

    @note   The buffer size and driver mode are defined in cc3000_common.h
*/
/**************************************************************************/
void displayDriverMode(void)
{
  #ifdef CC3000_TINY_DRIVER
    Serial.println(F("CC3000 is configure in 'Tiny' mode"));
  #else
    Serial.print(F("RX Buffer : "));
    Serial.print(CC3000_RX_BUFFER_SIZE);
    Serial.println(F(" bytes"));
    Serial.print(F("TX Buffer : "));
    Serial.print(CC3000_TX_BUFFER_SIZE);
    Serial.println(F(" bytes"));
  #endif
}

/**************************************************************************/
/*!
    @brief  Tries to read the CC3000's internal firmware patch ID
*/
/**************************************************************************/
uint16_t checkFirmwareVersion(void)
{
  uint8_t major, minor;
  uint16_t version;
 
#ifndef CC3000_TINY_DRIVER 
  if(!cc3000.getFirmwareVersion(&major, &minor))
  {
    Serial.println(F("Unable to retrieve the firmware version!\r\n"));
    version = 0;
  }
  else
  {
    Serial.print(F("Firmware V. : "));
    Serial.print(major); Serial.print(F(".")); Serial.println(minor);
    version = major; version <<= 8; version |= minor;
  }
#endif
  return version;
}

/**************************************************************************/
/*!
    @brief  Tries to read the 6-byte MAC address of the CC3000 module
*/
/**************************************************************************/
void displayMACAddress(void)
{
  uint8_t macAddress[6];
 
  if(!cc3000.getMacAddress(macAddress))
  {
    Serial.println(F("Unable to retrieve MAC Address!\r\n"));
  }
  else
  {
    Serial.print(F("MAC Address : "));
    cc3000.printHex((byte*)&macAddress, 6);
  }
}


/**************************************************************************/
/*!
    @brief  Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
  uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
 
  if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
  {
    Serial.println(F("Unable to retrieve the IP Address!\r\n"));
    return false;
  }
  else
  {
    Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
    Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
    Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
    Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
    Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
    Serial.println();
    return true;
  }
}

// Minimalist time server query; adapted from Adafruit Gutenbird sketch,
// which in turn has roots in Arduino UdpNTPClient tutorial.
unsigned long getTime(void) {

  uint8_t       buf[48];
  unsigned long ip, startTime, t = 0L;

  Serial.print(F("Locating time server..."));

  // Hostname to IP lookup; use NTP pool (rotates through servers)
  if(cc3000.getHostByName("north-america.pool.ntp.org", &ip)) {
    static const char PROGMEM
      timeReqA[] = { 227,  0,  6, 236 },
      timeReqB[] = {  49, 78, 49,  52 };

    Serial.println(F("\r\nAttempting connection..."));
    startTime = millis();
    do {
      client = cc3000.connectUDP(ip, 123);
    } while((!client.connected()) &&
            ((millis() - startTime) < connectTimeout));

    if(client.connected()) {
      Serial.print(F("connected!\r\nIssuing request..."));

      // Assemble and issue request packet
      memset(buf, 0, sizeof(buf));
      memcpy_P( buf    , timeReqA, sizeof(timeReqA));
      memcpy_P(&buf[12], timeReqB, sizeof(timeReqB));
      client.write(buf, sizeof(buf));

      Serial.print(F("\r\nAwaiting response..."));
      memset(buf, 0, sizeof(buf));
      startTime = millis();
      while((!client.available()) &&
            ((millis() - startTime) < responseTimeout));
      if(client.available()) {
        client.read(buf, sizeof(buf));
        t = (((unsigned long)buf[40] << 24) |
             ((unsigned long)buf[41] << 16) |
             ((unsigned long)buf[42] <<  8) |
              (unsigned long)buf[43]) - 2208988800UL;
        Serial.print(F("OK\r\n"));
      }
      client.close();
    }
  }
  if(!t) Serial.println(F("error"));
  return t;
}

and this is the serial monitor response
Code: Select all | TOGGLE FULL SIZE
Hello, CC3000!

RX Buffer : 131 bytes
TX Buffer : 131 bytes

Initialising the CC3000 ...
Firmware V. : 1.24
MAC Address : 0x08 0x00 0x28 0x01 0x79 0xB7

Deleting old connection profiles

Attempting to connect to OSU_Access
Connected!
Request DHCP

IP Addr: 10.196.9.235
Netmask: 255.255.248.0
Gateway: 10.196.8.1
DHCPsrv: 128.193.0.10
DNSserv: 128.193.15.13
Locating time server...
Attempting connection...
connected!
Issuing request...
Awaiting response...error
Current UNIX time: 27 (seconds since 1/1/1970 UTC)


I am fairly new to working with the sheild and thanks for your help.
theZman
 
Posts: 2
Joined: Mon Jul 07, 2014 4:44 pm

Re: Internet time CC3000

by Franklin97355 on Mon Jul 07, 2014 5:29 pm

Are you trying this from on campus? Your DNS and DHCP servers are on the outside but the gateway and IP are non routable. You might try contacting the OSUOSL group or PEAK Internet. PEAK used to run the network on campus before they went private. Someone else may have better info than I do so keep watching here for answers.
(go beavs)

Franklin97355
 
Posts: 22674
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Internet time CC3000

by theZman on Tue Jul 08, 2014 12:36 am

That was the issue. Thank you for clearing that up. I tested at home and it worked flawlessly!
theZman
 
Posts: 2
Joined: Mon Jul 07, 2014 4:44 pm

Re: Internet time CC3000

by FrancisXav on Mon Feb 16, 2015 3:59 am

Hi all,

I'm using the cc3000 module with an Arduino UNO for a school project. Currently I'm using the internet time example code provided in the library to get time from NTP server. However, I keep getting the issue of 'Awaiting Response ... Error'. Is there a way to fix this?

Thanks!
Francis

FrancisXav
 
Posts: 1
Joined: Mon Feb 16, 2015 3:58 am

Re: Internet time CC3000

by Franklin97355 on Mon Feb 16, 2015 3:34 pm

Have you tested with buildtest and other sketches to make sure you are connecting to the outside network? What is the total output you are getting when running the sketch?

Franklin97355
 
Posts: 22674
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Please be positive and constructive with your questions and comments.