I’m trying to use the module and can’t get it to work at all.
I imported the libraries and made the following arduino sketch based off of the samples that should just connect to my laptop and tcp a simple message (I’ve tried to do this with another computer and my laptop side is fine).
From what I’ve understood from the tutorial, I need to reset the board (by pressing the function button three times) and then connect it to the arduino and the board will switch into SPI mode. Is that correct? I’ve tried doing that and got the same result.
Also I’m using the WizFI250 shield (not the WizFI250-EVB) so I don’t have the exactly same button layout as in the tutorial, and I can’t connect the board directly to my computer and read what it’s saying.
Could you help me with the following problem:
When I used the library and client sample provided here: seeedstudio.com/wiki/File:Wizfi250.zip
I got the shield to connect to my wifi (I saw it from another device when I did a network scan). However, my computer did not get a tcp connection from the board. Here is what the serial monitor showed(followed by a bunch more of [ERROR: INVALID INPUT}):
#include <Arduino.h>
#include "WizFi250.h"
#define SSID "MIAN-WIFI"
#define KEY "password"
#define AUTH "WPA2"
#define HOST_IP "192.168.168.192"
#define REMOTE_PORT 1122
#define LOCAL_PORT 1122
#define spi_CS 8
WizFi250 wizfi250(&Serial);
boolean returnValue=false;
void setup() {
//Serial1.begin(115200);
Serial.begin(115200);
pinMode(spi_CS,OUTPUT);
Serial.println("--------- WIZFI250 TEST --------");
// wait for initilization of Wizfi250
delay(1000);
Serial.println("Join " SSID );
wizfi250.reset();
delay(1000);
wizfi250.sendCommand("AT+WLEAVE\r");
delay(1000);
if (!wizfi250.join(SSID, KEY, AUTH)) {
Serial.println("Failed join " SSID);
Serial.println("Please Restart");
} else {
Serial.println("Successfully join " SSID);
wizfi250.sendCommand("AT+WSTAT\r");
delay(5);
char c;
while(wizfi250.receive((uint8_t *)&c, 1, 100) > 0) {
Serial.print((char)c);
}
delay(2000);
returnValue =wizfi250.connect(HOST_IP,REMOTE_PORT,LOCAL_PORT);
if(returnValue)
Serial.println("Now you can send data to Server or receive data from Server!");
}
}
unsigned int time_point = 0;
void loop() {
if(wizfi250.available()) {
Serial.print((char)wizfi250.read());
}
if(Serial.available()) {
wizfi250.print((char)Serial.read());
}
}
I tried using the tutorial for using the board with the Arduino Uno here: seeedstudio.com/wiki/Talk:Wifi_Shield_(Fi250
but I didn’t understand what “Blink” sketch they were talking about and how to upload it directly to the shield (I tried uploading the sample Blink sketch to the Uno with the shield connected and that yielded no results).
Unfortuanally, I don’t had been use library of Seeedstudio. So I can’t tell you right answer about your question.
I think you have better change UART pins of Fi250 using jumper pin in contrast with Arduino uart pin.