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

Connecting the ENC28J60+PIC18F4620 boad to a router

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



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

Connecting the ENC28J60+PIC18F4620 boad to a router
PostPosted: Mon Mar 09, 2009 3:43 am     Reply with quote

Hi,

I am currently testing my board to connect to the router in my house to test whether it can be accessed by other computers. But i am facing problems on how to get the board connected? It is just connect it through cable or i need to configure the router? I have include HTTP,ARP, ICMP, and TCP in the board. The IP assigned was 192.168.0.x which is for the local network. Am i missing something??
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Mar 09, 2009 4:17 am     Reply with quote

A router isn't involved in local network communication, except for a possible DHCP function, which is apparently not used due to fixed IP configuration. The PIC host should answer ARP and PING requests without additional software running. To establish ingoing TCP connections, a server application must be present at the PIC.
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PostPosted: Mon Mar 09, 2009 5:33 am     Reply with quote

Hi FvM,

I not really understand about it. Is it means that inside the PIC there should be a HTTP server to respond request from others?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Mar 09, 2009 5:47 am     Reply with quote

You didn't tell about your intended kind of operation. For a HTTP connection, yes you need a HTTP server. CCS has provided examples for it.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: Connecting the ENC28J60+PIC18F4620 boad to a router
PostPosted: Mon Mar 09, 2009 6:10 am     Reply with quote

leejok2003 wrote:
Hi,

I am currently testing my board to connect to the router in my house to test whether it can be accessed by other computers. But i am facing problems on how to get the board connected? It is just connect it through cable or i need to configure the router? I have include HTTP,ARP, ICMP, and TCP in the board. The IP assigned was 192.168.0.x which is for the local network. Am i missing something??


If you want the PIC to be reached by other computers on the internet then the router needs to be configured with network address translation (NAT). For example, assume that the PIC is the only web server on your house network and you want to access the PIC via the web from the internet. You need to set up port mapping on the router that that any TCP port 80 traffic maps to the 192.168.8.x address of the PIC.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PostPosted: Tue Mar 10, 2009 3:36 am     Reply with quote

Hi,
i have tested the board with different cable, cross and straight cable connecting to the router... but i cant detect the board from the router. Which i attend to have a local network communication with the board
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Mar 10, 2009 7:53 am     Reply with quote

Yes, I also understood local network. So the router is only working as a switch or hub, depending on the hardware. As a first step, you shouldn't replace cables but check the link status of both peers. An established ethernet link is the elementary prerequisite for any communication. Then I would start monitoring the communication with a network monitor as Wireshark. If you are connecting through a switch, most of the communications won't be propagated to other ports, so it's most simple to connect from a PC that is running also the monitor. If you perform a ping, you should see ARP and ICMP packets.

If you get no answer at all, check hard- and software at the PIC side and trace respective network actions with a debugger.
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PostPosted: Wed Mar 11, 2009 1:46 am     Reply with quote

Hi,

I finally get my board connected to my house's router! I was provided with another cross cable by my lecturer, and i just tried it out! The board now response to ping and arp as well. Thank god. By the way, yesterday i was testing with a hub and not a router (now only i differentiate it). Anyway, thank you guys for giving me the info.
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