- Generate Program
- Add easy_connect Library
easy_connect
git clone or Download Zip
- Wiznet-eth-driver
Wiznet-eth-driver
git clone or Download Zip
- Copy file easy-connect.lib mbed-os-example-sockets_Nucleo-F103RB_W5500
- Add easy_connect Library
Commend : mbed deploy https://github.com/WIZnet-MbedEthernet/easy-connect.git
- Wiznet-eth-driver
Commend : mbed deploy https://github.com/WIZnet-MbedEthernet/wiznet-eth-driver.git
{
"config": {
"network-interface":{
"help": "options are ETHERNET, ETHERNET_W5500, WIFI_ESP8266, WIFI_ODIN, MESH_LOWPAN_ND, MESH_THREAD",
"value": "ETHERNET_W5500"
},
"mesh_radio_type": {
"help": "options are ATMEL, MCR20, SPIRIT1, EFR32",
"value": "ATMEL"
},
"esp8266-tx": {
"help": "Pin used as TX (connects to ESP8266 RX)",
"value": "D1"
},
"esp8266-rx": {
"help": "Pin used as RX (connects to ESP8266 TX)",
"value": "D0"
},
"esp8266-debug": {
"value": true
},
"wifi-ssid": {
"value": "\"SSID\""
},
"wifi-password": {
"value": "\"Password\""
}
},
"target_overrides": {
"*": {
"target.features_add": ["NANOSTACK", "LOWPAN_ROUTER", "COMMON_PAL"],
"platform.stdio-baud-rate": 115200,
"platform.stdio-convert-newlines": true,
"mbed-mesh-api.6lowpan-nd-channel-page": 0,
"mbed-mesh-api.6lowpan-nd-channel": 12,
"mbed-trace.enable": 0
},
"HEXIWEAR": {
"esp8266-tx": "PTD3",
"esp8266-rx": "PTD2"
},
"NUCLEO_F401RE": {
"esp8266-tx": "D8",
"esp8266-rx": "D2"
},
"NUCLEO_F411RE": {
"esp8266-tx": "D8",
"esp8266-rx": "D2"
},
"NUCLEO_F103RB": {
"esp8266-tx": "D8",
"esp8266-rx": "D2"
}
}
}
Nucleo_F103RB not support LSE and must define LSI.
After Build Program, check define LSENote: The default serial port baud rate is 115200 bit/s.
Mbed OS Socket example
Mbed OS version: 5.11.2
[EasyConnect] IPv4 mode
[EasyConnect] Using Ethernet WIZnet
[EasyConnect] Init with MAC address
[EasyConnect] DHCP start
[EasyConnect] DHCP completed
[EasyConnect] Connected, IP: 192.168.0.3
[EasyConnect] Connected to Network successfully
[EasyConnect] MAC address 00:XX:XX:XX:XX:XX
[EasyConnect] IP address 192.168.0.3
IP address: 192.168.0.3
Netmask: 255.255.255.0
Gateway: 192.168.0.1
sent 58 [GET / HTTP/1.1]
recv 181 [HTTP/1.1 200 OK]
External IP address: XXX.XXX.XXX.XXX
Done