Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Network Down event in EMACHandler Task #1173

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

kar-rahul-aws
Copy link
Member

Description

This PR adds Network Down event in EMACHandler task.

Test Steps

Ran FreeRTOS+TCP Demo on STM32H7 NUCLEO Board.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

Forum Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kar-rahul-aws kar-rahul-aws requested a review from a team as a code owner August 1, 2024 18:23
Copy link
Member

@ActoryOu ActoryOu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please share the verification steps and result.

@tony-josi-aws
Copy link
Member

STM32H7 console logs while ETH cable is reconnected:

FreeRTOS_AddEndPoint: MAC: 44-47 IPv4: 192.168.2.114
vIPSetDHCP_RATimerEnableState: Off
prvCloseDHCPSocket[44-47]: closed, user count 0
PHY ID 7C130
xPhyReset: phyBMCR_RESET 0 ready
+TCP: advertise: 01E1 config 3100
prvEthernetUpdateConfig: LS mask 00 Force 1
Autonego ready: 00000004: full duplex 100 mbit high status
Network buffers: 60 lowest 60
Queue space: lowest 69
Link Status is high
DHCP-socket[44-47]: DHCP Socket Create
prvCreateDHCPSocket[44-47]: open, user count 1
vDHCP_RATimerReload: 250
Network buffers: 60 lowest 59
vDHCPProcess: offer 192.168.0.106 for MAC address 44-47
vDHCPProcess: offer 192.168.0.106 for MAC address 44-47
Started 1 / 1 tasks
IP-address : 192.168.0.106
Default IP : 192.168.2.114
End-point  : up = yes method DHCP
Net mask   : 255.255.255.0
GW         : 192.168.0.1
DNS-0      : 49.205.72.130
DNS-1      : 183.82.243.66
Broadcast  : 192.168.0.255
MAC address: 00-11-22-33-44-47

prvCloseDHCPSocket[44-47]: closed, user count 0
vDHCP_RATimerReload: 43200000
xPhyCheckLinkStatus: PHY LS now 00

.
.
.
.
.



Link Status is high
DHCP-socket[44-47]: DHCP Socket Create
prvCreateDHCPSocket[44-47]: open, user count 1
vDHCP_RATimerReload: 250
Autonego ready: 00000004: full duplex 100 mbit high status
TX descriptors 1/4
vDHCPProcess: offer 192.168.0.106 for MAC address 44-47
vDHCPProcess: offer 192.168.0.106 for MAC address 44-47
IP-address : 192.168.0.106
Default IP : 192.168.2.114
End-point  : up = yes method DHCP
Net mask   : 255.255.255.0
GW         : 192.168.0.1
DNS-0      : 49.205.72.130
DNS-1      : 183.82.243.66
Broadcast  : 192.168.0.255
MAC address: 00-11-22-33-44-47

prvCloseDHCPSocket[44-47]: closed, user count 0
vDHCP_RATimerReload: 43200000

PING results while disconnected and then reconnected:

C:\Users\tonyjosi>ping 192.168.0.106

Pinging 192.168.0.106 with 32 bytes of data:
Reply from 192.168.0.105: Destination host unreachable.
Reply from 192.168.0.105: Destination host unreachable.
Reply from 192.168.0.105: Destination host unreachable.
Reply from 192.168.0.105: Destination host unreachable.

Ping statistics for 192.168.0.106:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

C:\Users\tonyjosi>ping 192.168.0.106

Pinging 192.168.0.106 with 32 bytes of data:
Reply from 192.168.0.106: bytes=32 time=2ms TTL=64
Reply from 192.168.0.106: bytes=32 time=1ms TTL=64
Reply from 192.168.0.106: bytes=32 time=1ms TTL=64
Reply from 192.168.0.106: bytes=32 time=2ms TTL=64

Ping statistics for 192.168.0.106:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 2ms, Average = 1ms

C:\Users\tonyjosi>

Screenshot 2024-08-05 182247

tony-josi-aws
tony-josi-aws previously approved these changes Aug 5, 2024
@aggarg aggarg merged commit c81b363 into FreeRTOS:main Aug 6, 2024
10 checks passed
@kar-rahul-aws kar-rahul-aws deleted the fix_STM32H7xx branch August 6, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants