Example: 50-Arduino-Boards/Portenta-H7/53-Ethernet/peer_to_peer.py
# 本作品采用MIT许可证授权。
# 版权所有 (c) 2013-2023 OpenMV LLC。保留所有权利。
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# 以太网局域网点对点示例。
# 在PC上尝试以下操作:
#
# $> sudo ifconfig eth0 192.168.1.100 up
# $> ping 192.168.1.102
import network
import time
lan = network.LAN()
lan.active(True)
lan.ifconfig(("192.168.1.102", "255.255.255.0", "192.168.1.1", "192.168.1.1"))
while True:
# 没有其他事情要做。
time.sleep(1.0)