Hello,
I have some characters issues with my Wifi Shield 1.1 Seeed studio : when I send a GET request to my server (or any other), I have always respons with bad character, like this : „ˇïˇïˇ£ˇπˇ5kLÿµm”ly
Below my code
[code]
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <WiFly.h>
#define SSID “SSID”
#define KEY “YYY ;)”
// WIFLY_AUTH_OPEN / WIFLY_AUTH_WPA1 / WIFLY_AUTH_WPA1_2 / WIFLY_AUTH_WPA2_PSK
#define AUTH WIFLY_AUTH_WPA2_PSK
// Pins’ connection
// Arduino WiFly
// 2 <----> TX
// 3 <----> RX
SoftwareSerial uart(2, 3);
WiFly wifly(&uart);
//WiFly wifly(&Serial1); // for leonardo, use hardware serial - Serial1
void setup() {
uart.begin(9600);
Serial.begin(9600);
Serial.println("--------- WIFLY TEST --------");
// wait for initilization of wifly
delay(3000);
uart.begin(9600); // WiFly UART Baud Rate: 9600
wifly.reset();
Serial.println("Join " SSID );
if (wifly.join(SSID, KEY, AUTH)) {
Serial.println(“OK”);
} else {
Serial.println(“Failed”);
}
// get WiFly params
wifly.sendCommand(“get everthing\r”);
char c;
while (wifly.receive((uint8_t *)&c, 1, 300) > 0) {
Serial.print((char)c);
}
}
void loop() {
while (wifly.available()) {
Serial.write(wifly.read());
}
while (Serial.available()) {
wifly.write(Serial.read());
}
}[/code]
Thanks for your help !
Chomb