ESP8266 Developer Zone The Official ESP8266 Forum 2016-07-29T17:18:54+08:00 https://bbs.espressif.com:443/feed.php?f=66&t=2488 2016-07-29T17:18:54+08:00 2016-07-29T17:18:54+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2488&p=8198#p8198 <![CDATA[Re: How to get connected AP's IP address (gateway address)]]> Statistics: Posted by ftdiyun — Fri Jul 29, 2016 5:18 pm


]]>
2016-07-29T15:57:59+08:00 2016-07-29T15:57:59+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2488&p=8193#p8193 <![CDATA[Re: How to get connected AP's IP address (gateway address)]]> Using API, documentation "2c-esp8266_non_os_sdk_api_reference" has sample code of wifi_set_event_handler_cb.
Using AT command, after ESP8266 connected to an AP, input command: AT+CIPSTA_CUR? to get the IP details of ESP8266 station. Do NOT forget the ? character in the command (AT+CIPSTA_CUR?), it is used to query the information.

Statistics: Posted by Her Mary — Fri Jul 29, 2016 3:57 pm


]]>
2016-07-29T15:46:42+08:00 2016-07-29T15:46:42+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2488&p=8192#p8192 <![CDATA[Re: How to get connected AP's IP address (gateway address)]]>
For the call-back function, could you elaborate more in detail. Finally, what's the API can user use to get the AP's IP?

Anyway, "AT+CIFSR " could not return the connected AP's IP. This should be a bug, and needs to be corrected.

Statistics: Posted by ftdiyun — Fri Jul 29, 2016 3:46 pm


]]>
2016-07-29T14:31:28+08:00 2016-07-29T14:31:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2488&p=8190#p8190 <![CDATA[Re: How to get connected AP's IP address (gateway address)]]> Using API : WiFi event "EVENT_STAMODE_GOT_IP" after registered callback by wifi_set_event_handler_cb.
Using AT command : AT+CIPSTA_CUR?

Statistics: Posted by Her Mary — Fri Jul 29, 2016 2:31 pm


]]>
2016-07-29T09:23:33+08:00 2016-07-29T09:23:33+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2488&p=8180#p8180 <![CDATA[How to get connected AP's IP address (gateway address)]]> After connecting to AP, and obtained the address, there is no information of AP's IP address.
AT+CIFSR
+CIFSR:STAIP,"192.168.1.5"
+CIFSR:STAMAC,"18:fe:34:a6:01:a9"
OK

If there is no AT commands to know AP's IP address, please suggest which API in the SDK we can use. In "2c-esp8266_non_os_sdk_api_reference_cn.pdf", there seems no API to provide AP's IP address.

FW version:
at+GMR
AT version:1.3.0.0(Jul 14 2016 18:54:01)
SDK version:2.0.0(656edbf)
compile time:Jul 22 2016 12:02:54
OK

Statistics: Posted by ftdiyun — Fri Jul 29, 2016 9:23 am


]]>