11 years, 6 months ago.

How to find out the ip-adress of my lpc4088

Hi I have following Problem:

I connected my LPC4088 with my network. And there is a example Programm running on it which gets a IP adress for the board automatically. So do you got any idea how i can find out the ip adress of my board?

p.s.: i cannot give my board a static ip adress

1 Answer

11 years, 6 months ago.

Try this...

...kevin

#include "mbed.h"
#include "EthernetInterface.h"              //includes rtos.h

Serial pc(USBTX, USBRX);                    //Serial USB communications over mbed USB port
EthernetInterface eth;                      //Ethernet connection


int main() {
    //other initialization code....

    eth.init();  
  
    //display IP info
    pc.printf("-  IP Address is: %s \n", eth.getIPAddress());
    pc.printf("-  IP Mask is:    %s\n", eth.getNetworkMask());
    pc.printf("-  IP Gateway is: %s\n", eth.getGateway());

Accepted Answer