How to get raw Ethernet frames using TWR-K60n512 and mqx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get raw Ethernet frames using TWR-K60n512 and mqx

843 Views
vysakhtk
Contributor II

Hai all..

Please anybody tell me, How can I get all incoming frames from an Ethernet port..

I don't want the physical layer packet(layer 1-includes preamble and sfd)..I need all incoming and outgoing frames (layer 2- Starting from destination mac..till CRC)to analysis the type of incoming frames..Please tell me, is there any default buffer or register from which I will get the incoming frames..How will i know that a new frame has arrived..Also tell me if there any default api in mqx/rtcs to achieve this?

4 Replies

535 Views
RadekS
NXP Employee
NXP Employee

Please look at c:\Freescale\Freescale_MQX_4_1\mqx\source\io\pcb\..

Yes, there is default api, but this api is currently not well documented. It is task for one of next MQX releases.

PCB works as interface between ENET driver (wifi driver) and RTCS.

As inspiration you can look at one of wifi patches:

Qualcomm/Atheros TWR-WIFI-AR4100 for MQX 4.0.2

GainSpan TWR-WIFI-GS1011M1 and TWR-WIFI-GS1500M for MQX 3.7

Redpine Signals TWR-WIFI-RS2101 for MQX 3.7

These patches you can download from Freescale MQX download pages:

https://freescale.flexnetoperations.com/control/frse/product?child_plneID=683961&ver=ARC

As next inspiration could be taken ENET RTCS adapter in KSDK (fsl_enet_rtcs_adapter.c)

I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

535 Views
vysakhtk
Contributor II

I am using MQX 4.0, can i do this using MQX 4.0

0 Kudos

535 Views
vysakhtk
Contributor II

can u please give me a sample code for implementing this?

0 Kudos

535 Views
RadekS
NXP Employee
NXP Employee

Thank you for clarification.

In that case, I would like to recommend look at MACNET_RX_ISR interrupt routine in macnet_receive.c file.

This is place where we receive interrupt from ENET module and we can start with processing of such data (like check of MAC address and verification of CRC).

Unfortunately I do not know about any simple example which works as simple Ethernet sniffer for MQX.

I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos