Giter VIP home page Giter VIP logo

wifly-shield's People

Contributors

afacchin avatar bobbrez avatar christineyen avatar drgenetik avatar ejorreto avatar frencil avatar jcrouchley avatar jmr13031 avatar markotibold avatar nicoverduin avatar santaimpersonator avatar sfe-chris avatar trimble avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wifly-shield's Issues

Doesn't seem to be working with Arduino mega ATmega1280

Hi,

I tried the fork of the library that is meant to get the WiFly shield working with the Mega here https://github.com/jmr13031/WiFly-Shield (since I can't raise issues over there, I am doing it here).

I have upgraded my Arudino IDE and rewired the pins as suggested here http://mcukits.com/2009/04/06/arduino-ethernet-shield-mega-hack/

But the shield still hangs at when trying to call WiFly.begin(); Basically I couldn't get the forked code to work with IDE 1.02.

But when I downgraded my IDE to "Arduino 022" and got the original code from http://sparkfun.com/Code/wifly/WiFly-20100519-023939.zip , it seems to be working fine. That rules out any hardware issues. (After I changed the pin mappings in spi.h. See my original travels with this stack here http://electronics.stackexchange.com/questions/3273/arduino-mega-and-wifly-shield )

Has anyone been able to successfully get the version of the shield here https://www.sparkfun.com/products/9954 (I believe it my be version 2) working with the Arduino IDE 1?

conflict with softSerial

I encountered an issue this week where softSerial (based on newSoftSerial) does not work in a project that also uses SpiSerial. The order of the include files makes a difference, and both seem to work if softserial.h is included first.

Not working with latest firmware (VERSION 4.00.1 4/19/2013)

It is a simple fix to get it working with latest firmware.

Perhaps this should be handled in a better way or could you have different branches for different firmwares?

@@ -158,7 +158,7 @@ boolean WiFlyDevice::enterCommandMode(boolean isAfterBoot) {
     // TODO: Find alternate approach or only use this method after a (re)boot?
     uart->println(F("ver"));

-    if (findInResponse("\r\nWiFly Ver", 1000)) {
+    if (findInResponse("\r\nwifly-GSX Ver", 1000)) {
       // TODO: Flush or leave remainder of output?
       // flush!! Why would want the remainder for every time we go into command mode?
       uart->flush();

Can't use multiple "Clients"

I can't seem to use multiple "Clients." Whenever I declare a second client, the device resets. If I try to set the old instantiation to a new connection, I get a compiler error.

Baudrate

I tried to change the baudrate from 9600 to 38400 or 115200 in https://github.com/sparkfun/WiFly-Shield/blob/master/SpiUart.h#L49 but nothing happens - the shield shows no reaction and I'm not able to connect to any wifi network.
To handle this issue I have updated the firmware from the wifly to 2.36 โ€ฆ (I'm using an Arduino SMD R2) but still nothing happens.

source: https://forum.sparkfun.com/viewtopic.php?p=146740#p146740

The high speed example in the newest code (as of June 28, 2012) doesn't work for me because it doesn't seem to set the baud rate for the SpiUart - it only sets the baud rate for the WiFly. To overcome this, I made the following change to SpiUart.h #define BAUD_RATE_DEFAULT 115200 // WiFly default baudrate

Web Client only working with the example file

Hi,

This is my code and I cannot get it work; any Help?

include <SPI.h>

include <WiFly.h>

include "Credentials.h"

String request = "GET /api/emotions/primary/totals HTTP/1.1";
String host = "wefeel.csiro.au";
char msg[128];
int lettercount = 0;
byte server[] = { 54, 84, 79, 112 }; // WeFeel

WiFlyClient client("54.84.79.112", 80);

void setup() {

Serial.begin(9600);

WiFly.begin();

if (!WiFly.join(ssid, passphrase)) {
Serial.println("Association failed.");
while (1) {
// Hang on failure.
}
}

Serial.println("connecting...");
delay(25000);
if (client.connect()) {
char c;
int dataFlag = 0;
int msgIsolator = 0;
Serial.println("connected");
Serial.println(request);
delay(25000);
client.println(request);
client.println("\r\n");
client.println(host);
client.println("\r\n\r\n");
delay(500);
client.print(c);
client.println();
client.flush();
client.read();
} else {
Serial.println("connection failed");
}

}

void loop() {
if (client.available()) {
char c = client.read();
Serial.print(c);
}

if (!client.available()) {
Serial.println();
Serial.println("disconnecting.");
client.stop();
for(;;)
;
}
}

How do I specify the pins for RX and TX?

I may just be missing something completely obvious, but I just don't see any way to specify which pins to use for TX and RX. I tried integrating directly through software serial, but ran into timing/buffer issues. I'm assuming that those issues have been solved in this library, but I don't think I can use it if I can't specify which pins are connected to the wifly module. Is there a reason I don't have to specify the pins or is there some way to specify the pins using this library?

After all the recent merges, it does not seem to compile...

First I got this...

SpiUart.cpp:240:1: error: unterminated #14

Which I was able to fix with an #endif on line 266, but now I'm getting this...

WiFlyClient.cpp:41: error: 'Client' has not been declared
WiFly/WiFlyClient.cpp: In function 'size_t write(byte)':
WiFlyClient.cpp:47: error: '_WiFly' was not declared in this scope
WiFlyClient.cpp: At global scope:
WiFlyClient.cpp:54: error: 'Client' has not been declared
WiFlyClient.cpp: In function 'size_t write(const char*)':
WiFlyClient.cpp:60: error: '_WiFly' was not declared in this scope
WiFlyClient.cpp: At global scope:
WiFlyClient.cpp:67: error: 'Client' has not been declared
WiFlyClient.cpp: In function 'size_t write(const uint8_t*, size_t)':
WiFlyClient.cpp:73: error: '_WiFly' was not declared in this scope
WiFlyClient.cpp: At global scope:
WiFlyClient.cpp:79: error: expected constructor, destructor, or type conversion before '.' token
WiFlyClient.cpp:82: error: expected unqualified-id before 'if'
WiFlyClient.cpp:88: error: expected constructor, destructor, or type conversion before '.' token
WiFlyClient.cpp:90: error: expected unqualified-id before 'if'
WiFlyClient.cpp:93: error: expected unqualified-id before 'else'

Hang on connect

Occasionally when calling client.connect() it will hang, rather than returning. If I reset the Arduino (and hence the shield), the next call will usually work. I have not been able to correlate it to a WiFi signal issue or network connectivity problem. This will happen at variable times after the last reset of the Arduino, e.g. after an hour, or sometimes after three days. My use case is a sensor array that posts HTTP data to a remote web site each minute.

I have taken a cursory look at the code to see if there are places with missing timeouts, but haven't found them yet.

I'm using the latest code from the repo.

Setting DEBUG_LEVEL to 1 results in compile errors

Setting

   #define DEBUG_LEVEL 1

results in this compile error for every location where a variable is passed as second parameter to DEBUG_LOG():

C:\Users\Jonas\Desktop\arduino-1.0.4\libraries\WiFly\WiFlyDevice.cpp:51: error: initializer fails to determine size of '__c'

Bug in SpiUart.cpp

in SpiUartDevice::available() there is a delay(2) statement causing Serial output to become garbled. Imade a change ready to be committed. If I did it right.
Regards
Nico

Support searching for multiple responses in sendInCommand()/findInResponse()

Feel free to reject this isssue. It's just my idea on how to more robustly handle errors from commands.

In a nutshell, it seems this library is very similar to Expect. We are basically issuing commands and then pattern matching to find a response.

One of the features that Expect supports is providing a list of patterns that it can search for and what action it should take if any pattern in the list is found,

How I would suggest implementing that feature in WiFly-Shield would be modifying the "toMatch" argument of findInResponse() to be:
int findInResponse(char **toMatch, ...

You would provide the function with a list of matches it would look for. If it finds a match to an item within the list before the timeout expires, the function would return that matches offset in the provided list. If the timeout expires, the function would return -1.

Upgrade firmware - Roving Network-RN-171 - WiFly-EZX.img / 2:38.3

Dear,
I have used this library in conjunction with the SparkFun module (rn-171/Roving Networks) in some projects that I developed, but in two other modules that I purchased recently, I upgraded the firmware to version (WiFly-EZX.img / 2:38 .3) and with this using the example of the library (WiFly_PachubeClient) can no longer update the information on the website of Cosm (Pachube), the response back from the server is (Bad 400), it is interesting that the same code used in another module with the firmware version works perfectly 2:32.
Could anyone tell me how to solve the problem?

Thank you in advance!

Support for Webduino

Hi all,

I'm attempting to modify the wonderful Webduino library to support the WiFly. It's pretty straightforward since the WiFly lib's client-server classes are api-compatible with the Ethernet library, which Webduino is designed around.

However, when the server process loop attempts to assign server.available() to a client variable:

client = server.available();

I'm getting:

WiFlyClient.h:14: error: non-static reference member 'WiFlyDevice& WiFlyClient::_WiFly', can't use default assignment operator

I'm not sure why this is happening. I've tried all kinds of things to fix it to no avail. Any insights?

Timer wrapping in findInResponse

Line 22 in WiFlyDevice.cpp:
unsigned int timeOutTarget; // in milliseconds
needs to be changed to an unsigned long:
unsigned long timeOutTarget; // in milliseconds
otherwise it will wrap in minutes instead of days. This makes findInResponse really unreliable.

does not compile under arduino 1.0 IDE

WProgram.h needs to be arduino.h in the 1.0 IDE, Needs something like this in _Spi.h ...

if defined(ARDUINO) && ARDUINO >= 100

include "Arduino.h"

else

include "WProgram.h"

endif

And for some reason, the overloads of "write" function are not working....

In file included from C:\arduino-1.0\libraries\WiFly/WiFly.h:4,
from WiFly_WebServer.cpp:9:
C:\arduino-1.0\libraries\WiFly/SpiUart.h:62: error: conflicting return type specified for 'virtual void SpiUartDevice::write(byte)'
C:\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
In file included from C:\arduino-1.0\libraries\WiFly/WiFly.h:8,
from WiFly_WebServer.cpp:9:
C:\arduino-1.0\libraries\WiFly/Client.h:21: error: conflicting return type specified for 'virtual void Client::write(byte)'
C:\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
C:\arduino-1.0\libraries\WiFly/Client.h:23: error: conflicting return type specified for 'virtual void Client::write(const uint8_t_, size_t)'
C:\arduino-1.0\hardware\arduino\cores\arduino/Print.h:50: error: overriding 'virtual size_t Print::write(const uint8_t_, size_t)'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.