WiFly Shield code library alpha 2 release

For the discussion of Arduino related topics.

Moderator: phalanx

WiFly Shield code library alpha 2 release

Postby follower » Thu Dec 16, 2010 6:18 am

Thanks once again for your feedback on the WiFly Shield code library alpha 1 release.

There's now an alpha 2 release available for download and testing: http://sparkfun.com/Code/wifly/WiFly-20 ... lpha-2.zip

A number of new features in this release: support for joining open networks; supporting for joining WEP networks (mostly untested--feedback welcome); much more reliable startup--including automatic retries; troubleshooting tools; new configuration location.

NOTE: If you have an older revision of the shield you need to modify the value 'SHIELD_REVISION' in the file 'Configuration.h'.

The changelog for this release is:

Code: Select all
+ alpha 2 -- 17 December 2010 -- "Azalea Galaxy"

  * NOTE: New configuration location! You now need to modify the value
          of 'SHIELD_REVISION' in the file 'Configuration.h' to
          indicate what revision of the WiFly shield you are
          using. See the documentation in the file for further
          detail. The value defaults to the most recent revision sold
          at the time of the code release.

  * Added support for joining Open networks (i.e. without a passphrase or key).

  * Added (untested) WEP network support.

  * Modified software reboot to hopefully work more reliably.

  * Added support for hardware reset which should be more reliable than
    software reboot on board revisions that support it (currently only the
    most recent revision).

  * Modified command mode entry method to hopefully work more
    reliably.  Includes use of guard time as originally inspired by
    World Mood Light.

  * Added 'SpiUartTerminal' troubleshooting tool.

  * Added 'HardwareFactoryReset' tool to help with troubleshooting.

  * Added support for further board revision feature support configuration.

  * Added some debugging support.


Don't forget the source code repository is now online: https://github.com/sparkfun/WiFly-Shield

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

Re: WiFly Shield code library alpha 2 release

Postby follower » Mon Dec 27, 2010 1:55 am

[I've moved this reply from this thread as the question relates to Alpha 2.]

CyberPunk wrote:I have my Wifly Shield mounted on a MEGA 1280 and re-circuited the 10,11,12,and 13 pins to 53,51,50,52.
Can anyone else comment on the Mega use? This question reminded me I still haven't tested with a Mega and I don't have one with me right now to verify.

I've tried the WiFly Auto Connect sketch which i got from the SoundBox page and results show that i can't associate with my network.
By "SoundBox" do you mean "Voice Box"?

Since you're using Alpha 2 I suggest you try 'SpiUartTerminal' sketch included with it under File > Examples > WiFly > tools.

My router is using WEP 128 encryption.
Just to check, you don't have MAC-based access control operating do you? Also, I note the WiFly library mentions this in regard to WEP 128: "(open mode only, NOT shared mode)" does this affect you?

Can you please try again with the 'SpiUartTerminal' sketch and paste the result in your follow up post here? (You'll want to remove the password first. :) )

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

Re: WiFly Shield code library alpha 2 release

Postby follower » Tue Dec 28, 2010 7:45 am

follower wrote:
CyberPunk wrote:I have my Wifly Shield mounted on a MEGA 1280 and re-circuited the 10,11,12,and 13 pins to 53,51,50,52.
Can anyone else comment on the Mega use? This question reminded me I still haven't tested with a Mega and I don't have one with me right now to verify.
I have since verified release Alpha 2 of the library works successfully on an Arduino Mega with the pins jumpered as described.

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

Re: WiFly Shield code library alpha 2 release

Postby CyberPunk » Tue Dec 28, 2010 10:19 am

philip, thanks for the promt reply.
initially my router was on WEP 128 OPEN key encryption with 13 ASCII codes. I've tried the SpiUartTerminal provided in the alpha2 tools folder, these are the commands i've entered in the terminal:

these are the commands i used and it's able to associate with my router but then my router did not assign any IP address for the Wifly:
factory RESET
save
(unplug and plug back into usb, and start terminal)
set wlan auth 1
set wlan phrase <password>
set wlan ssid <ssid>
join <ssid>

Wifly replied "Associated!"

but when i enter "get ip"
it shows "0.0.0.0:2000" which means my router did not assign any IP to the wifly.
DHCP is enabled on my router.

when i enter "show net"
one of the line shows that "DHCP=FAIL"

But in the end of the day i got fed up and just changed my router encryption key to Mixed WPA/WPA-2 PSK and try uploading the sketch again.
this time it works! and it has been successfully associated with the wifly.
But it got me wonder why can't it associate with my router WEP 128 settings since i've already set the wifly to WEP authentication.
CyberPunk
 
Posts: 5
Joined: Mon Dec 27, 2010 12:43 am

Re: WiFly Shield code library alpha 2 release

Postby CyberPunk » Tue Dec 28, 2010 10:54 am

umm.. i just got back my arduino board from my friend. before this the tx and rx led only lights up when there are data transmission.. but right now both of the tx and rx led is lighted up and not blinking... what could this mean? before this i uploaded the webserver sketch and everything works properly, i'm able to surf to the wifly ip via browser.. but now i upload the same sketch and i type in the wifly ip address there's no response. whats happening? :(
CyberPunk
 
Posts: 5
Joined: Mon Dec 27, 2010 12:43 am

Re: WiFly Shield code library alpha 2 release

Postby StaticDet5 » Mon Jan 03, 2011 5:42 pm

So, Follower.... Once we've worked with this for close to 4 months, and had it fail at every turn, to the point that despair has set in....

What can we do to thank you when your latest efforts have yielded results, right out of the box? :lol:

Seriously, I'm a poor broke college student, but I can scrape up some cash. I'll scrawl your name across overpasses on the information superhighway.... I just can't think of suitable props at this point.

THANK YOU 8)
Static
StaticDet5
 
Posts: 215
Joined: Tue Oct 12, 2010 8:08 am

Re: WiFly Shield code library alpha 2 release

Postby follower » Mon Jan 03, 2011 9:21 pm

CyberPunk wrote:but when i enter "get ip"
it shows "0.0.0.0:2000" which means my router did not assign any IP to the wifly.
DHCP is enabled on my router.

when i enter "show net"
one of the line shows that "DHCP=FAIL"
To me this suggests there's an issue with how your router's DHCP implementation operates--or how the WiFly interacts with it--did you check your router's error logs? IMO you're better to stick with WPA anyway. :)

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

Re: WiFly Shield code library alpha 2 release

Postby StaticDet5 » Tue Jan 04, 2011 4:51 pm

Not all of the router security modes are supported. Take a look at the user manual (Import to note: We're up to version 2.21), page 19:
http://www.rovingnetworks.com/documents/WiFlyGSX-um.pdf

My Verizon router is very particular in what it will and won't do.

I've made tremendous progress with the WiFly Shield over the past day. I'm able to access the system over the serial monitor and by telnet.

I can't seem to set the port to 80.
When I type "get ip", the WiFly says that it is on the correct IP and port 80, but when I try to telnet over to port 80 or access the device through a browser, it just doesn't work.
Even when the WiFly says it is on port 80, I can still telnet over port 2000.

Anyone else having this happen?
Static
StaticDet5
 
Posts: 215
Joined: Tue Oct 12, 2010 8:08 am

Re: WiFly Shield code library alpha 2 release

Postby follower » Wed Jan 05, 2011 3:25 am

StaticDet5 wrote:What can we do to thank you when your latest efforts have yielded results, right out of the box? :lol:
Great! So I take it you got your shield working then? :) Did you use the hardware factory reset tool or did the examples in Alpha 2 "just work" for you when you used them?

I just can't think of suitable props at this point.
Hey, I appreciate your thanks and having a forum post I can send to Nathan (SparkFun CEO) to remind him I'm a good investment is props enough. :)

Thanks. :)

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

Re: WiFly Shield code library alpha 2 release

Postby follower » Wed Jan 05, 2011 3:29 am

StaticDet5 wrote:Not all of the router security modes are supported.
While that's true, AFAICT in the case above the network gets associated with okay but fails to provide an IP address via DHCP.

I can't seem to set the port to 80.
When I type "get ip", the WiFly says that it is on the correct IP and port 80, but when I try to telnet over to port 80 or access the device through a browser, it just doesn't work.
Even when the WiFly says it is on port 80, I can still telnet over port 2000.
Are you using the library to do this? I know I had a similar issue when I was writing the library until I discovered that the port needs to be set before you join the network.

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

Re: WiFly Shield code library alpha 2 release

Postby takha » Wed Jan 05, 2011 6:19 am

Hi everyone,

I am new to this forum, i got my wifly board a month ago but really did not work on it too much until now. Btw kudos to "follower" on a marvelous job with the wifly library. I would like some advice on how to setup the wifly as a client, i know the library has an example on it, but i want to use my computer as a server to broadcast commands to the wifly, so far i am confused on how to go about it, also i am kinda an amateur when it comes to programming, so forgive me for asking stupid questions.

@ StaticDet5, i can connect to the wifly using telnet on port 80, when i send keyboard commands to it, i can see the data receive red LED light up but do not see anything echo back to the console, but when i connect using the com port everything works fine. I have no clue as to why this occurring though.

Any answers to my question would be much appreciated.
takha
 
Posts: 3
Joined: Wed Jan 05, 2011 6:08 am

Re: WiFly Shield code library alpha 2 release

Postby follower » Wed Jan 05, 2011 10:28 pm

takha wrote:Btw kudos to "follower" on a marvelous job with the wifly library.
Thanks. :)

I would like some advice on how to setup the wifly as a client, i know the library has an example on it, but i want to use my computer as a server to broadcast commands to the wifly, so far i am confused on how to go about it
When you say you want your computer to broadcast commands that makes it sound like you actually need the Arduino as the server and the computer as the client.

@ StaticDet5, i can connect to the wifly using telnet on port 80, when i send keyboard commands to it, i can see the data receive red LED light up but do not see anything echo back to the console, but when i connect using the com port everything works fine. I have no clue as to why this occurring though.
What sketch are you using?

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

Re: WiFly Shield code library alpha 2 release

Postby StaticDet5 » Thu Jan 06, 2011 12:57 am

I haven't gotten either the client or server samples to work.
So far I've been using either the SPIUart sketch or the Factory Reset sketch to get things done.

Trying to get the client and/or server sketches to work has been a little problematical. I'm not getting any information over the serial monitor, and I have not been able to connect to the WiFly over the internet.
Static
StaticDet5
 
Posts: 215
Joined: Tue Oct 12, 2010 8:08 am

Re: WiFly Shield code library alpha 2 release

Postby follower » Thu Jan 06, 2011 1:27 am

StaticDet5 wrote:So far I've been using either the SPIUart sketch or the Factory Reset sketch to get things done.
Am I correct in understanding that using the hardware factory reset sketch is what solved your initial problem with "junk characters"?

Trying to get the client and/or server sketches to work has been a little problematical. I'm not getting any information over the serial monitor, and I have not been able to connect to the WiFly over the internet.
Can you describe this with some more detail? Please include copy/paste of anything in the Serial Monitor.

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

Re: WiFly Shield code library alpha 2 release

Postby takha » Fri Jan 07, 2011 2:24 am

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.

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.
takha
 
Posts: 3
Joined: Wed Jan 05, 2011 6:08 am

Next

Return to Arduino

Who is online

Users browsing this forum: No registered users and 4 guests