CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

enc26j60 ip change

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
joven



Joined: 30 Jan 2007
Posts: 56
Location: Viana do Castelo - Portugal

View user's profile Send private message

enc26j60 ip change
PostPosted: Mon Oct 15, 2007 2:53 pm     Reply with quote

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.
frequentguest
Guest







PostPosted: Mon Oct 15, 2007 3:17 pm     Reply with quote

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.
Guest








PostPosted: Mon Oct 15, 2007 3:18 pm     Reply with quote

Quote:
Have the web server replace %A with the new IP address that was assigned.

That should say ...replace %I with the new...
joven



Joined: 30 Jan 2007
Posts: 56
Location: Viana do Castelo - Portugal

View user's profile Send private message

PostPosted: Tue Oct 16, 2007 4:01 am     Reply with quote

hi

i have this page working.

Page:
<p align="center" class="style1"><font color="#000000" size="5"><strong>TCP/IP Configura&ccedil;&atilde;o </strong></font></p>
<p>&nbsp;</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>&nbsp;</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.
frequentguest
Guest







PostPosted: Tue Oct 16, 2007 8:10 am     Reply with quote

Then call arp -d to clear the entries from the arp table.
joven



Joined: 30 Jan 2007
Posts: 56
Location: Viana do Castelo - Portugal

View user's profile Send private message

PostPosted: Tue Oct 16, 2007 11:48 am     Reply with quote

exist some way for rebooting the enc?
to make the connection down
frequentguest
Guest







PostPosted: Tue Oct 16, 2007 2:03 pm     Reply with quote

Why do you want to reboot the ENC?

The problem is on the PC side, not the PIC side.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group