This project is forked from STM32Ethernet and modified to support both RAW and socket API.
It is compatible with Arduino Ethernet library, allows an Arduino board (STM32 architecture for now) to connect with Internet.
-
- Enable
RT_USING_MUTEX,RT_USING_SEMAPHORE,RT_USING_MESSAGEQUEUE,RT_USING_EVENTandRT_USING_MEMPOOL
- Enable
-
Default network config
- MAC:
00:80:E1:FF:FF:FF - Subnet:
255.255.255.0 - Gateway:
xxx.xxx.xxx.1
- MAC:
-
Default number of DMA descriptors (STM32 architecture)
- Defined in e.g.
.arduino15/packages/STM32/hardware/stm32/1.9.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h- ETH_RXBUFNB == 4
- ETH_TXBUFNB == 4
- Defined in e.g.
-
Default Ethernet buffer size
- Defined in e.g.
.arduino15/packages/STM32/hardware/stm32/1.9.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h- ETH_RX_BUF_SIZE == 1524 (bytes)
- ETH_TX_BUF_SIZE == 1524 (bytes)
- Defined in e.g.
-
Default number of buffers (STM32 architecture)
- RX buffers defined in
utility/ethernetif.cpp- Rx_Buff == ETH_RXBUFNB * 2
- TX buffers defined in
lwippools.h- 372-byte * 8
- 736-byte * 8
- 1540-byte * 8
- RX buffers defined in
-
Notes
- It is recommended to set ETH_RXBUFNB to 8 when running examples.
-
Ethernet.begin() -
Ethernet.begin(ip) -
Ethernet.begin(ip, subnet) -
Ethernet.begin(ip, subnet, gateway) -
Ethernet.begin(ip, subnet, gateway, dns) -
Ethernet.begin(mac) -
Ethernet.begin(mac, ip) -
Ethernet.begin(mac, ip, dns) -
Ethernet.begin(mac, ip, dns, gateway) -
Ethernet.begin(mac, ip, dns, gateway, subnet)
For all examples, please select the suitable initialization method and parameters accordingly.
-
Ported from Arduino Ethernet library
- WebClient
- Connect to specified host (www.github.com) once.
- WebClientRepeating
- Connect to specified host (www.arduino.cc) repeatedly.
- WebServer
- Serve a HTTP page with port 80.
- ChatServer
- Echo TCP message with fixed IP address (
192.168.10.85by default) and telnet port (23)
- Echo TCP message with fixed IP address (
- DhcpChatServer
- Echo TCP message with telnet port (23)
- AdvancedChatServer
- Echo TCP message with telnet port (23) by using
Server.accept()method. - Accept up to 8 clients, and forward messages from one client to the rests.
- Echo TCP message with telnet port (23) by using
- DhcpAddressPrinter
- Print DHCP assigned IP address.
- TelnetClient
- A simple telnet client with MSH command
telnetto send message to server. - A Python script of telnet echo server, "telnet_server.py".
- Run the Python script before starting the example.
- A simple telnet client with MSH command
- BarometricPressureWebServer
- Serves the output of a Barometric Pressure Sensor as a web page.
- UDPSendReceiveString
- A example to send and receive UDP messages.
- A Python script to send and receive UDP messages, "udp_test.py".
- Start the example before running Python script.
- UdpNtpClient A simple NTP client.
- WebClient
-
LwIP App
- LwipHttp
- RAW API example web server and client
- LwipSocket
- Socket API example of
nonblocking,receiveandselect()functions. - Set the host address and port in "socket_examples.h".
- Start a simple HTTP server by Python,
python -m http.server 8080, before starting the example.
- Socket API example of
- LwipIperf
- RAW API example of iPerf TCP server and client
- LwipHttp