U of A, Tucson, AZ
Offline
Full Member
Karma: 0
Posts: 164
Hello World
|
 |
« Reply #90 on: May 07, 2009, 12:38:45 am » |
I've loaded the new version with wireless_mode defined. Still only getting the first request successfully. Subsequent requests fail. For what it's worth, here's what is being reported by the serial.print()s: GET / HTTP/1.1 Host: 10.0.1.50 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive
GET / HTTP/1.1 Host: 10.0.1.50 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive
HTTP/1.1 200 OK Content-Type: text/html
<center><p><h1>Hello World!! I am WiShield</h1></p></center>.9.0.3) Gecko/2008092414 Firefox/3.0.3 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive
I will play some more with it tomorrow. Woot, always fun being an early adopter. 
|
|
|
|
« Last Edit: May 07, 2009, 12:39:22 am by estranged »
|
Logged
|
|
|
|
|
Denmark (Europe)
Offline
Full Member
Karma: 0
Posts: 198
Electronics Designer & Consultant
|
 |
« Reply #91 on: May 07, 2009, 02:32:44 am » |
I know IP and MAC adresses normally hasn't anything to do with eachother, but at my home it has (also like estranged - he is also using the MAC filter) I'm using the MAC adress to check if the computer is know, and then the computer gets the same IP adress everytime!
So... I would like to know, if the MAC in the WiShield is unique, so it can't be changed? As it isn't unique in the Arduino Ethernet Shield (Wiznet)
|
|
|
|
« Last Edit: May 07, 2009, 02:37:51 am by tkj »
|
Logged
|
Need any help with your electronics projects?TKJ Electronics, a consultancy company located in Denmark (Europe), has the required expertice, knowlegde and development tools, to do the development for you. Do not hesitate contacting us by visiting our website: http://www.tkjelectronics.dk
|
|
|
|
San Jose, CA USA
Offline
Jr. Member
Karma: 0
Posts: 81
Arduino rocks
|
 |
« Reply #92 on: May 07, 2009, 02:46:52 am » |
The MAC address is programmed unique from the factory of my Wi-Fi module supplier. So MAC filtering should work fine, however, since the out of the box solution is only using static IP addresses, this is less of a concern since the address you supply in the sketch will be the address used.
As an exercise to the user later, the function zg_get_mac() should give you the info you need. 8-)
|
|
|
|
« Last Edit: May 07, 2009, 02:54:59 am by asynclabs »
|
Logged
|
|
|
|
|
Denmark (Europe)
Offline
Full Member
Karma: 0
Posts: 198
Electronics Designer & Consultant
|
 |
« Reply #93 on: May 07, 2009, 03:03:51 am » |
Ahh good  Also, my next question would have been: "Then where can I find it's MAC?" - But you answered it, even before I've asked 
|
|
|
|
|
Logged
|
Need any help with your electronics projects?TKJ Electronics, a consultancy company located in Denmark (Europe), has the required expertice, knowlegde and development tools, to do the development for you. Do not hesitate contacting us by visiting our website: http://www.tkjelectronics.dk
|
|
|
|
San Jose, CA USA
Offline
Jr. Member
Karma: 0
Posts: 81
Arduino rocks
|
 |
« Reply #94 on: May 07, 2009, 03:17:30 am » |
Ok, new code drop (just stack code changes from my last message about new code). The code can handle multiple GET requests without causing the lockup. I was able to test it with both an unsecured and WPA2 secured network on Firefox. Safari on my Mac still is giving me issues. One of the fixes we put in is temporary until we understand TCP a bit more. Anyway, give it a shot. It should be more stable now. Time for some shut eye now.
|
|
|
|
|
Logged
|
|
|
|
|
Boston
Offline
God Member
Karma: 3
Posts: 520
Arduino rocks
|
 |
« Reply #95 on: May 07, 2009, 06:41:51 am » |
Awesome, got mine working. I am able to ping it now and see the webpage with Firefox. Great work!
|
|
|
|
|
Logged
|
|
|
|
|
U of A, Tucson, AZ
Offline
Full Member
Karma: 0
Posts: 164
Hello World
|
 |
« Reply #96 on: May 07, 2009, 08:54:24 am » |
Ahh good  Also, my next question would have been: "Then where can I find it's MAC?" - But you answered it, even before I've asked  The MAC is also printed on top of the actual wifi module. Took me a while to find that too.
|
|
|
|
|
Logged
|
|
|
|
|
U of A, Tucson, AZ
Offline
Full Member
Karma: 0
Posts: 164
Hello World
|
 |
« Reply #97 on: May 07, 2009, 09:26:52 am » |
The code can handle multiple GET requests without causing the lockup. I was able to test it with both an unsecured and WPA2 secured network on Firefox. Safari on my Mac still is giving me issues. Confirmed that the new code allows for multiple requests / reloads on Firefox. However 1 request from Safari works, then subsequent requests fail from anything. Tested on a WPA Personal network. Keep up the good work, and yes get some sleep. 
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 0
Posts: 731
skcor oniudrA
|
 |
« Reply #98 on: May 07, 2009, 10:13:20 am » |
Safari might be a bit particular about the html served, try this in WebServer.pde const prog_char webpage[] PROGMEM = {"HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<body><center><h1>Hello World!! I am WiShield</h1>"}; const prog_char webpage1[] PROGMEM = {"<h2>This is line 2</h2></center></body>"};
<h1> in between a <p> tag isn't valid html. I don't have a shield yet to test it but its worth a try if you run out of other ideas = )
|
|
|
|
|
Logged
|
|
|
|
|
Denmark (Europe)
Offline
Full Member
Karma: 0
Posts: 198
Electronics Designer & Consultant
|
 |
« Reply #99 on: May 07, 2009, 12:18:13 pm » |
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!
|
|
|
|
|
Logged
|
Need any help with your electronics projects?TKJ Electronics, a consultancy company located in Denmark (Europe), has the required expertice, knowlegde and development tools, to do the development for you. Do not hesitate contacting us by visiting our website: http://www.tkjelectronics.dk
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 100
Frell, Frack, Smeg
|
 |
« Reply #100 on: May 07, 2009, 05:41:33 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
U of A, Tucson, AZ
Offline
Full Member
Karma: 0
Posts: 164
Hello World
|
 |
« Reply #101 on: May 07, 2009, 08:35:43 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
San Jose, CA USA
Offline
Jr. Member
Karma: 0
Posts: 81
Arduino rocks
|
 |
« Reply #102 on: May 07, 2009, 09:51:36 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
San Jose, CA
Offline
Newbie
Karma: 0
Posts: 26
Arduino rocks
|
 |
« Reply #103 on: May 07, 2009, 09:53:32 pm » |
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. 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
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 8
Arduino rocks
|
 |
« Reply #104 on: May 08, 2009, 06:17:59 pm » |
@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...
|
|
|
|
|
Logged
|
|
|
|
|
|