[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] Problem with use DHCP and IP fixed (SOLVED)
From: |
Diecol |
Subject: |
RE: [lwip-users] Problem with use DHCP and IP fixed (SOLVED) |
Date: |
Wed, 22 Dec 2010 09:14:24 -0800 (PST) |
No problem,
I solved the problem, It was almost done I just modificate something and now
it works fine..
Thanks again
Best Regards
Diego
Andrew Foster-3 wrote:
>
> Diego,
>
> I apologize. I should have dug a little deeper into the stack. The files
> I was referencing were an abstraction layer added by my silicon
> manufacturer. If you are curious how they implemented the functionality
> you can download the Stellaris family SDK from Luminary.
>
> Sorry for the confusion.
>
> Andrew
>
> -----Original Message-----
> From: Diecol [mailto:address@hidden
> Sent: Tuesday, December 21, 2010 09:06
> To: address@hidden
> Subject: RE: [lwip-users] Problem with use DHCP and IP fixed
>
>
> Thanks Andrew,
>
> But I'm using the lwip 1.4 version, this one don't have the lwiplib.h
> file
> ;(
>
> I dont know what to do anymore..
> I remember that with uIP I didnt #Define the DHCP!
> I used to use like that in my .h:
> #ifdef UIP_DHCP_on
> static int DHCP_ON = 1;
> #else
> static int DHCP_ON = 0;
> #endif
>
> And in the code I just changed the variable..
> DHCP_ON = 1; or DHCP_ON = 0;
> and restart the uIP!
>
> But in this case (lwip), if I create the DHCP variable like that:
> static int DHCP_ON = 1;
> I don't know why, but I can't change it in code.
> When I try to do like this: DHCP_ON = 1; appear this msg:
> lvalue required as left operand of assigment ;/
>
> I already try a lot of things, Im not having any more ideas..
> anyone?
>
> Thanks..
>
> Regards
>
> Diego
>
>
>
>
>
>
> Andrew Foster-3 wrote:
>>
>> Diecol,
>>
>> If I'm not mistaken you will need to leave both:
>>
>> #define LWIP_DHCP 1
>> #define LWIP_UDP 1
>>
>> This will allow you to make a runtime decision on what IP mode the
> user
>> has enabled. Keep in mind, the underlying protocol for receiving DHCP
>> packets is handled by the UDP portion of the lwIP stack (or at least
>> that is the way I remember it).
>>
>> As for configuring your interface at runtime, look into lwiplib.h. It
>> contains the structure, definitions and prototypes to configure your
>> network interface for both modes.
>>
>> Once you have assigned the proper parameters to the structure, you can
>
>> call lwIPLib_Init(lwIPLib_IPInfo_t *pInitParams).
>>
>> If you need to reconfigure call:
>> lwIPLib_NetworkConfigChange(
>> unsigned long ulIPAddr, // the new IP address to be used (static)
>> unsigned long ulNetMask, // the new network mask to be used (static)
>> unsigned long ulGWAddr, // the new Gateway address to be used
> (static)
>> unsigned long ulIPMode) // the IP Address Mode
>>
>> Hope this helps,
>>
>> Andrew
>>
>>
>> -----Original Message-----
>> From: Diecol [mailto:address@hidden
>> Sent: Monday, December 20, 2010 13:11
>> To: address@hidden
>> Subject: [lwip-users] Problem with use DHCP and IP fixed
>>
>>
>> Hello there,
>>
>> I'm working with lwip on at91sam9260 board and I'm using Eclipse
>> platform.
>> well,
>>
>> When I set at lwipopts.h like this:
>> #define LWIP_DHCP 1
>> #define LWIP_UDP 1
>> DHCP works fine..
>> And when I set like this:
>> #define LWIP_DHCP 0
>> #define LWIP_UDP 0
>> My Ip fixed works fine too..
>>
>> But in my code, users can changed from ip fixed to dhcp on and
>> contrariwise!
>>
>> When I used uIP protocol, I just did like this:
>>
>> uip_ipaddr_t ipaddr;
>> uip_ipaddr(ipaddr, 0, 0, 0, 0);
>> uip_sethostaddr(ipaddr);
>> uip_ipaddr(ipaddr, 0, 0, 0, 0);
>> uip_setdraddr(ipaddr);
>> uip_ipaddr(ipaddr, 0, 0, 0, 0);
>> uip_setnetmask(ipaddr);
>> uip_setethaddr(MacAddress);
>> dhcpc_init(MacAddress.addr, 6);
>> uip_restart();
>>
>> And It worked..
>> But now, I needed to change to lwip and when I try to change the
>> configuration It didnt work!
>>
>> Someone has any idea?
>>
>> Thanks
>>
>> Regards
>>
>> Oliveira, Diego
>>
>> --
>> View this message in context:
>>
> http://old.nabble.com/Problem-with-use-DHCP-and-IP-fixed-tp30500330p30500330.html
>> Sent from the lwip-users mailing list archive at Nabble.com.
>>
>>
>> _______________________________________________
>> lwip-users mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>
>>
>>
>> _______________________________________________
>> lwip-users mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>
>>
>
> --
> View this message in context:
> http://old.nabble.com/Problem-with-use-DHCP-and-IP-fixed-tp30500330p30506358.html
> Sent from the lwip-users mailing list archive at Nabble.com.
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
--
View this message in context:
http://old.nabble.com/Problem-with-use-DHCP-and-IP-fixed-tp30500330p30515858.html
Sent from the lwip-users mailing list archive at Nabble.com.