This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Tryign to send ethernet packet

Hello everyone,
I am trying to send an ethernet packet (an ARP-like packet precisely). I am building the packet, with the ethernet header, and I cannot manage to send it.
I tried two different functions:

The first one is eth_send_frame (www.keil.com/.../group__net__internal__system__functions.html and I build the NET_FRAME putting the index value at 0 and length at the size. The weird thing here is that the function description say "Construct ethernet header for the frame and send it." but how could it do that without knowing destination and protocol type. So my guess is that the function is called by socket which have these information.
Problem: I do not want a socket, I want to send raw ethernet packet. So I tried to put a complete ethernet packet (including its ethernet header) and... it does not work!

My second try was with ARM_ETH_MAC_SendFrame (www.keil.com/.../group__eth__mac__interface__gr.html but its definition I have access is different from the documentation on internet. My defition exclude the third parameter: ARM_ETH_STATUS ARM_ETH_MAC_SendFrame (uint8_t *buf, uint32_t len). Here again I pass the data and its length but this time the call block the execution...

If anyone could help I would be grateful !

Thanks and best regards,
Guilhem.

0