TCPEchoClient-WIZwiki-W7500

Dependencies:   WIZnetInterface mbed DDNS_NoIP

main.cpp

Committer:
Ricky_Kwon
Date:
2016-01-25
Revision:
2:a89cac7c1a3b
Parent:
1:86be81112448

File content as of revision 2:a89cac7c1a3b:

#include "mbed.h"
#include "EthernetInterface.h"
#include "DDNSClient.h"

uint8_t mac_addr[6] = {0x00, 0x08, 0xdc, 0x12, 0x34, 0x45};
//const char ip_addr[] = "192.168.0.123"; 
//const char mask_addr[] = "255.255.255.0"; 
//const char gateway_addr[] = "192.168.0.1"; 
    


int main (void) 
{
    char buf[1024];
    int n=0;
    printf("Wait a second...\r\n");
    EthernetInterface eth;
    //eth.init(mac_addr, ip_addr, mask_addr, gateway_addr); //Use Static
    eth.init(mac_addr); //Use Dynamic
    eth.connect();
    printf("WIZwiki-W7500 IP Address is %s\r\n", eth.getIPAddress());

    DDNSClient noip;
    
    noip.checkIp();
    
    noip.userSetNoIP("cmlja3kwODQ6cmlja3kxMjM=", "ricky084.ddns.net");
    
    noip.updateNoIP();
    
    while(true) {

    }
}