UIPEthernet library for Arduino IDE, Eclipse with arduino plugin and MBED/SMeshStudio (AVR,STM32F,ESP8266,Intel ARC32,Nordic nRF51,Teensy boards,Realtek Ameba(RTL8195A,RTL8710)), ENC28j60 network chip. Compatible with Wiznet W5100 Ethernet library API. Compiled and tested on Nucleo-F302R8. Master repository is: https://github.com/UIPEthernet/UIPEthernet/

Revision:
12:aef29fbc4a62
Parent:
11:3fb19220d9ec
diff -r 3fb19220d9ec -r aef29fbc4a62 examples/UdpServer/UdpServer.ino
--- a/examples/UdpServer/UdpServer.ino	Thu Dec 29 13:07:19 2016 +0100
+++ b/examples/UdpServer/UdpServer.ino	Thu Dec 29 14:09:13 2016 +0100
@@ -34,7 +34,12 @@
 int main() {
 #endif
   #if ACTLOGLEVEL>LOG_NONE
-    LogObject.begin(9600);
+    #if defined(ARDUINO)
+      LogObject.begin(9600);
+    #endif
+    #if defined(__MBED__)
+      Serial LogObject(SERIAL_TX,SERIAL_RX);
+    #endif
   #endif
 
   uint8_t mac[6] = {0x00,0x01,0x02,0x03,0x04,0x05};
@@ -81,9 +86,14 @@
       {
       #if ACTLOGLEVEL>=LOG_INFO
         LogObject.uart_send_str(F("remote ip: "));
-        LogObject.println(udp.remoteIP());
+        #if defined(ARDUINO)
+          LogObject.println(udp.remoteIP());
+        #endif
+        #if defined(__MBED__)
+          LogObject.printf("%d.%d.%d.%d",udp.remoteIP()[0],udp.remoteIP()[1],udp.remoteIP()[2],udp.remoteIP()[3]);
+        #endif
         LogObject.uart_send_str(F("remote port: "));
-        LogObject.println(udp.remotePort());
+        LogObject.uart_send_decln(udp.remotePort());
       #endif
         //send new packet back to ip/port of client. This also
         //configures the current connection to ignore packets from