Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of webserverBlinky by
Diff: main.cpp
- Revision:
- 5:27624c02189f
- Parent:
- 4:a469050d5b80
- Child:
- 6:fba4c2e817b8
--- a/main.cpp Thu Dec 29 04:21:29 2016 +0000 +++ b/main.cpp Thu Dec 29 04:34:25 2016 +0000 @@ -134,18 +134,20 @@ } void LCPrequestFrame() { - ppp.pkt.buf[4]=2; // change to an ACK packet - sendFrame(); // return their request - ppp.pkt.buf[4]=1; // change back to a request - ppp.pkt.buf[5] = ppp.pkt.buf[5]+1; // take the next id - ppp.pkt.buf[16] = ppp.pkt.buf[16] ^ 0x33; // modify magic number - ppp.pkt.buf[17] = ppp.pkt.buf[16] ^ 0x33; // modify magic number - sendFrame(); // send our request + ppp.pkt.buf[4]=2; // change to an ACK packet + sendFrame(); // acknowledge their request + // this is the right time to send our LCP setup request to them + ppp.pkt.buf[4]=1; // change back to a request + ppp.pkt.buf[5] = ppp.pkt.buf[5]+1; // take the next id + ppp.pkt.buf[16] = ppp.pkt.buf[16] ^ 0x33; // modify magic number + ppp.pkt.buf[17] = ppp.pkt.buf[16] ^ 0x33; // modify magic number + sendFrame(); // send our request + } void LCPackFrame() { xx.printf("== PPP is up ==\n"); -} +} void generalFrame() { xx.printf("== General Frame ==\n");