Can't get MAC, Gateway, Mask, or IP to set
Benj
Posts: 66
I received my Spinneret today and have been trying to get it to, for lack of a better term, "Hello, World" and can't seem to get that far.
I'm trying to use the UDP echo code that is available in OBEX, but had to edit it because "Brilldea_W5100_SPI_Driver_Ver005.spin" is not the name of the associated .spin file, and I changed it to "W5100_SPI_Driver.spin", the file that is available on the same page of OBEX. I don't believe that is a problem, but wanted to mention it in case it is.
I changed the MAC, IP, Gateway, and Subnet Mask to settings for my network (and used the MAC that is on the sticker on the bottom of the Spinneret). When I run it, I get this in the serial terminal:
So, I guess it isn't writing the values to the W5100 in the first place? Where to begin?
Benj
I'm trying to use the UDP echo code that is available in OBEX, but had to edit it because "Brilldea_W5100_SPI_Driver_Ver005.spin" is not the name of the associated .spin file, and I changed it to "W5100_SPI_Driver.spin", the file that is available on the same page of OBEX. I don't believe that is a problem, but wanted to mention it in case it is.
I changed the MAC, IP, Gateway, and Subnet Mask to settings for my network (and used the MAC that is on the sticker on the bottom of the Spinneret). When I run it, I get this in the serial terminal:
W5100 SPI Driver Test Initialize all addresses... Set MAC ID........00:08:DC:16:F0:B3 Verified MAC ID...00:00:00:00:00:00 Set Gateway.....192.168.64.1 Verified Gateway..0.0.0.0 Set Subnet......255.255.255.0 Verified Subnet...0.0.0.0 Set IP..........192.168.64.129 Verified IP.......0.0.0.0 Initialize socket 0, port 5000 Socket 0 Status Register: 00 - socket closed Attempting to open UDP on socket 0, port 5000... Socket 0 Status Register: 00 - socket closed UDP opening failed, program ending
So, I guess it isn't writing the values to the W5100 in the first place? Where to begin?
Benj
Comments
Also, it appears that the reset button does not work. Cycling the power reloads the code from EEPROM, but pushing the reset button does not.
http://forums.parallax.com/showthread.php?128520-Google-Code-repository-for-open-source-Spinneret-Web-Server-firmware
I appreciate all of your suggestions, but I am still not able to get it working. I downloaded all fresh copies of W5100_Indirect_Driver.spin and W5100_UDP_Echo_Demo_indirect.spin from the code repository, and PST from OBEX. Here is the output:
Using the TCP Echo Demo for indirect, it still doesn't work, but I get different numbers:
I power cycle and go back to the UDP demo and get yet another set of numbers:
When I get home from work I'll post code I know works.
Parallax Serial Terminal.spin
W5100_Indirect_Driver.spin
W5100_TCP_Server_Echo_Demo_indirect.spin
W5100_UDP_Echo_Demo_indirect.spin
I am beginning to wonder if I have a defective unit.
On a side note, I have no way to determining the version of code you are running without the source. There are countless posts where folks publish code snippets. Often the problem is elsewhere. Anyway, now forum members can verify the version you have loaded.
First of all, I don't mind admitting when I make mistakes. Don't believe me? Keep reading.
I talked via email to Dave Andreae @ Parallax and basically said that I can't get my spinneret working and sent him a link to this thread as to the things that I had tried. He got back to me later that day and told me that he would send out another module to see if it solves the issue. The new module arrived today and I put everything else on hold to hook it up and confirm that I am a genius and my first spinneret was in fact defective. I hooked it up, download the fresh code just to be sure, sent it off, switched to the serial terminal and waited excitedly..... Awww cripes... This one doesn't work either! Perhaps they are getting damaged in shipping? Perhaps it was from a bad batch? Either way, my genius status is intact... right? I thought it would be a good idea to try the TCP code instead of UDP, just for kicks. I clicked send again and hung my head in disgust, knowing that it still wasn't going to work. This is when I happened to notice something that made my genius status head right for the recycle bin. What I noticed was some pretty twinkling lights, but not really where they should be. They were on the demo board's USB controller. It then took me about a half a second to really realize what was wrong and that I'm an idiot. I had sent the right program about 50 times to ...... you guessed it... the WRONG PROP!! Once I disconnected the USB cable for it (COM3) the prop tool was able to program the spinneret on COM4 and the lights on the prop plug were all twinkly. It didn't even occur to me before that they weren't lighting up when I sent a program or was receiving serial data.
So, long story short is: Both spinnerets work and I'm an idiot.
Hopefully if 100 people read this, 1 will remember it and save themselves some time and frustration at a later date, and the other 99 will get a good laugh.
Benj