[En-Nut-Discussion] MAC address in Ethernut 3

scostas scostas at det.uvigo.es
Thu Apr 6 18:18:50 CEST 2006


Hi again all:

I'm trying to configure a fixed MAC address for each Ethernut 3, but I
can't. Where and how must I store the MAC to ensure that calling

    NutDhcpIfConfig("eth0", 0, 10000)

will use that MAC, instead of returning a -1?

I even tried with

    unsigned char buffer[31];
   
    buffer[0]=31;
    buffer[1]='e';
    buffer[2]='t';
    buffer[3]='h';
    buffer[4]='0';
    buffer[5]=0;
    buffer[6]=0;
    buffer[7]=0;
    buffer[8]=0;
    buffer[9]=0x00; // MAC
    buffer[10]=0x06;
    buffer[11]=0x98;
    buffer[12]=0x30;
    buffer[13]=0x00;
    buffer[14]=0x28;
    buffer[15]=192; // ultima IP
    buffer[16]=168;
    buffer[17]=1;
    buffer[18]=220;
    buffer[19]=0xFF; // mascara
    buffer[20]=0xFF;
    buffer[21]=0xFF;
    buffer[22]=0x00;
    buffer[23]=192; // salida
    buffer[24]=168;
    buffer[25]=1;
    buffer[26]=100;
    buffer[27]=192; // IP configurada
    buffer[28]=168;
    buffer[29]=1;
    buffer[30]=220;
   
    X12EepromWrite(0,buffer,31);

But it doesn't work :(

Thanks in advance.



More information about the En-Nut-Discussion mailing list