I have the property page you reference in front of me but it is not very clear unless you have worked with web pages before.
When I try to use a URL with a port number, I get an error that it is an invalid URL. I do not see in the doc you suggest as to how to specify a port.
I want to get the response whatever it is so I can look for the string “file1”
If you use your computer and send to the URL http://hambo.mynetgear.com:8085/file1 you will get a response of “file 1 selected” This is what I want to achieve using MIT Inventor.
I noticed that my server has responded to a request a few times so I guess the request is going out.
What my server does is to merely look at the received string and look for “file1” or “file2” then it responds with either “file1 selected” or file2 selected.
At least you are getting the app to send to a URL with a port number;
Taifun, I tried the code (blocks) you posted and get no results. Not sure what is happening here. I am connecting to the ai companion on my cell phone.
Correction, your code blocks do work. My server crashed for some reason and I had to reboot it. Now your code works but still no response.
Are you testing with a cell phone or the emulator on the computer. I just tried the computer emulator and it worked although I have had to update it a few times.
I doubt that the problem is with the arduino server. It basically uses a library that creates the web server. When a request is received, the string “GET /file1” is searched for. If found, then the server merely returns the string “file 1 selected” to the client.
Would it be useful to use a tool in a browser like Chrome or Firefox to display the raw data that is received from the arduino. Maybe seeing the raw data will give a clue as to why the web component will not get the response. I have tried this and get a bunch of garbage and I cannot even see the “file 1 selected” response. The arduino sends a simple response but I do not know what other info is added by the arduino web server.
I just noticed that if the url is set to google.com. then there is what looks like raw data received. There is some preamble stuff that the web component does not accept. The google response has something like texxt/html; charset-iso-8859-1, and http//google.com, and 200, then a lot of data.
Maybe the web component requires a specific format. One would think that the raw data would be displayed in any event. It seems like the PC web browsers do not have a problem with what the arduino sends.
The problem is with the web server software on the Arduino. As it turns out, the response header info was not being sent, i.e. “HTTP:1.1 200 OK”, and “Content-type:text/HTML”. My Firefox browser did not care about this header info so the desired response was received. Other browsers want the headers and create an error if not there. I still don’t know the exact procedure to make a good response but that is the issue. Thanks all.
I tried to respond yesterday but the forum locked me out because I had posted to many reply’s in a 24 hour period. I had to wait until I could post again.