cancel
Showing results for 
Search instead for 
Did you mean: 

How to send/receive Ethernet packets in STM32MP157

inkong
Associate II

Hi,

I want to send and receive data using Ethernet.

I tried this Linux version code, but it didn't works. https://gist.github.com/austinmarton/1922600 

After I failed to try, I found this header code, STMMAC.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/stmicro/stmmac/stmmac.h  

Should I make a program based on this code??

 

I've searched a lot, but I couldn't find any related cases.

I'm not good enough to make the whole program code.

If you have any relevant content or examples, please let me know....

 

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @inkong ,

 

Not sure to get your question 

Ethernet can be manage by OpenSTLinux

refer to How to configure ethernet interface - stm32mpu 

Ethernet overview - stm32mpu

 

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
stefboerrigter
Associate

If you want to generate data over the ethernet port (just to validate or something) you could use for instance command line from linux (e.g. wget)
https://linux.die.net/man/1/wget

To download an image in an endless while loop for instance:

while [ 1 ]; do wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.42.tar.gz; done;

 (it will do forever (untill stopped) a download of the kenrnel archive in tar.gz format, which is ~200 MB of size. )