WiFly Shield code library alpha 2 release

For the discussion of Arduino related topics.

Moderator: phalanx

follower
Posts: 280
Joined: Sun Mar 14, 2010 11:58 pm

Re: WiFly Shield code library alpha 2 release

Post by follower » Fri Jan 07, 2011 5:36 am

takha wrote:Well i modified your server sketch to light up an LED over wifly, but the problem is due to the space restrictions on arduino, i can only place an 'on' and 'off' post button using html to display on the computer browser to operate the LED.
If you put strings in "PROGMEM" you can have larger pages. Additionally you could look into using something like a MicroSD shield to store the pages.
What i really want to do is have a proper website on the computer with the relevant buttons to operate something on the arduino using wifly. Any help would be greatly appreciated.
If you have your server with full web pages on your PC, you could then have that make a request to a server sketch running on your Arduino. Because the sketch running on your Arduino would only need to parse the request string and not display any HTML it would require less memory.

e.g. The PC server might make requests to the Arduino server like:

Code: Select all

http://10.1.1.4/action/light/on

http://10.1.1.4/action/stereo/off

http://10.1.1.4/action/blender/pulse
You could use something like the TextFinder library to help parse the requests.

Another solution would be to modify Firmata (or one of the "command driven" sketches available) to receive instructions via the WiFly. (Probably via a telnet or raw socket connection.)

--Philip;

takha
Posts: 3
Joined: Wed Jan 05, 2011 6:08 am

Re: WiFly Shield code library alpha 2 release

Post by takha » Fri Jan 07, 2011 6:00 pm

Thanks for the advice, the text finder seems to be the exact tool i need, guess i'll find out after a little testing. Off to the drawing board :idea:

Bmake
Posts: 3
Joined: Mon Jan 17, 2011 8:52 am

Re: WiFly Shield code library alpha 2 release

Post by Bmake » Mon Jan 17, 2011 11:04 am

Does this thing not work with WEP with No authentication (open) (10 HEX number passkey)

follower
Posts: 280
Joined: Sun Mar 14, 2010 11:58 pm

Re: WiFly Shield code library alpha 2 release

Post by follower » Mon Jan 17, 2011 11:13 am

Bmake wrote:Does this thing not work with WEP with No authentication (open) (10 HEX number passkey)
According to the User Manual it supports:
Secure WiFi authentication WEP-128, WPA-PSK (TKIP), WPA2-PSK (AES).
The current release of Wifly firmware supports these security modes:
• WEP-128 (open mode only, NOT shared mode)
• WPA2-PSK (AES only)
• WPA1-PSK (TKIP only)
• WPA-PSK mixed mode (some APs, not all are supported)
--Philip;

rickburgen
Posts: 11
Joined: Sun May 17, 2009 5:58 pm

Re: WiFly Shield code library alpha 2 release

Post by rickburgen » Mon Jan 24, 2011 3:45 pm

Hi All,

Great work on this WiFly library so far. My question(if it hasn't been answered already) is, how is the MAC Address handled. I know with the Ethernet class you have to provide one.

Thanks,
Rickburgen
oH h4X!

follower
Posts: 280
Joined: Sun Mar 14, 2010 11:58 pm

Re: WiFly Shield code library alpha 2 release

Post by follower » Thu Feb 03, 2011 8:19 am

rickburgen wrote:Great work on this WiFly library so far.
Thanks. Apologies for the delay in answering.
My question(if it hasn't been answered already) is, how is the MAC Address handled. I know with the Ethernet class you have to provide one.
Each WiFly module has a MAC address hardcoded--there's a sticker on the module that shows the address.

The module handles the MAC address directly so you don't have to (nor can you) supply it to the library.

--Philip;

rickburgen
Posts: 11
Joined: Sun May 17, 2009 5:58 pm

Re: WiFly Shield code library alpha 2 release

Post by rickburgen » Sun Feb 06, 2011 10:21 am

I do not have a sticker on my Shield. So how can I get it another way.

Also, When I call join on the WiFly class in the setup function, it doesn't hang or initiate it just keeps trying to connect(I assume). What would cause this?
oH h4X!

follower
Posts: 280
Joined: Sun Mar 14, 2010 11:58 pm

Re: WiFly Shield code library alpha 2 release

Post by follower » Mon Feb 07, 2011 6:55 am

rickburgen wrote:I do not have a sticker on my Shield. So how can I get it another way.
Upload the 'SpiUartTerminal' sketch from the File > Examples > WiFly > tools menu. Open the serial monitor. Enter "$$$" as directed (without line endings). Enable line ending and type this followed by the enter/return key or send button:

Code: Select all

get mac
You should get a response similar to:

Code: Select all

Mac Addr=00:ca:fe:00:be:ef
Why do you want the MAC address?
When I call join on the WiFly class in the setup function, it doesn't hang or initiate it just keeps trying to connect(I assume). What would cause this?
Can you provide more detail on this please?

--Philip;

rickburgen
Posts: 11
Joined: Sun May 17, 2009 5:58 pm

Re: WiFly Shield code library alpha 2 release

Post by rickburgen » Fri Feb 11, 2011 3:22 pm

Thanks for your reply.

When I try to get the MAC Address, this what I see, and entering $$$ or get mac seems to have to effect(serial continues to output "Auto-Assoc roving1 chan=0 mode=NONE FAILED").
SPI UART on WiFly Shield terminal tool
--------------------------------------

This is a tool to help you troubleshoot problems with the WiFly shield.
For consistent results unplug & replug power to your Arduino and WiFly shield.
(Ensure the serial monitor is not open when you remove power.)

Attempting to connect to SPI UART...
Connected to SPI UART.

* Use $$$ (with no line ending) to enter WiFly command mode. ("CMD")
* Then send each command followed by a carriage return.

Waiting for input.

Auto-Assoc roving1 chan=0 mode=NONE FAILED

And here is my setup function, the serial never outputs "here" or "Associated"
void setup() {

Serial.begin(9600);
Serial.println("\n\r\n\rWiFly Shield Terminal Routine");

WiFly.begin();

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

Serial.println("Associated!");
}
oH h4X!

magopo
Posts: 1
Joined: Fri Feb 25, 2011 8:17 am

Re: WiFly Shield code library alpha 2 release

Post by magopo » Fri Feb 25, 2011 8:32 am

I have the same problem as rickburgen
rickburgen wrote: Also, When I call join on the WiFly class in the setup function, it doesn't hang or initiate it just keeps trying to connect(I assume). What would cause this?
I changed the "Credentials.h" for the put my ssid and passphrase network, but in the passphrase I leave it clear cause my networks is open but it doesn't work.

I'm using WiFly_Autoconnect_Terminal sketch and the code of Credentials.h is:

Code: Select all

#ifndef __CREDENTIALS_H__
#define __CREDENTIALS_H__

// Wifi parameters
char passphrase[] = "";
char ssid[] = "PRUEBA";

#endif
the result on the Serial Monitor is:

WiFly Shield Terminal Routine
just that

LMas
Posts: 33
Joined: Sun May 09, 2010 6:22 pm

Re: WiFly Shield code library alpha 2 release

Post by LMas » Fri Mar 04, 2011 9:42 am

Hi i am using WEP-128 and so far didint had any big problems looks like it works quit stable left it on for 4 days and nights and after still connected to my hosted web page.

Thanx again for you work on library Philip.

siaco
Posts: 3
Joined: Fri Mar 18, 2011 3:34 am

Re: WiFly Shield code library alpha 2 release

Post by siaco » Fri Mar 18, 2011 3:39 am

Hi I use your library on arduino mega 2560 and wifly shield. All sketch i've tried don't work. When the procedur going to activate the spi_uart it's block. Whatever char i send in the terminal don't produce effect. What i do wrong?

stephanschulz
Posts: 13
Joined: Mon Mar 28, 2011 12:52 pm

Re: WiFly Shield code library alpha 2 release

Post by stephanschulz » Mon Mar 28, 2011 1:23 pm

hi.

is it possible to use this library for the WiFly GSX Breakout by somehow not using the SPI part of this library ?

Thanks,
Stephan.

resamsel
Posts: 1
Joined: Fri Apr 01, 2011 8:00 am

Re: WiFly Shield code library alpha 2 release

Post by resamsel » Fri Apr 01, 2011 8:09 am

Hi,

is there any chance to get the WiFly library to work with the Bonjour/Zeroconf library (http://gkaindl.com/software/arduino-ethernet/bonjour)? Is there anything "obvious" that I can do (I'm not too experienced with C programming)?

Thanks
René

PS: I appreciate your work a lot!

roadfun
Posts: 17
Joined: Sat Apr 30, 2011 1:30 pm

Re: WiFly Shield code library alpha 2 release

Post by roadfun » Sun May 01, 2011 8:00 am

From my attempts to connect to my WPA network and a reading of the library source code it appears this library does not support spaces in the SSID. Is that correct? It wasn't obvious why this doesn't work (I tried connecting with both a space in the name and replacing the space with a $). I verified WiFly works OK with my network by modifying the sketch Gary posted (i.e. by not using the library). Using that I can connect just fine (with a $ substituted for the space).

I'd prefer to use the library and wouldn't mind implementing the TODO noted in the library source code to add support for spaces/$. But it's not clear why neither a space nor a $ works in the Library. If you know where in the code (uart.print?) the limitation exists it would save me some time...

Post Reply