Pages: 1 ... 17 18 [19] 20 21 ... 33   Go Down
Author Topic: Feeling interest for a WiFi shield  (Read 20997 times)
0 Members and 1 Guest are viewing this topic.
Vejle, Denmark
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It still doesn't work with my Zyxel ap (G1000v2).
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you tried disconnecting every device from the network and then seeing if the shield will connect to the G1000?

You mentioned it works fine on the NWA-3500, are there any obvious differences in environment or operating specifications of the G1000?

Edit:

There was a firmware update for the G1000 in November 2007. Here's the page, the update is available at the bottom.

http://us.zyxel.com/Support/Download-Library-Result.aspx?mif=PDCA2007090

You could try that if you haven't already.

« Last Edit: May 30, 2009, 08:12:13 pm by John_Ryan » Logged

Boston
Offline Offline
God Member
*****
Karma: 3
Posts: 574
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome  - Can't wait to try out the client example.
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is this the best place to trap alternative page requests in webserver.c

Code:
     // determine the requested resource
      // in this case, we check if the request was for the '/' root page
      // AKA index.html
      if(s->inputbuf[0] != ISO_slash) {
            // request for unknown webpage, close and exit
            PSOCK_CLOSE_EXIT(&s->p);
      }


For example. I'd like to send this request to the server

000.000.000.000/slave_02-turn_led_6_on.html

So where the code above is checking for index.html, I want it to interpret the URL as a command, like slave_02-turn_led_6_on.html would tell i2c slave #2 to turn LED 6 on etc etc


Logged

Boston
Offline Offline
God Member
*****
Karma: 3
Posts: 574
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I'm trying to setup the client server example.
I found the link below for converting your twitter string to base 64.  
http://www.motobit.com/util/base64-decoder-encoder.asp

In the setup we are supposed to Delete the 'applet' directory.  Can anyone tell me what I'm supposed to delete here?  All I have in the example folder is webclient.c or webclient.pde, which is the example.  I tried deleting .c , but of course  received errors.  Also when I compile the sketch I notice it is 16k! Probably because I did not delete the applet.
What do I delete?

Thanks.
Logged

San Jose, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@John_Ryan

Yes, that would be a good place to check for alternate resource requests. The check you mentioned looks for the '/'. I think there is another check for a space character following the slash which indicates that the requested resource was index.html. You could also use that check to determine resource type. For example, the LED turn on resource you mentioned.
Logged

San Jose, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@pauly

You might not have the applet directory if it is the first time you are building the sketch. It gets generated when you upload the sketch to the Arduino the first time. You will also have to change the #defines in apps-conf.h file.

We have seen ~10k for the webserver and webclient application on the 168 using the arduino-0013 on windows and the Linux version. What is your setup?
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@benquark

Does inputbuf (in webserver.c) store the entire URL request? eg. "slave_02-turn_led_6_on.html"

If so, how do I get the contents of inputbuf back to the main WebServer sketch so I can handle the request in the same loop as WiFi.run();  

I'd rather not start "hacking" webserver.c - if you know what I mean.
Logged

Boston
Offline Offline
God Member
*****
Karma: 3
Posts: 574
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using a Mac with a Diecimila and this when I get after compiling the sketch.

Binary sketch size: 16352 bytes (of a 14336 byte maximum)
Logged

San Jose, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@John_Ryan
Yes, inputbuf should have the resource string in it. I would recommend doing all your data processing in the handle_connection() function in webserver.c. That would be the cleanest way. Getting the data into the sketch might be a little messy. To do that,

Add the following line to WiShield.h,
Code:
#include "uip.h"
#include "webserver.h"

In the sketch,
Code:
void loop()
{
    struct webserver_state *s = &(uip_conn->appstate);
    unsigned char i;

    WiFi.run();

    for (i = 0; i < 10; i++) {
        Serial.print(s->inputbuf[i]);
    }
    Serial.println();
}
You might also want to change the length of inputbuf in webserver.h to match your requirement.
Logged

San Jose, CA
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Pauly
That does not look good. Are you using the sample sketches in the WiShield library? Have you modified them to include some of your code? Which version of the arduino IDE (0013, 0014, 0015) are you using?

You cannot have webclient and webserver at the same time. You will have to select one or the other by uncommenting the appropriate define in apps-conf.h
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@BenQuark

Is it possible to switch between client/server mode in a sketch?

It would be a major draw-back to only be able to function as server or client in a single sketch. One of the points of receiving commands via URL is to act out commands and send a response to another server if it's needed. That would require both modes, but not at the same time.
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@BenQuark

I made the changes you suggested and once I accessed the web server URL, the serial monitor started displaying lines of nonsense over and over, and - the web server stopped responding.

The characters it output (shown below) are not complete, the forum software appears to be re-translating it.

I've removed the changes you suggested to get the server working again.

ßPÿÿ\_
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've just received an update from Brad (thank you) which mentions that client/server modes can't be run together, or even switched between.  

That's unfortunate for all the work that's been put into getting the project this far, so I really hope it's just a temporary drawback?

Every application I have in mind for the shield needs the ability to "switch" between server/client modes. It's important for me that if an action is being requested via a URL string, then hardware activity is fed-back to another server, especially in the event the request fails to execute... for one reason or another.

So I'm wondering (Brad/Ben) if this is an issue that can or will be resolved, or are the shields capabilities at the limit?

Can this problem be overcome by adding a dedicated 328 to the shield (next time you do a production run) just to handle the stack and libraries, and then have the shield connect to A4 and A5 of the board which handles user-specific client/server applications over i2c?

Adding a dedicated micro to the shield for a few extra dollars seems like a cheap solution (to me) for the problems it would solve.

What are your thoughts?

Edit:

Have you guys seen this?

http://news.bbc.co.uk/1/hi/technology/8063975.stm

Sounds like you might have 60-70 buyers wanting WiFi modules for Arduino to "tweet" at the push of a button = )

  
« Last Edit: June 02, 2009, 03:46:00 pm by John_Ryan » Logged

Boston
Offline Offline
God Member
*****
Karma: 3
Posts: 574
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I hadn't upgraded in a while.  I was using version 12 of Arduino.
Version 15 did the trick.

Binary sketch size: 11114 bytes (of a 14336 byte maximum)
Logged

Pages: 1 ... 17 18 [19] 20 21 ... 33   Go Up
Jump to: