cancel
Showing results for 
Search instead for 
Did you mean: 

Send Ping from stm32767zi

Eld_Eddan
Associate

I'm utilizing two nucleo f767zi boards with the goal to get them to ping eachother using Ethernet with lwip and no RTOS. Both their Ethernet cables are connected to a switch which is also connected to my PC. With cubeide I've successfully pinged the boards from my PC using the functions ethernetif_input->low_level_input() and ping in the command prompt (windows).

Now i want to ping one board from the other board. The first board is set up as before and prints out the length och the packets received as well as a LED to identify successful transmission. 

With the other board i'm trying to utilize the function low_level_output(). It is setup so that when i press the user button the following code is executed.

struct pbuf *my_package_2_send;

const char data_2_send[] = "Hello, World!";

 

my_package_2_send = pbuf_alloc(PBUF_RAW , strlen(data_2_send), PBUF_POOL);

pbuf_take(my_package_2_send, data_2_send, strlen(data_2_send));

low_level_output(netif ,my_package_2_send);

 

pbuf_free(my_package_2_send);

 

When pressing the button i can see the yellow light on the rj-45 connector flash on the receiving board but i can not see any packet received.

I'm fairly sure this has to do with the fact that i've not setup my payload with proper headers and neither have i entered the receivers IP address anywhere right now. However, I'm unable to find information on how to do this properly nor any built in function to do this?

Is there any function to easily create correct headers? 

Have i misunderstood the function that i'm currently trying to use?

Anyone else created similar programs before, how did you approach it?

0 REPLIES 0