Author Topic: Cannot Load Webpage After Reset  (Read 3149 times)

jjenson

  • Newbie
  • *
  • Posts: 4
    • View Profile
Cannot Load Webpage After Reset
« on: July 31, 2013, 10:58:44 AM »
Well, this is going to be a shot in the dark. Doesn't seem to be a lot of action happening at these forums anymore.

I've got a SBC65EC, HW: 3.01, SW: 3.10, BLN: 1.00. I'm working on ways to control the board via the webpage, and that part works well. What doesn't work is this: if the board is, for some reason, reset, I cannot get to the webserver.

The IP is alive and I can ping it. The board is running, the red light is blinking. However, the webpage doesn't load unless I flash the device using the bootloader.

Does anyone have an idea as to why this is happening? I've got an LCD output of the IP/MAC addresses, and they're good. I've cleared by ARP on my PC, and that doesn't help.

Something isn't getting reset at the RESET(); call and the webserver isn't starting up.

Any ideas would be helpful.

Thanks!

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: Cannot Load Webpage After Reset
« Reply #1 on: July 31, 2013, 11:49:35 AM »
Not familiar with this issue.  Show me a screenshot of your network page maybe? 

When the bootloader finds it, what ip address is it at then?  Before the bootloader changes anything.  You might want to get wireshark (it's a free download) and look at the network traffic to and from your sbc65ec.

Also do you have the "safe mode" jumper plugged in?  That will keep you from changing the ip address in the gui.  Safe mode makes it respond to 3 or so different fixed ip addresses.

jjenson

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Cannot Load Webpage After Reset
« Reply #2 on: July 31, 2013, 01:17:18 PM »
Thanks for responding.

The IP address doesn't change. It is always at 192.168.20.41 on my internal network. If I attach it to the bootloader and flash the device again, it works perfectly (i.e. I can access the webpages over my browser).

If I manually reset or use the m=r command, it will reset and I can ping 192.168.20.41 and get a response. However, I cannot access the webpages. Also, at this time, Wireshark doesn't detect any outgoing messages from the device (it does detect messages before the reset).

I can control the device using an external program that, I believe, sends direct socket commands. But I cannot connect via HTTP.

It's bizarre. It's like somewhere inside of the device, an address became lost.

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: Cannot Load Webpage After Reset
« Reply #3 on: July 31, 2013, 02:38:27 PM »
I've never used m=r.  What if you power cycle the board instead?  Does it still ping at the correct address but not respond to http?

jjenson

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Cannot Load Webpage After Reset
« Reply #4 on: July 31, 2013, 03:32:41 PM »
Well, I figured it out. One of the issues was that one of our programmers made a call to a function that was, somehow, overwriting some stuff and making everything deaf to the internet.

Thanks for the help and messages. I appreciate them. One more question, if it's okay, is there a way to perform a board reset within the code? What I mean by this, is when you connect with the bootloader, and it has the option to "Reset The Target Before Connecting," is there a way to perform that exact style of reset? Does RESET(); do that? From what I've seen, it doesn't actually reset the board like the bootloader does upon connection.

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: Cannot Load Webpage After Reset
« Reply #5 on: July 31, 2013, 07:21:27 PM »
I'm not sure but that kind of thing is in the manual for the chip.  Start with that.

It's the pic 18F6627 in this manual:
http://ww1.microchip.com/downloads/en/devicedoc/39646c.pdf

446 pages but very well organized and clear.  Once you find the command you can see if it's called anywhere in the existing code.  Or change the code a bit.  Elsewhere I published how to rebuild the software.

jjenson

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Cannot Load Webpage After Reset
« Reply #6 on: August 06, 2013, 07:50:42 AM »
Thanks for the link. I looked it over and found the reset information. So, I'll just have to figure out which bits to set, and I should be good. Thanks for your help!