I bought bad wifi shield from seedstudio, shield with rn-171 model named WLS06201P
I wanted to try send multiple http get parameters but fails. I need a help. Maybe somebody knows how this bad shield work
when I run this code below, I am opening serial monitor and only I see "Failed to parse URL" and "Path buffer is too small"
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <WiFly.h>
#include "HTTPClient.h"
#define SSID "Your-SSID"
#define KEY "passphrase"
// WIFLY_AUTH_OPEN / WIFLY_AUTH_WPA1 / WIFLY_AUTH_WPA1_2 / WIFLY_AUTH_WPA2_PSK
#define AUTH WIFLY_AUTH_WPA2_PSK
#define HTTP_GET_URL "http://myserver.com/workingservice.aspx?sectiona=12345§ionb=98765"
// Pins' connection
// Arduino WiFly
// 2 <----> TX
// 3 <----> RX
WiFly wifly(2, 3);
HTTPClient http;
char get;
void setup() {
Serial.begin(9600);
Serial.println("------- WIFLY HTTP --------");
// Wait WiFly to init
// delay(3000);
wifly.reset();
while (1) {
Serial.println("Try to join " SSID );
if (wifly.join(SSID, KEY, AUTH)) {
Serial.println("Succeed to join " SSID);
wifly.clear();
break;
} else {
Serial.println("Failed to join " SSID);
Serial.println("Wait 1 second and try again...");
delay(1000);
}
}
Serial.println("\r\nTry to get url - " HTTP_GET_URL);
Serial.println("------------------------------");
while (http.get(HTTP_GET_URL, 10000) < 0) {
}
while (wifly.receive((uint8_t *)&get, 1, 1000) == 1) {
Serial.print(get);
}
}
void loop() {
int c;
while (wifly.available()) {
c = wifly.read();
if (c > 0) {
Serial.write((char)c);
}
}
while (Serial.available()) {
c = Serial.read();
if (c >= 0) {
wifly.write((char)c);
}
}
}