Pages: [1]   Go Down
Author Topic: A few WiFi questions.  (Read 2159 times)
0 Members and 1 Guest are viewing this topic.
Netherlands
Offline Offline
Full Member
***
Karma: 3
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings,

at the moment I'm using an ethernet shield for my Arduino (2560) device and
all runs fine except for the long wires all over the place ;-) I'm looking for a
WiFi solution so I started scrutinizing the 'official' WiFi library and the
also 'official' shield. To my surprise I couldn't find a way to set a static IP
address for my device (the library seems to rely on a DHCP server on the
network). My first question is: is this true or did I overlook something
in the software?

I also looked at the ASync Lab WiFi shield and the accompanying software but
it seems that one can only use that shield for a webserver configuration
(i.e. listening for http requests and spewing back html code). My second
and third question: is it true that this shield can only be used for
webserver applications? Or can this shield also be used with the 'original'
library software?

thanks for any tips, hints or answers.

kind regards,

Jos
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
is this true or did I overlook something in the software?

Yes, this is true, for the current version of the firmware (and libarary) there's not possibility to set the IP from the Arduino.

Quote
is it true that this shield can only be used for
webserver applications?

No, here's an example application
http://asynclabs.com/wiki/index.php?title=WebClient_sketch

Quote
Or can this shield also be used with the 'original'
library software?

No, it can't. The Asynclabs WiShield uses the Arduino process the TCP/IP stack where the Arduino Wifi Shield has it's own processor for that.
Logged

Netherlands
Offline Offline
Full Member
***
Karma: 3
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much for your reply; it completely answered my questions. Especially that link was very valuable; it showed that one
can reconfigure the library to make it a web client instead of a web server, but still it speaks the http protocol; that protocol is too
verbose for my needs, I need a server/client than can just send bytes to the other party (it's a private protocol and much terser
than that http protocol). So the second shield is not what I need; the first shield is fine except for the lack of being able to specify
a static IP address. (a server with a changing IP address is a bit funny imho).

thanks again and

kind regards,

Jos
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The web client example should be illustrative enough to show you how any client can be implemented. There are other examples in the appropriate directory in the library distribution. Probably SimpleClient is better suited for your needs.
Logged

Netherlands
Offline Offline
Full Member
***
Karma: 3
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think I prefer the other board: one thing is that the entire TCP/IP stack is out of the way and the other 'advantage' is that the other library doesn't carry all the (for me unused) http overhead with it (memory space is precious ;-)

kind regards,

Jos
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Which is the "other" board?

Both of them don't have HTTP overhead, they communicate on the TCP socket layer. Just because an example is often made with the most commonly used protocol on the internet it doesn't have to mean that you cannot do any other protocol.
Logged

Netherlands
Offline Offline
Full Member
***
Karma: 3
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

By the 'other board' I mean the 'official' Arduino WiFi shield; it does almost everything I want (by reading the documentation); I haven't bought any of those Wifi shields yet but I can't find any documentation for the Async Labs shield whatsoever; especially nothing for those uip*.cpp and uip*.h files; I don't want to hack my way through it just to find out that the shield can't do what I want/need (my requirements aren't that demanding though ;-)

kind regards,

Jos
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Both boards have the same problem: they have a library which doesn't support all features but the underlying hardware module (which does the actual WiFi communication) is undocumented (at least without signing an NDL). If you can live with the functionality the library offers, you may go with either shield but extending and adapting is almost impossible with both shields, unfortunately.
Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 292
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you already have an Ethernet shield that you could continue to use for this project, then buying a rather expensive WiFi shield is unnecessary.
You don't need a WiFi shield to do WiFi with an Arduino board. You can simply buy a little pocket router for $30, for example a TP-Link wr702n and connect it with the short Ethernet cable that comes with it to the Ethernet card and you're in business.

I've done this in two projects already and it works like a charm!
« Last Edit: October 12, 2012, 07:38:52 pm by Headroom » Logged


Netherlands
Offline Offline
Full Member
***
Karma: 3
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Headroom: I experimented with a similar configuration (I forgot the brand of that little router) and it worked great, except for the form factor; we want to embed the entire thing in a couple of (230V) AC outlets (and then some); two small shields stacked on top of eachother would be ideal; an additional router would become too large (I'm just responsible for the software, so don't shoot me, aim for the hardware guy ;-)

kind regards,

Jos
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good day JosAH,

I believe we are implementing the same thing and we're in the same situation.

I'm trying to implement an arduino WiFi shield onto my project that is currently running a ethernet shield. is it compatible? will it work by just modifying the code?

cheers
Logged

Netherlands
Offline Offline
Full Member
***
Karma: 3
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A wired ethernet shield and an Arduino WiFi shield are more or less compatible; one thing: you can't set a fixed IP address for the Arduino Wifi shield (a server with a changing IP address is a bit clumsy imho). The software for that other shield (Async Labs) is a mess because of a total lack of documentation (at least I haven't found it yet). It is based on a uip (micro IP) stack and there is a http server (or client) written on top of it; the uip stack comes from a Swedish university (according to the code itself). It should be possbile to use TCP sockets but I don't know how (due to the lack of that documentation). Software wise the best solution (for me at least) is an ordinary wired ethernet shield and a tiny wireless router ... but I'm open for any other acceptable solution ;-)

kind regards,

Jos
Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 292
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have to go the WiFi route - and I question that this  is always necessary - and size matters to may want to look at the Platinum @ diysandbox.com. It integrates an Arduino compatible processor and a Gainspan WiFi module into a unit much smaller than any Arduino+Shield configuration.

Before attempting a solution with a WiFi router I tried my luck with a WiShield or the CopperHead - a clone of the WiShield. Ascynlabs, the maker of the WiShield closed their doors so ther is little if any development on the software side and there is not much traffic on the forum. I got it to receive raw UDP, but that was it. I could not integrate the ArdOSC and DHCP/Bonjour libraries to work.

While physical size is not so much of a concern in my projects trippylighting.com, due to the ( compiled) code size I wanted something with more flash memory than the UNO and found the fully Arduino compatible Teensy and Teensy++ controllers. The Teensy++ has 128k of flash which solved that problem. These boards are a magnitude smaller than an Arduino UNO not to speak about an Arduino Mega. You can combine a Teensy http://www.pjrc.com/teensy/ with a WizNet Ethernet module that works equivalent to an Ethernet shield http://www.saelig.com/BRD/ETH042.htm, or if that still is not small enough you can use this one http://www.saelig.com/BRD/BRD032.htm

All of the above is much, much smaller that an Arduino Mega with a WiFi shield. I have the Teensy++ connected with an Adapter board to the WIZ812 module in two projects, connected to a TP-Link WR703n in one case and a TP-Link WR702n in the other case. Works flawlessly in both cases.

The TP-Link routers are each around $30 and their footprint is half the site of an iPhone4 and about 2.5 times as thick.

The other approach for your project is to have only one WiFi shield on a central Arduino that communicates to the Internet and use another wireless technology - Xbee for example - to communicate to the units that are installed in the electrical outlets.

Logged


Netherlands
Offline Offline
Full Member
***
Karma: 3
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Those are a nice bunch of tips and links; thank you very much for those. I find the stuff from diysandbox quite interesting (too bad they're out of stock now) and I most certainly have a look at that Teensy++ thing ...

kind regards,

Jos
« Last Edit: October 13, 2012, 02:26:31 pm by JosAH » Logged

Minnesota
Offline Offline
Newbie
*
Karma: 1
Posts: 15
Living each day byte by byte
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I know I'm a bit late on this topic, but came across it while looking to implement the same type of thing.

Regarding the dynamic IP with the wifi shield, my plan is to just have the client (arduino project) connect to the server (which has a static ip on local net) and pass it's ip to the server.  That way it doesn't matter whether it's static or dynamic.  The server will always immediately know what the client's IP is.

Just thought I'd share hoping it would help someone.
Logged

Come see what we're doing: http://rwsdev.net

Pages: [1]   Go Up
Jump to: