No PST Response on boot
T Chap
Posts: 4,223
I formatted an SD card, created the index.htm and put it on the card for hello world. I plugged in the card.
Using BST, I can only get a serial terminal response using the above items commented out. If they are in, there is no response so it is assumed the code is hanging up here.
Any suggestions?
debug := 1 'SDCard.Start 'stringMethods := str.Start 'Request.Constructor(stringMethods) 'Response.Constructor(stringMethods, @txdata)
Using BST, I can only get a serial terminal response using the above items commented out. If they are in, there is no response so it is assumed the code is hanging up here.
Any suggestions?
Comments
If so, did the previous tutorial step work? The step to setup the configuration.
How is the SD card formatted? Did you use a computer? Is it FAT, FAT32???
The card was already formatted new, that didn't work so I reformatted on Win XP, not the quick version. I think FAT32. That didn't work either. I can make the user LED turn on so I know the code is booting, also I can get the serial term to display Mount SD Card - if I comment out the parts above. There is no response from 192.168.1.120:5000. But I do get BLUE and RED activity.
Obviously it is not getting past the SDcard.start. I pulled the card out and put it back.
Can you hit http://spinneret.servebeer.com:5000/? Because it is running the exact same code.
T Chap, Please give it a shot and let me know if it works. You'd be the first... Unless D.P. finds this thread.
Illegal hex number. After removing the -, so that the number is just $1, the program compiles and loads. The PST shows what it should that did not work on BST. I looked back on the Mac and the code also has the $-1, but no errors are reported in Spin.
Just be check again, I re-downloaded the same zip, extracted, replaced all older copies in the folder, and got the same exact error. Fix the error and it compiles.
Without making ANY changes to the code, I can type in Firefox and IE and each browser displays the following in the pane:
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360 {\fonttbl\f0\fmodern\fcharset0 Courier;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww10500\viewh9600\viewkind0 \deftab720 \pard\pardeftab720\ql\qnatural \f0\fs24 \cf0 \ \ \ \ \ Hello World!\ \ \ }
I thought I had copied and pasted the exact notes from the setup document, but it could have been weirded out using a Mac and text editor. This is a minor issue to solve on my end.
Next, I tried to change the MAC address to my board numbers. Making any change to the MAC addr causes the browser to just spin, never loads. Using the default MAC address the in code of byte $00, $08, $DC, $16, $EF, $22 and the browser will load the hello world page. Why can I not change to my own MAC address written on the bottom of the board?
Once again, if you post the source code loaded in the Spinneret, I'll verify that you have the latest files. I can't understand why you are against such a simple request. Especially when I'm trying to help you.
How is the Spinneret connected to your network? What are your network parameters; Subnet, Gateway...?
This is where I got the original files. I have just replaced all of the files from with the files from here as you requested:
http://code.google.com/p/spinneret-web-server/source/browse/#svn%2Ftrunk%2FMultiSocketServer_MikeG
I just uploaded the same httpserver.spin that I just downloaded off your link, they should be identical to the link.
One thing I have noticed, that with PropTool V1.02 the Strings Method produces an error as I mentioned before. I got the newer PropTool 1.3.2 and it does compile without the illegal hex value.
I replaced all the files linked on that url above that you said is the latest. Still the same problem. If I run the code AS IS, direct off the site with NO changes, I can type 192.168.1.120:5000 and get HELLO WORLD!. BUT, if I change the MAC number, to my device number, or to ANY other number, the 192.168.1.120:5000 just spins and times out with "not found".
So, why does this require that the MAC number must be the number that is already in the DAT section as downloaded, when I understood from your tutorial on servebeer.com that I needed to change these settings?
DAT
mac byte $00, $08, $DC, $16, $F3, $1B
subnet byte 255, 255 ,255, 0
gateway byte 192, 168, 1, 254
ip byte 192, 168, 1, 120
port word 5000
remoteIp byte 65, 98, 8, 151 {65.98.8.151}
remotePort word 80
uport word 5050
When I open ipconfig:
Wireless:
subnet = 255.255.255.0
default gateway = 192.168.1.254
The gateway address in the "as is" source is 192.168.1.1. Is there more than one router involved in this network? Is the Spinneret connected to a router or a PC?
The spinnerete is connected via ethernet cable to the main router.
It do not understand why using a gateway of 192.168.1.254 would allow your default MAC address to return Hello World, but I couldn't enter my own devices MAC. But for some strange reason, using 192.168.1.1 as the gateway, I can use my own MAC number. Weird stuff, but whatever it takes.
Thanks for the help. I will now try to turn on and off the built in user LED from LAN. I have the index and LED files on the SD card and can see the helloworld/led options. But clicking LED ON, nothing happens. It looks like the same httpserver.htm found under hsled has the LED code.
[html]
<html>
<head>
<title>GETing to the Server</title>
</head>
<body>
<div style="width:600px;margin:auto;">
<h1 style="text-align:center;color:blue;">LED</h1>
<div style="text-align:center;"><a href="index.htm">Hello World</a> | <a href="led.htm">LED</a></div>
<p><a href="led.htm?led=on">LED On</a> :: <a href="led.htm?led=off">LED Off</a></p>
<p>LED: <span id="placeholder"></span></p>
</div>
</body>
</html>
[/html]
The HTML code in post #29 is for use in RESTful HTTP requests. This is where data is embedded in the URL.
http://spinneret.servebeer.com:5000/services/restled.htm