Transfer data between UART ports and Ethernet.

Dependencies:   BufferedSerial

Transfer data between UART ports and Ethernet.

  • Support multiple UART ports.
  • Support fixed IP address and DHCP.
  • Support TCP server and TCP client modes.
  • Support a simple web server for UART and Ethernet configuration.

Files at this revision

API Documentation at this revision

Comitter:
morgandu
Date:
Fri Apr 20 10:51:28 2018 +0000
Parent:
4:b480ec899e05
Child:
6:dc9f344f4bf0
Commit message:
Upgrade Mbed OS to 5.8.2; Fix to support NuMaker-PFM-M487 v3.0 board

Changed in this revision

NuMaker-mbed-SD-driver.lib Show annotated file Show diff for this revision Revisions of this file
README.md Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- a/NuMaker-mbed-SD-driver.lib	Mon Oct 16 02:07:58 2017 +0000
+++ b/NuMaker-mbed-SD-driver.lib	Fri Apr 20 10:51:28 2018 +0000
@@ -1,1 +1,1 @@
-https://github.com/OpenNuvoton/NuMaker-mbed-SD-driver/#253f370c308331fc9a82b5387ed108750ac70ac8
+https://github.com/OpenNuvoton/NuMaker-mbed-SD-driver/#7b763a96fa361da47a294efbe4bc201f7fb9c818
--- a/README.md	Mon Oct 16 02:07:58 2017 +0000
+++ b/README.md	Fri Apr 20 10:51:28 2018 +0000
@@ -19,4 +19,26 @@
 
 ## Configuration
 
+* Following configurations are set in ste_config.h
 
+ENABLE_WEB_CONFIG
+    Define ENABLE_WEB_CONFIG to active a simple web server for UART ports and Ethernet port configuration.
+
+MAX_UART_PORTS
+    Maximum UART ports supported. It should be 1, 2, or 3. Please also define mapping table "port_config[]" in main.c
+
+DEFAULT_UART_BAUD
+    Default UART baud
+
+NET_PORT_BASE
+    Network base port number to listen. The base port maps to the 1st UART port, the (base port + 1) maps to the 2nd UART port, etc.
+
+SER_CONFIG_FILE // for serial ports
+NET_CONFIG_FILE // for network
+    Files in SD card to store settings via web configuration
+
+MAX_SERVER_ADDRESS_SIZE
+    Maximum size of server address for web configuration
+
+MAX_IPV4_ADDRESS_SIZE
+Maximum size of IP address for web configuration
--- a/main.cpp	Mon Oct 16 02:07:58 2017 +0000
+++ b/main.cpp	Fri Apr 20 10:51:28 2018 +0000
@@ -26,9 +26,9 @@
 S_NET_CONFIG net_config = {IP_STATIC_MODE, IP_ADDRESS, NETWORK_MASK, GATEWAY_ADDRESS};
 
 #if defined (TARGET_NUMAKER_PFM_M487)
-BufferedSerial serial_0(PH_8, PH_9, 256, 4);    // UART1
+BufferedSerial serial_0(PB_3, PB_2, 256, 4);    // UART1
 BufferedSerial serial_1(PA_5, PA_4, 256, 4);    // UART5
-//BufferedSerial serial_2(PC_12, PC_11, 256, 4);  // UART0, Debug
+//BufferedSerial serial_2(PB_13, PB_12, 256, 4);  // UART0, Debug
 
 #elif defined (TARGET_NUMAKER_PFM_NUC472)
 BufferedSerial serial_0(PH_1, PH_0, 256, 4);    // UART4
@@ -301,7 +301,7 @@
     
     eth.connect();
     printf("IP Address is %s\r\n", eth.get_ip_address());
-    
+
     Thread thread[MAX_UART_PORTS];
     
     // Folk thread for each port
--- a/mbed-os.lib	Mon Oct 16 02:07:58 2017 +0000
+++ b/mbed-os.lib	Fri Apr 20 10:51:28 2018 +0000
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#6e0d01cd13e8aca7bf4d697c3699ec9225386881
+https://github.com/ARMmbed/mbed-os/#f9ee4e849f8cbd64f1ec5fdd4ad256585a208360