Webserver for the serial/wifi module.
Oldbitcollector (Jeff)
Posts: 8,091
Thought I'd open a thread for this project instead of posting it to the Bulkbuy thread.
Try it.. http://71.48.70.121:8080
I've added default, index.html and a 404 error page when a request isn't recognized.
Next is to write a parse for web controls.
Jeff
Try it.. http://71.48.70.121:8080
I've added default, index.html and a 404 error page when a request isn't recognized.
Next is to write a parse for web controls.
Jeff
Comments
I'm echoing the page counter and http header to my local screen. Fun to watch..
Jeff
I about to be doing some work with video servers, a 4 channel one ideally. One channel could be video direct from a prop, you could embed the ip address of that into the page you serve up for added effect (you don't have to serve video, only the ip address of where to fetch the video stream, if that makes sense)
Something tells me I should have used a long instead of a byte for the page counter. 27 hits already in the last 30 mins.
Edit: Just watched the googlebot(at)googlebot.com try to grab the robots.txt. heh..
Edit2: Ok, which one of you wiseguys asked for xxx.htm?
Someone's doing a repeated refresh. The byte counter will be revealed and roll over soon.
Edit4: i_know_you_are_reading_these.htm. LOL..
Jeff
works perfectly .. and pretty small spin-code.
I went thru both manuals and - hey this thing is fun ... you can use it s accesspoint also! A Prop-Router!
VERY nice find. I am sure I will need more of them. 200ma at 3.3 is ok - I need to test the range.
As you said the configurtion over web-interface works flawlessly and then you need just serial on the prop.
This WIFI-serial-Adapter is FUN. RSS-Reader? FTP-Server/Client? Hell yes I like this Module.
You even can run 2 different ports/wan-interfaces at the same time? And you have a ethernet-HW-port on the header. 1 MBYTE buffer for serial io...
Deep down in the documenttion is a virtual-com-port mentioned. I will look into that. And it is stated that it needs up to 10 seconds to boot its LINUX. (!).
Unfortuneatly I am still busy with paid work, so very less time for Propeller...
Enjoy!
Mike
These appear to be 14pin Hirose DF11-series 2mm connectors.
Boot/reconnect time here has been around 3-5 seconds pretty consistently.
Jeff
I think you may have some mal-formed html?
dp
Edit: It's more likely that my abbreviated headers might be a little too small.
Jeff
IE is fine (ignores the extra stuff).
Led is connected now.
Jeff
two things.
first: I think setting content-lenght in the header is essential.
second:You have CRLF reversed in the DATsection .. try 13,10 not 10,13
no time yet ... more tommorrow...
Mike
-Phil
@mike, yes, those were backwards.. (fixed in my verison)
The issue with the 500 CR/LF has to do with buffer. I've removed it from the main page, and now it loads without them, but the page isn't displayed until the socket times out. Reading into the settings a little more.
Jeff
At a browser level, do not send the content-length: header. I'm not sure what, if any, header fields are being sent as URL is not currently up. Info just in case...
These devices appear to accept raw TCP data, I just haven't gotten to that page yet.
Jeff
Going back to creating a parsing routine. Feel free to grep it while I'm coding.
Jeff
Yesterday when I tried I only received a page with the details. I like setting the led on/off.
Maybe I should get a couple of more on bulk buy #2
why NOT setting content-lenght in the header? Are you not exactly doing this in response.spin on the spinnerette?
slightly confused
Mike
You are correct. I do send content-length: in the POST responses. The browser can figure out the end of an HTTP GET response.
Does that content-length include the byte count on the headers themselves?
Jeff
Able to get to it and toggle the LED from Safari on Mac OS X (which was not successful, yesterday)...
Not having as much luck getting mine to show me a web page yet. After going through the config steps from the PropellerPowered forum, I was able to talk to the server via telnet, so I know that it's basically there. When I try to reach the server from the web, I get the server's config-mode pages. I'll download your next code drop and try again...
dgately
The unit defaults to port 80 for it's config-mode. I'll have to ask the factory if they could do an update which allows us to change this port, as I haven't found it in the instructions. I have mine set to 8080 for this reason.
Some routers will allow you to redirect one external port to a different internal port which may also solve the problem as well.
Jeff
Ah, so if we just read the file from the SD card, we could count the bytes and know where we are going.
Jeff
-Phil
I confirmed that the baud rate on the WiFi setup page was set to 57600 baud as in the program. I even changed it to 115200 just to test but still no go. All I get is the opening titlescreen from the program.
Also I notice that the module runs a little warm. Is that normal?
And yes I tried switching the Tx/Rx pins too.
Any suggestions?
Jeff
Edit: I found the link to the setup page but I am a bit lost!!!! Is there any way around using VGA, such as can I just use a debug screen or something? If not, If I am using a Prop BOE, is Pin 16 the correct pin for the VGA adapter? Next, do I have to make the connections on the Single row header or just the double (on the Serial/Wi-Fi adapter board)? If someone has a picture of how this is wired up I would greatly appreciate it if you could post it.