标签: esp8266

使用ESP8266连接到强制门户WiFi

我想在受专属门户保护的wifi网络上连接基于ESP8266的传感器(我别无选择,我不能要求克减)。我有一个登录名/密码可以连接。

从基本计算机上,当我连接到网络并发出Internet请求时(例如,我在Google上搜索“ bl”),我得到了这样的页面:https:// url:1003 / fgtauth?12291a0aff04200a

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">
    ...
    </style>
    <body>
<div class="oc">
  <div class="ic">
    <form action="/" method="post">
      <input type="hidden" name="4Tredir" value= "https://www.google.com/search?q=test&ie=utf-8&oe=utf-8">
      <input type="hidden" name="magic" value="12291a0aff04200a">
      <input type="hidden" name="answer" value="0">
      <h1 class="logo">
        GENERAL CONDITIONS
      </h1>
      <p>
      I.    OBJET <br /> <br />
      Some blabla..
      </p>
      <h2>
        Do you agree to the above terms?
      </h2>
      <div class="fec">
        <input type="submit" value= "Yes, I agree" onclick="sb('1')">
        <input type="submit" value= …
Run Code Online (Sandbox Code Playgroud)

arduino wifi captivenetwork esp8266

3
推荐指数
1
解决办法
5913
查看次数

ESP8266异常29

图像

\n\n

我以 AP 模式将 Wemos D1 连接到电脑。当我发送大量消息时,它会给我一个 excepti\xc3\xb3n。波特率:921600。

\n

arduino esp8266

3
推荐指数
1
解决办法
2万
查看次数

ESP8266 + WiFiManager + pubsubclient

我正在使用 ESP8266,并希望使用 MQTT 来控制它,MQTT 服务器是我的 Synology DS415+。我希望 ESP 位于安装后无法使用串行访问它的地方,因此我需要能够使用 WiFi 配置它的 Wifi-Credentials 和 MQTT-Server IP、端口和凭据。

因此我决定 WiFiManager-Library 和 PubSubClient-Library 可以为我做这件事。问题是:我无法使用 WiFiManager 使 PubSubClient 工作,因为我还没有找到如何告诉 PubSubClient 使用正确的“客户端”。

以下示例适用于我的 ESP,但它不允许动态配置 ESP Wifi:https : //github.com/knolleary/pubsubclient/blob/master/examples/mqtt_esp8266/mqtt_esp8266.ino

我想出了以下内容:http : //pastebin.com/t5evEy1i

然而,这不起作用,它通过串行的输出如下:

mounting FS...
mounted file system
reading config file
opened config file
{"mqtt_server":"192.168.1.250","mqtt_port":"9001","switch_token":"BackupSwitch"}
parsed json
*WM: Adding parameter
*WM: server
*WM: Adding parameter
*WM: port
*WM: Adding parameter
*WM: blynk
*WM: 
*WM: AutoConnect
*WM: Reading SSID
*WM: SSID: 
*WM: XXX
*WM: Reading Password …
Run Code Online (Sandbox Code Playgroud)

arduino wifimanager mqtt esp8266

3
推荐指数
1
解决办法
8303
查看次数

esp8266在wifi串口板和Arduino Uno板上

我买了带有串口wifi wifi卡的 esp8266 我把RX连接到TX; TX到RX; VCC到VCC; GRD到GRD; 如果程序模式不在UART模式下,我就不能与电路板通信; 重置什么都不做.

板上的红色指示灯亮着.

我将wifi串口连接到Arduino uno板.尝试上传草图我得到以下错误:

warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
Run Code Online (Sandbox Code Playgroud)

任何帮助或指南将帮助我解决问题.

arduino esp8266

3
推荐指数
1
解决办法
3万
查看次数

带有NodeMCU固件的ESP8622在刷新新版固件后开始闪烁(旧版本正在运行)

昨天我试图从nodemcu-build.com生成新的固件bin,并在使用esptool.py闪烁后,我的esp开始闪烁(esp芯片上的蓝色二极管)并发送(通过USB转换器)垃圾数据.我尝试使用模块组合生成构建,尝试刷新它们(二进制和浮动),它总是开始闪烁并发送垃圾.比我的同事尝试了他的旧版本,一切都工作得很好,而不是他发给我他的旧版本,闪光后一切都很完美.所以闪存工具或系统没有问题(在ma​​c和linux上都经过测试),旧版本也没有问题.任何新的构建都失败了.

我的闪烁命令:

esptool.py -p /dev/cu.wchusbserialfa130 write_flash 0x0 nodemcu-master-13-modules-2016-04-09-12-28-55-float.bin --verify

有人知道哪里可能有问题或我们做错了什么?

nodemcu esp8266

3
推荐指数
1
解决办法
4227
查看次数

使用 ESP8266 在 Arduino 中获取网关地址

我需要 ESP8266 的默认网关 IP 地址。我知道在 LUA 中,您可以使用以下代码检索它:

ip, netmask, gateway = wifi.sta.getip()
print(gateway)
Run Code Online (Sandbox Code Playgroud)

但是如何使用 Arduino/C++?

arduino arduino-ide esp8266

3
推荐指数
1
解决办法
4185
查看次数

如何切换到普通的wifi模式到接入点模式ESP8266

我正在使用ESP8266-12 wifi模块访问我的家庭wifi网络来控制灯光.为了上传新固件(OTA:Over the Air)更新,我想使用ESP8266的热点AccessPoint,因为在更改了我的wifi网络的密码后,我将无法做到这一点.这是我的Arduino代码:

#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include <ESP8266WebServer.h>

//ssid and password of your wifi network
const char* ssid = "wifi_ssid";
const char* password = "wifi_password";

//ssid and password to connect to local hotspot of ESP8266
const char *esp_ssid = "your_desired_ssid";
const char *esp_password = "your_desired_password";

IPAddress ip(192, 168, 1, xx); // where xx is the desired IP Address
IPAddress gateway(192, 168, 1, 254); // set gateway to match your wifi network
IPAddress subnet(255, 255, 255, 0); …
Run Code Online (Sandbox Code Playgroud)

arduino wifi access-point wificonfiguration esp8266

3
推荐指数
1
解决办法
2万
查看次数

在arduino中创建一个定时3状态按钮

由于arduino中esp8266的引脚不足,我需要一种方法来检测按钮在哪里;

  momentary press runs snooze() 
  15 sec press runs conf_Desk() 
  30 sec press runs calibration()
Run Code Online (Sandbox Code Playgroud)

preconfig;

  int buttonPin = D7;
  pinMode( buttonPin , INPUT_PULLUP);
Run Code Online (Sandbox Code Playgroud)

同时允许主循环运行.

如果我捕获一个中断,它会停止循环循环(),几毫秒的延迟是可以的,但是延迟的秒数太多了.

功能已经写好了我似乎无法提出如何跟踪并确认保持长度以根据正确的时间调用正确的功能而不停止其他必须保持循环的过程.

arduino timed button esp8266 arduino-esp8266

3
推荐指数
1
解决办法
489
查看次数

ESP8266 UPnP端口转发 - 物联网

是否可以使用UPNP协议在路由器上使用ESP8266进行自动端口转发?

即使我不在家,我也需要能够访问我的ESP8266模块.目前我已在路由器设置中手动配置端口转发.

但是在未来,为了使我的项目成为商业产品,它需要能够进行自动端口转发,因为这对普通用户来说是一个障碍.

在互联网上,我在ESP8266上发现了一些关于UPNP的事情,但它不是关于端口转发的.

非常感谢你提前!

upnp iot esp8266

3
推荐指数
1
解决办法
2899
查看次数

如何使用espconn捕获HTTPS请求?

以下代码允许捕获所有来自我的esp8266(运行NodeMCU)并显示我自己的页面的请求:

static int enduser_setup_dns_start(void)
{
  state->espconn_dns_udp = (struct espconn *) c_malloc(sizeof(struct espconn));
  esp_udp *esp_udp_data = (esp_udp *) c_malloc(sizeof(esp_udp));

  c_memset(state->espconn_dns_udp, 0, sizeof(struct espconn));
  c_memset(esp_udp_data, 0, sizeof(esp_udp));
  state->espconn_dns_udp->proto.udp = esp_udp_data;
  state->espconn_dns_udp->type = ESPCONN_UDP;
  state->espconn_dns_udp->state = ESPCONN_NONE;
  esp_udp_data->local_port = 53;


  return 0;
}
Run Code Online (Sandbox Code Playgroud)

它捕获http://example.com,但不捕获http s://example.com.我该怎么办呢?

c dns https nodemcu esp8266

3
推荐指数
1
解决办法
213
查看次数