View previous topic :: View next topic |
Author |
Message |
joven
Joined: 30 Jan 2007 Posts: 56 Location: Viana do Castelo - Portugal
|
enc26j60 ip change |
Posted: Mon Oct 15, 2007 2:53 pm |
|
|
Hi
i'm trying configure the ip and mask by a web page, and works
the problem is the computer flip out, because of the ip's.
for reset the pic i use reset_cpu().
how can solve the problem?
thanks. |
|
![](templates/subSilver/images/spacer.gif) |
frequentguest Guest
|
|
Posted: Mon Oct 15, 2007 3:17 pm |
|
|
You may be able to write a page that does a refresh of your new IP address. When you change the IP address in the browser (assuming you're using a POST form), have the target of the post be a page that has the HTML META tag. Something like this:
Code: | <META HTTP-EQUIV="Refresh" CONTENT="10" URL="%I/"> |
Have the web server replace %A with the new IP address that was assigned.
Then have your web server wait for a short period of time (to finish transmitting this page) before resetting. After the browser timeout occurs, it will refresh with the new IP address that replaced the %A.
Hope that makes a little sense. I haven't tried it, but I think it would work. |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Mon Oct 15, 2007 3:18 pm |
|
|
Quote: | Have the web server replace %A with the new IP address that was assigned. |
That should say ...replace %I with the new... |
|
![](templates/subSilver/images/spacer.gif) |
joven
Joined: 30 Jan 2007 Posts: 56 Location: Viana do Castelo - Portugal
|
|
Posted: Tue Oct 16, 2007 4:01 am |
|
|
hi
i have this page working.
Page:
<p align="center" class="style1"><font color="#000000" size="5"><strong>TCP/IP Configuração </strong></font></p>
<p> </p>
<FORM METHOD=GET>
<form id="form4" name="form4" method="post" action="">
<div align="center">
<table width="362" border="0">
<tr>
<td width="92">IP:</td>
<td width="345">
<input name="ip1" type="text" id="ip1" size="5" maxlength="3" />
.
<input name="ip2" type="text" id="ip2" size="5" maxlength="3" />
.
<input name="ip3" type="text" id="ip3" size="5" maxlength="3" />
.
<input name="ip4" type="text" id="ip4" size="5" maxlength="3" /> </td>
</tr>
<tr>
<td>MASK:</td>
<td>
<input name="mk1" type="text" id="mk1" size="5" maxlength="3" />
.
<input name="mk2" type="text" id="mk2" size="5" maxlength="3" />
.
<input name="mk3" type="text" id="mk3" size="5" maxlength="3" />
.
<input name="mk4" type="text" id="mk4" size="5" maxlength="3" /> </td>
</tr>
<tr>
<td>GATEWAY:</td>
<td>
<input name="gw1" type="text" id="gw1" size="5" maxlength="3" />
.
<input name="gw2" type="text" id="gw2" size="5" maxlength="3" />
.
<input name="gw3" type="text" id="gw3" size="5" maxlength="3" />
.
<input name="gw4" type="text" id="gw4" size="5" maxlength="3" /> </tr>
</table>
<p> </p>
<p>
<a href="tcpipshow.html" target="mainFrame">
<input type="submit" name="Submit" value="Submit" onClick="alert('A central vai renicializar');"/></p>
</a>
</div>
</form>
</body>
</html>
When i make the submit in the page, the ip, mask and gateway is configured.
when i make the arp -a will show the same MAC with the old ip and the new. |
|
![](templates/subSilver/images/spacer.gif) |
frequentguest Guest
|
|
Posted: Tue Oct 16, 2007 8:10 am |
|
|
Then call arp -d to clear the entries from the arp table. |
|
![](templates/subSilver/images/spacer.gif) |
joven
Joined: 30 Jan 2007 Posts: 56 Location: Viana do Castelo - Portugal
|
|
Posted: Tue Oct 16, 2007 11:48 am |
|
|
exist some way for rebooting the enc?
to make the connection down |
|
![](templates/subSilver/images/spacer.gif) |
frequentguest Guest
|
|
Posted: Tue Oct 16, 2007 2:03 pm |
|
|
Why do you want to reboot the ENC?
The problem is on the PC side, not the PIC side. |
|
![](templates/subSilver/images/spacer.gif) |
|