I am running version 2.4.0 of FreeRTOS+TCP on a Renesas EK-RA6M5.
I’m using the quickstart demo with static ip.
The phy I’m using is the ksz8091.
Testing the stability of the FreeRTOS plus TCP stack:
When I run nmap against my static ip, if there’s no listening socket, it completes as expected.
(And my UUT responds to ping packets)
When I start a thread that starts a listening socket and run nmap, the unit won’t
respond to pings.
In the debugger the mac appears to have stopped generating interrupts.
(consequently, won’t respond to ping)
If I pull and re-seat the ethernet cable, the mac starts generating interrupts again.
(responds to ping again)
Is this a known issue?
I don’t know the problem is with SYN packets necessarily; since it appears to be the mac has
stopped generating interrupts and can be reinitialized. But so far, the problem only appears
to happen when I run nmap against the ip address with an open socket.
I’m not sure I know how to identify where the MAC software driver is.
All the code came from e2 studio running FSP 4.4.0.
(The PHY driver is r_ether_phy_target_ksz8091rnb.c, maybe from FreeRTOS, or Renesas)
My original statement is based off line 217 of vEtherISRCallback in NetworkInterface.c.
if (p_args->status_eesr & ETHER_EDMAC_INTERRUPT_FACTOR_RECEPTION)
In a fault state, I stop hitting my break-point here.
is custom/provided by 3rd party and also the MCU specific NetworkInterface.c.
My guess: The MAC driver (implemented in NetworkInterface.c) has a problem resp. is buggy.
nmap might cause high packet load on the device revealing some corner case problems of the driver.
It appears that xNetworkInterfaceInitialise sets up an interface provided by Renesas.
So it sounds like this hasn’t been seen yet and may be in their mac driver?
I have already found that by commenting “vTCPStateChange( pxReturn, eSYN_FIRST );”
in FreeRTOS_TCP_IP.c, it won’t break, but that just means something downstream isn’t
working.
Any recommendations how I should debug something as dynamic as this?
And thanks for taking your time for all your answers.
Hi @ddeyo,
Could you help to enable ipconfigHAS_PRINTF and configPRINTF to see if we can get any info from log?
Besides that, there is a discussion in Renesas forum about RA6M5 network interface. Could you help to try with the solution of it?
Capture the ethernet frames using wireshark and see what is exactly happening when the issue occurs.
Take a dump of MAC registers when everything is running fine and in issue state and compare the same.
These mostly likely will give some good pointers.
I have done a wireshark captures on a simple nmap using one port (succeeded) and on
a sequence of ports (failed).
It looks like there may be a problem with multiple threads/sockets. The problem
happens when an open port is found. The SYN-ACK packet never gets sent back and
consequently the side that started the SYN never sends an RST packet.
The link sent by ActoryOu provided a way to prevent the problem.