Page 2 of 2

Re: Anyone get static IP assignment working for wifi?

Posted: Tue Apr 17, 2018 6:49 pm
by fly135
hassan789 wrote:yes, i got it to work.. you need to add this

Code: Select all

  ip_addr_t d; 
  d.type = IPADDR_TYPE_V4; 
  d.u_addr.ip4.addr = 0x08080808; //8.8.8.8 dns
  dns_setserver(0, &d); 
I did that except I put a 1 where you have a 0 in dns_setserver. After seeing your post I search the source and see that I should have put a zero there as well. Thanks!

I thought that the first param was the number of servers you are passing in. But it's the zero based index of the server you are assigning.

John A

Re: Anyone get static IP assignment working for wifi?

Posted: Wed Jun 03, 2020 5:03 pm
by somesh
Hi,

I have set static ip but esp32 is not in showing in AP( Router or hotspot) or hostname showing as unknown.
any guess? why?