gpt4 book ai didi

java - 物联网 : ESP module Wifi Ip address

转载 作者:行者123 更新时间:2023-11-29 19:10:59 25 4
gpt4 key购买 nike

正如您在标题中看到的那样,我正在制作一个 super 简单的物联网(不是真的)

使用 esp8266 并想让它连接到我的家庭 wifi 网络并在 android 应用程序和模块之间进行通信(android 应用程序连接到家庭 wifi)

注意:我正在使用 CODE VISION AVR

你可能会说:

Why not directly connect to ESP when its on Server Mode?

that's fine cause when ESP is server "he" can set ip for him self so ip will be always same BUT I want it to connect to home wifi

-

Why you wont connect with IP ?

you cant find the module ip easily because its given by Wifi

-

Find ESP ip using IP scanner

Its not possible cause it changes every time and user have to change IP every time in android app AND my app cant scann every time it want to connect to a single device its so dumb...

-

Do a Static Ip for ESP !

well that's not possible too because maybe that IP was taken by someone before ESP send static IP AT command ! + if IP wasent taken it may taken after Home Wifi Restarts !

抱歉英语不好:X

最佳答案

您可以使用软件序列号从 arduino 配置 esp8266。您需要完全了解设置电路。请记住,esp8266 在 3.3V 下运行,而 arduino 提供 5V 输出。最重要的是给esp8266发送AT命令。您可以使用以下命令连接您的 wifi。

AT+CWJAP="Your_WiFi","password"

如果需要查看esp8266的ip地址,可以使用这个命令。

AT+CIFSR

如果你想设置静态ip为esp8266,那么你可以试试这个。

AT+CIPSTA="ip module","ip gateway","subnet mask"

关于java - 物联网 : ESP module Wifi Ip address,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45329132/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com