Pages: [1]   Go Down
Author Topic: Connecting WiFly Shield  (Read 270 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
I am trying to have WiFly shield connect to my wireless router.
I have Arduino Duemilanove and WiFly shield RN-131 stacked together. I was trying to run "WiFly_Autoconnect_Terminal" from the example in WiFly_Shield library. I have edited the Credentials.h to match my network but I get no responses not even "Association failed" message. I am sure the code is not the problem, am I missing or forgetting to do something?

Any advice would be appreciated, thank you.

Code:
#include <SPI.h>
#include <WiFly.h>

#include "Credentials.h"


void setup() {

  Serial.begin(9600);
  Serial.println("\n\r\n\rWiFly Shield Terminal Routine");
 
  WiFly.begin();
 
  if (!WiFly.join(ssid, passphrase)) {
    Serial.println("Association failed.");
    while (1) {
      // Hang on failure.
    }
  }
  Serial.println(WiFly.ip());
  Serial.println("Associated!");
}


void loop() {
  // Terminal routine

  // Always display a response uninterrupted by typing
  // but note that this makes the terminal unresponsive
  // while a response is being received.
  while(SpiSerial.available() > 0) {
    Serial.write(SpiSerial.read());
  }
 
  if(Serial.available()) { // Outgoing data
    SpiSerial.write(Serial.read());
  }
}

Code:
#ifndef __CREDENTIALS_H__
#define __CREDENTIALS_H__

// Wifi parameters
char passphrase[] = "12345678";
char ssid[] = "Testing";

#endif
Logged

Pages: [1]   Go Up
Jump to: