Lab2_web / Mbed 2 deprecated webserverBlinky

Dependencies:   mbed

Fork of webserverBlinky by RealTimeCompLab2

Revision:
73:2f56ec87dbe9
Parent:
72:ad3d12753acf
Child:
74:7409fbeabb2e
--- a/main.cpp	Sat Jun 17 20:25:39 2017 +0000
+++ b/main.cpp	Mon Jun 26 17:41:47 2017 +0000
@@ -65,12 +65,12 @@
 
 
 
-// The serial port on your mbed hardware. Your PC should view this as a standard dial-up networking modem.
-// The modem type on windows should be selected as "Direct communication between two computers"
+// The serial port on your mbed hardware. Your PC should be configured to view this port as a standard dial-up networking modem.
+// On Windows the model type of the modem should be selected as "Communications cable between two computers"
 // The modem baud rate should be set to 115200 baud
 // See instructions at the top.
-// On a typical mbed hardware platform this is a USB virtual com port (VCP)
-Serial pc(USBTX, USBRX); // usb virtual com port
+// On a typical mbed hardware platform this serial port is a USB virtual com port (VCP) and the USB serial driver is supplied by the board vendor.
+Serial pc(USBTX, USBRX); // usb virtual com port for mbed hardware
 
 DigitalOut led1(LED1); // this led toggles when a packet is received
 
@@ -112,10 +112,8 @@
 void pppInitStruct()
 {
     ppp.online=0;
-    //ppp.rx.buf=rxbufppp;
     ppp.rx.tail=0;
     ppp.rx.head=0;
-    //ppp.pkt.buf=hdlcBuffer;
     ppp.pkt.len=0;
     ppp.ident=0;
     ppp.seq=1000;
@@ -316,7 +314,7 @@
 #define UDP_HEADER_SIZE 8
     int udpLength = ((udpLen[0]<<8) | udpLen[1]) - UDP_HEADER_SIZE; // size of the actual udp data
     if(v1) debug("UDP %d.%d.%d.%d:%d ", srcIP[0],srcIP[1],srcIP[2],srcIP[3],srcPort);
-    if(v1) debug("%d.%d.%d.%d:%d ",    dstIP[1],dstIP[1],dstIP[1],dstIP[1],dstPort);
+    if(v1) debug("%d.%d.%d.%d:%d ",     dstIP[0],dstIP[1],dstIP[2],dstIP[3],dstPort);
     debug("Len %d ", udpLength);
     int printSize = udpLength;
     if (printSize > 20) printSize = 20; // print only first 20 characters