Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Enc28j60 with stm32f4

Status
Not open for further replies.

sainti

Newbie level 4
Joined
Aug 14, 2019
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
60
I don't know how to use enc28j60 to POST data to a local network server(IP address like 192.168.1.104).

Just like use computer browse "http://192.168.1.104/index.aspx?tem=35&hum=65".....

I want to send some sensor data to server.And I learned some of enc28j60,but also don't know how to use 'BrowseUrl' function to upload data.

should i proceed according to this tutorial:
https://mostlyprog.wordpress.com/2012/02/01/msp430-enc28j60-ethernet-part-2/

please guide me.
Thank you.
 

All that 'tutorial' does is now how to set up the SPI interface on an MSP430! That is not the same MCU you are using.
Looking at this and other questions with (basically) the same title, I think you are expecting too much from the ENC28J60. It only provides the MAC and PHY layers - in other words the bottom 1 1.2 layers of the 7 layers of the IP OSI model. What you are wanting to do (using the HTTP layer) is part of the Application layer which is layer 7 - that means that you also need to provide code for all of the intervening layers: things such as the TCP/UDP, IP and link layers.
I strongly suggest that you do a couple of things:
1) learn the basics of micro controllers and embedded programming. The STM32F4 family are very capable devices but start with the 'flash a LED' level of programming first.
2) learn about the IP stack and the very closely associated OSI stack - this will give you some idea of what is involved with what appears to be a simple web server (it is NOT simple under the hood)
3) Learn the HTML protocol - you will probably need to end up building and parsing HTML strings to make this work
4) if you still insist on using the ENC28J60 (and I'm not suggesting you don't) then I also suggest you learn a bit about one of the PIC24F families of devices; especially the code samples that Microchip provide as to how to use the ENC28J60.
In my opinion, Microchip do not do a good job at describing how actually use the ENC28J60 - the registers are described at a hardware level but not how to use them. For that you need to look at the relevant 'Microchip Library for Applications' (MLA) code files and perhaps other code examples. The MLA does provide a very simple HTTP web server that you can build on (but even I think twice about doing that with my many years of experience).
Also try a search for web servers using the ENC28J60. When I tried this just now it turned up the side http://blog.roman-mueller.ch/index.php/2012/10/03/connecting-the-enc28j60-ethernet-breakout-board/. While this uses an Arduino (and therefore has an extensive library of code that comes with that environment), it does seem to give you some basic code to get started. (You will need to handle POST instead of GET messages for example.)
Susan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top