0

Adafruit FONA 800 Shield fails to connect to Adafruit IO
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Adafruit FONA 800 Shield fails to connect to Adafruit IO

by jimk123 on Sun Sep 29, 2019 6:50 pm

Adafruit FONA 800 Shield - Voice/Data Cellular GSM for Arduino PRODUCT ID: 2468
Using a Arduino UNO board
I setup a Ting SIM card and ran the sample code Arduino\libraries\Adafruit_FONA\examples\FONAtest
and was able to send a SMS so the SIM card seems OK

Then I loaded the sample code for adafruit IO and set the config.h to

#define IO_USERNAME "myid from adafruit IO"
#define IO_KEY "key from adafruit IO"
and uncommented these lines:
#include "AdafruitIO_FONA.h"
AdafruitIO_FONA io(IO_USERNAME, IO_KEY);


using Win10 IDE 1.8.5

when I compiled I got this warning but it uploaded
C:\Users\Jim\Documents\Arduino\libraries\Adafruit_IO_Arduino\src/AdafruitIO_FONA.h:45:18: warning: extra qualification 'AdafruitIO_FONA::' on member 'networkStatus' [-fpermissive]

aio_status_t AdafruitIO_FONA::networkStatus()

and in the serial console I saw this:

connecting to Adafruit IOAttempting to open comm with ATs
---> AT
<---
---> AT
<---
this goes on for awhile...

---> AT
<---
---> AT
<---
Timeout: No response to AT... last ditch attempt.
---> AT
<---
---> AT
<---
---> AT
<---
---> ATE0
<---
---> ATE0
<---
IO.STATUS=10 Network connection failed.

Code: Select all | TOGGLE FULL SIZE
#include "config.h"

// set up the  feeds
  AdafruitIO_Feed *lightlevel = io.feed("lightlevel");
  int ctr =0;



void setup() {

  // start the serial connection
  Serial.begin(115200);

  // wait for serial monitor to open
  while(! Serial);

   // connect to io.adafruit.com
  Serial.print("Connecting to Adafruit IO");
  io.connect();

  // wait for a connection
  while(io.status() < AIO_CONNECTED) {
    Serial.print("IO.STATUS=");Serial.print(io.status());Serial.print(" "); Serial.println(io.statusText());
   
    delay(500);
  }

  // we are connected
  Serial.println();
  Serial.println(io.statusText());
  Serial.println("SETUP - CONNECTED");

}

// io.run(); is required for all sketches.
// it should always be present at the top of your loop
// function. it keeps the client connected to
// io.adafruit.com, and processes any incoming data.
 
void loop() {
  Serial.println("io.run");
  io.run();
  ctr++;
  Serial.print("CTR: ");Serial.println(ctr);
  lightlevel->save(ctr);
  delay(30000); // wait 30 seconds
}

Thoughts ?

jimk123
 
Posts: 209
Joined: Sun Dec 26, 2010 7:04 pm

Please be positive and constructive with your questions and comments.