| Greg |
As you may or may not know from my earlier posts the idea of the project I'm working on requires the PIC to transfer sensor info across the ethernet.
I think this is similar to what "Queen" was doing.
I have compiled the initial code and set the ethernet port to my laptop. I had some issues with the DHCP server. After looking at ethereal it told me that the ENC was trying to contact the DHCP but no luck. However this seemed promising I.e. Flashing lights etc. I'am basically using the same board Ian set up but with the EDTP framethrower dropped into the cct.
I first want to set the board up as a server with a fixed IP address.
I would connect to this server using sockets and ask it for the sensor information.
The sockets would communicate using TCP.
If anyone has any ideas could they help me out with a couple of questions?
After reading the AN833 application note it suggest the header files and source code to use for TCP. How does the ENC28J60.c and .h become utilised in this?
Previously when using sockets I would have to connect to an ip address and associated port number does anyone know what port number is to be used?
Any other ideas would be greatly appreciated. |
| Ian |
Sorry, I did mean should not |
| Greg |
Just to confirm
"You can easily leave the UDP running if you want annouce and DHCP and then just work on the TCP for your app. TCP and UDP are implemented seperately so they should interfer with each other. "
I want to use a static ip for this projetc as it is on an internal network. Also I do not need UDP so I guess I can take out this and the annonce.c and .h files, that is after I get it to work.
Did you mean "should not intefere"
Again I will start with the full project first, Thanks for your tip on the DHCP server software.
Greg |
| Ian |
Hi Greg,
I assume you mean MCHPDetect. I use MagikDHCP for my DHCP server.
If you aren't getting any LEDs lighting up then you are unlikely to see any data from the PIC.
I have talked through some simple debugging it the thread http://www.piccoder.co.uk/component/option,com_joomlaboard/Itemid,38/func,view/id,99/catid,19/
Are you talking about the LEDs on the PIC or attached to the ENC? From what I remember about the FrameThrower module you should just be able to drop it into this project.
You can easily leave the UDP running if you want annouce and DHCP and then just work on the TCP for your app. TCP and UDP are implemented seperately so they should not interfere with each other.
Post edited by: ian, at: 2006/04/08 16:27 |
| Greg |
I have installed the code succesfully onto the 18F4620 without changing the parts that were necessary. Turned on the DHCP detect and did't see anything.
I think my problem is the DHCP server. I downloaded a freebee but am not 100% sure it's working. Any suggestions on another free one??
I'am running a crossover cable from my laptop to the ENC28J60 and as yet have not seen any lights, Just a thought, I purchased a FrameThrower module from www.edtp.com. Would I have to change any of the enc28j60.c and .h source code so as to change what LEDS I want running???
Once I get this working I would like to strip the code down from the given project code. I would like to use TCP instead of UDP, I had some some success with socket work last year and so would like to stick to what I know, I guess this means getting rid of the UDP and announce.
However I better start walking before I run! |
| Ian |
You will probably need most of the modules still.
Have you tried running the stack as it is yet? Without fiddling around with modules?
Anyway, First of all which main services do you need to run.
To get the data you'll need the webserver.
Do you want to assign the IP address manually or with DHCP.
Do you want to use the announce module?
If you don't want the announce module or DHCP then you can also miss out the UDP module.
Other than that I think you'll need the rest of the stack, unless you replace the webserver (http) module with a telnet module. If you remove the need for HTTP then you can also remove the filesystem modules.
Hope that helps.
Ian |