3 years, 11 months ago.

UIPEthernet library dose not work with ST-Nucleo-F411RE

Hi,When i use the UIPEthernet( library with my ST-Nucleo-F411RE board,it dose not work.Here is my demo code:

  1. include "mbed.h"
  2. include <UIPEthernet.h> const uint8_t MY_MAC[6] = { 0xDD,0xDD,0xDD,0x00,0x00,0x01 }; IP address must be also unique and compatible with your network. Change as appropriate. const IPAddress MY_IP(192, 168, 1, 194); const IPAddress MY_GW(192, 168, 1, 1); const IPAddress MY_SUB(255, 255, 0, 0); const IPAddress MY_DNS(202, 96, 128, 86);

UIPEthernetClass UIPEthernet(D11, D12, D13, D10);

DigitalOut led(LED1); Serial pc(USBTX, USBRX); int main() { pc.baud(115200); pc.printf("ethernet card begin....\r\n"); UIPEthernet.begin(MY_MAC); IPAddress ip = UIPEthernet.localIP(); pc.printf("ip:%d.%d.%d.%d\r\n", ip[0], ip[1], ip[2], ip[3]); IPAddress gw = UIPEthernet.gatewayIP(); pc.printf("gw:%d.%d.%d.%d\r\n", gw[0], gw[1], gw[2], gw[3]); IPAddress sb = UIPEthernet.subnetMask(); pc.printf("sb:%d.%d.%d.%d\r\n", sb[0], sb[1], sb[2], sb[3]); while (1) { led = !led; wait(1); } }

it always return : ethernet card begin.... ip: gw: sb:

it's there something wrong?

Comment on this question

2 Answers

2 years, 3 months ago.


You can download another (version) UIPEthernet from: If You have any question don't hesitate.

Best Regards

2 years, 3 months ago.

Hello Jenson,
Sorry for late answer. The code you attached seems to be neither a Server nor a Client. I'd recommend you to try one of the following demos:

EDITING TIPS: To format a text as code, when editing a question or wiki page, it helps enclosing it with <<code>> <</code>> tags as below (for more details see also the link to Editing tips at the bottom of your edit box).

int max(int x, int y) {
    return (x > y) ? x : y;

To post an answer, please log in.