Go Down

Topic: Feeling interest for a WiFi shield (Read 30 times) previous topic - next topic

Ray Andrews

Quote
As an exercise to the user later, the function zg_get_mac() should give you the info you need


I'm missing something here, I've tried this and cant get it to compile, tried #include <g2100.h> and still it cant see it.  I'm sure I'm running into a "trying to remember C/C++" issue but I'm stuck.

estranged

Quote
As I haven't recieved the module yet, I would like to ask if you can use the browser on an iPod Touch or iPhone (I have seen you have done it, Brad - but without the multiple request problem?)
It's because the iPod Touch and iPhone uses Safari as browser!


Mobile Safari does not seem to have the problem that desktop Safari does.  I'm able to reload the page multiple times just fine on my iPhone.

AsyncLabs

So we took a wireless sniffer to the module when the Safari client comes in to access the arduino, and it seems that the client is doing something that it shouldn't be doing.  We're still debugging.

BenQuark

Quote
I'm missing something here, I've tried this and cant get it to compile, tried #include <g2100.h> and still it cant see it.  I'm sure I'm running into a "trying to remember C/C++" issue but I'm stuck.


g2100.h is not a library header file and the Arduino IDE will not be able to find it. You can print out the MAC address on the terminal by inserting #include "g2100.h" in the WiShield.h file and inserting the following code in the while(1) loop in the WebServer sketch.

Code: [Select]

if (zg_get_conn_status()) {
     // read MAC address from device
     my_mac = zg_get_mac();
     Serial.print("MAC : ");
     for (i = 0; i < 6; i++) {
           Serial.print(my_mac[i], HEX);
     }
     Serial.println();
}


This shows how you can use the other functions defined in stack(stack.c) and driver(g2100.c) files. If you are just trying to find out the MAC address, it is also printed on the label on the WiFi module.

-Ben

MCxPRT

@BenQuark

Can you provide a snippet that shows where the #include "g2100.h" should be inserted in WiShield.h? I tried, but can't get Arduino IDE to compile.

I get a long list of errors related to WiShield.h

In file included from hardware\libraries\WiShield/WiShield.h:38,


hardware\libraries\WiShield/g2100.h:208: error: 'u8' does not name a type


hardware\libraries\WiShield/g2100.h:209: error: 'u8' does not name a type


hardware\libraries\WiShield/g2100.h:210: error: 'u8' does not name a type

etc...

Go Up