-
#zephyr #S32K148EVB #ethernet #Enet_ip I would like to use net_if ,ethernet APIs and create a application where i can send and receive net package in loopback manner. I can see the driver apis in zephyr but cannot see much use of it in any sample application or not doing in loopback manner. I would like to design any of below sample application. the major gap for me is configuring loopback and receiving the package. -enet -net_if i have tried using ETH_NET_DEVICE_INIT, ethernet_init(),net_context_sendto(),etc. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Just use the socket API to send and receive the data, there is no Ethernet specific API for this. If you want to control the Ethernet header information, you can create a packet socket which allows you to construct L2 and L3 headers by yourself. There is a network sample https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/packet that shows how to use the packet socket. Not sure what you mean by loopback manner. If you want to use the loopback interface, then that does not have L2 so it is not an Ethernet based interface. |
Beta Was this translation helpful? Give feedback.
-
Hi @keykur111 . The S32K148EVB-Q176 needs to be used in combination with the daughter board ADTJA1101-RMII to access the Ethernet PHY. Please try adding |
Beta Was this translation helpful? Give feedback.
To enable the PHY loopback (internal, external or remote) you can use the
phy
Zephyr API from your application to write to the TJA1101 registers directly.