Skip to main content
mnavahan2
Associate
November 25, 2012
Question

simple TCP and UDP examples for f4

  • November 25, 2012
  • 11 replies
  • 2857 views
Posted on November 25, 2012 at 14:54

simple TCP and UDP examples for f4

#lwip #uip #tcp/ip-stack #describe-the-goal-not-the-step
This topic has been closed for replies.

11 replies

Tesla DeLorean
Guru
November 25, 2012
Posted on November 25, 2012 at 15:04

Just how simple are we talking about, done any networking or programming before? And for what board?

Here's a LwIP example from the download pages

http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f4x7_eth_lwip.zip

There are a bunch of other examples if you care to look.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
mnavahan2
mnavahan2Author
Associate
November 25, 2012
Posted on November 25, 2012 at 15:12

The LwIP  is too complex

i use simple minimum library for send one pocket to direct linked PC & also receive it

Tesla DeLorean
Guru
November 25, 2012
Posted on November 25, 2012 at 16:01

The LwIP  is too complex

Perhaps a commercial solution would be simpler and better documented.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Super User
November 25, 2012
Posted on November 25, 2012 at 16:20

''The LwIP  is too complex''

LwIP really is quite simple as IP stacks go!

Perhaps you should look at uIP - which is a minimalist stack for really small microcontrollers...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
mnavahan2
mnavahan2Author
Associate
November 27, 2012
Posted on November 27, 2012 at 09:33

I don’t need

 

IP STACK ,it’s obvious that if I need it, I will use LWIP.

I’m beginner in using Ethernet so I prefer the easiest

 

form of sample code which can send simple Ethernet frame to the computer through Ethernet and also receive the frame

 

from program such as WIRESHARK.It’s also able to send a frame to the F4.

So that as the first step in learning but not real use of it .

I like

a simple code like BLINKING LED for Ethernet do you remember it ?

trevor23
Associate III
November 27, 2012
Posted on November 27, 2012 at 09:58

But your question was ''simple TCP and UDP examples for f4''. Both TCP and UDP run on top of IP and therefore do require a (TCP/)IP stack. Maybe you need to ask a different question?

mnavahan2
mnavahan2Author
Associate
November 27, 2012
Posted on November 27, 2012 at 13:11

yes,your comment is correct

i need send & receive simple Ethernet frame

Andrew Neil
Super User
November 27, 2012
Posted on November 27, 2012 at 15:21

''i need send & receive simple Ethernet frame''

Why?

http://www.catb.org/~esr/faqs/smart-questions.html#goal

And what will you use to receive those frames...?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Tesla DeLorean
Guru
November 27, 2012
Posted on November 27, 2012 at 15:44

For raw Ethernet frames (802.3), you might want to look at interfacing to the ETH driver :

STM32F2-F4_Demonstration_Builder_V1.0.1\Libraries\STM32F4x7_ETH_Driver\src\stm32f4x7_eth.c
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
mnavahan2
mnavahan2Author
Associate
November 27, 2012
Posted on November 27, 2012 at 18:44

have you simple code use this code (STM32F2-F4_Demonstration_Builder_V1.0.1\Libraries\STM32F4x7_ETH_Driver\src\stm32f4x7_eth.c) for send & receive raw Ethernet frame ?