esp8266

HTTPS get requests with NodeMCU and ESP8266

若如初见. 提交于 2019-12-24 07:35:04
问题 I'm having problems doing a HTTPS GET request with NodeMCU, even though it seems it should be possible according to their documentations and this answer here on StackOverflow. The code I'm trying is: function getHTTPS() http.get('https://httpbin.org/get', nil, function(code, data) print(code, data) end) end enduser_setup.start( function() print("Connected to wifi as: " .. wifi.sta.getip()) getHTTPS() end, function(err, str) print("enduser_setup: Err #" .. err .. ": " .. str) end ); This gets

Errors flashing NodeMCU to ESP8266

强颜欢笑 提交于 2019-12-24 06:04:39
问题 I've been having a bit of a rough time trying to flash the latest dev firmware. I've edited the question with a bunch of copy/paste examples from my cli and to clarify the steps I've taken so far. Here's what I've tried doing: I downloaded the 1.4.0 master and dev versions of firmware from the custom build service. I tried to flash the 1.4.0 master version with this command: python esptool.py --port /dev/ttyUSB0 write_flash -fm=dio -fs=32m 0x00000 ~/git/nodemcu- firmware/bin/nodemcu_integer_1

Get Mac address of client connected with esp8266

最后都变了- 提交于 2019-12-23 17:50:19
问题 I turned my esp8266 as an access point, so that the mobile devices could connect to it. Want to get the macAddress of the devices connected to it. How could I get it? 回答1: I got the answer from here and it works #include <ESP8266WiFi.h> #include <ESP8266WebServer.h> extern "C" { #include<user_interface.h> } /* configuration wifi */ const char *ssid = "COblaster"; ESP8266WebServer server(80); void handleRoot() { server.send(200, "text/html", "<h1>You are connected</h1>"); String addy = server

esp8266与arduino互通

时光怂恿深爱的人放手 提交于 2019-12-23 12:31:07
引脚相连接: VCC与CH_PD串联接3.3v RX与TX根据代码对应的相接(下面代码有) GDN接地 其他没有了 代码用实例里面的softwareserialexample 硬件部分: Arduino 、 esp8266-01 、 代码: # include <SoftwareSerial.h> SoftwareSerial mySerial ( 10 , 11 ) ; // RX, TX char val ; void setup ( ) { // Open serial communications and wait for port to open: Serial . begin ( 115200 ) ; while ( ! Serial ) { ; // wait for serial port to connect. Needed for native USB port only } Serial . println ( "Goodnight moon!" ) ; // set the data rate for the SoftwareSerial port mySerial . begin ( 115200 ) ; mySerial . println ( "Hello, world?" ) ; pinMode ( 8 , OUTPUT ) ; } void

esp8266自定义工程框架

丶灬走出姿态 提交于 2019-12-23 09:23:04
esp8266自定义工程框架 如何再起官方rtos sdk中规范的建立一个工程了,现在我们基于上一篇博客-esp8266对接阿里云平台做下规范。 首先将user_main.c中mqtt连接部分分离出来,写入user_mqtt.c中,分离是注意头文件包含,及一些全局变量设置。 user_main.c /* This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #include <stdio.h> //#include "esp_system.h" //#include "freertos/FreeRTOS.h" //#include "freertos/task.h" #include <stddef.h> #include <stdio.h> #include <string.h> #include "esp

ESP8266 Fails to add char to a very long String (>8000 chars)

為{幸葍}努か 提交于 2019-12-23 04:24:59
问题 After correctly getting the payload from an HTTPS request, adding the client's chars to a String stops after about 8000 characters, then resumes and stops again a few times Here's a snippet of my code: long streamSize = 0; Serial.println("Now reading payload..."); while (stream.connected()) { while (stream.available() > 0) { char ch = (char)stream.read(); Serial.println((String)"Reading [" + ++streamSize + "] " + ch); ret += ch; Serial.println(ret.length()); } } Which works fine, until:

How to use android to connect to an ESP8266 access point without internet in a stable way?

梦想与她 提交于 2019-12-22 17:38:19
问题 I have a Wifi Micro controller ESP8266 which also has an access point. I have referred to other blogs which talk about programmatically connecting to an access point and tried both the way Using the exposed standard APIS wifiManager.enableNetwork(netId, true); wifiManager.saveConfiguration(); wifiManager.reconnect(); Using the APIs which have @ hide on them wifiManager.connect(netId, ActionListener) The problem I am facing is that some time after i connect to the access point its getting

POST request on arduino with ESP8266 using WifiESP library

孤街醉人 提交于 2019-12-21 21:44:27
问题 I am attempting to make RESTful POST request using the WifiESP library (https://github.com/bportaluri/WiFiEsp). I'm able to successfully make the request with curl, but consistently get an error using the Arduino and ESP. I suspect the problem is related to the manual formatting of the POST request the library requires, but I don't see anything wrong. Here my sanitized code: if (client.connect(server, 80)) { Serial.println("Connected to server"); // Make a HTTP request String content = "{

Compile error with ESP8266 SDK in KAA 0.10.0

三世轮回 提交于 2019-12-20 05:59:05
问题 I have built the ESP8266 SDK according to this document. But the compile report shows the error below. Attachemnt is the ld file. Would you please help me to resolve it? Thanks a lot! /opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: esp8266_app section `.text' will not fit in region `iram1_0_seg' /opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: region

Faster communication between two ESP8266 in client-server setup

本秂侑毒 提交于 2019-12-20 04:31:51
问题 I am trying to communicate between two ESP8266 12 E modules, one is set up in access point mode and the other as a station. My aim is to establish communication between the two. How can I make the data transfer faster? Is this what is called TCP/IP connection? The code for the access point: #include <ESP8266WiFi.h> #include <ESP8266WebServer.h> #include <WiFiClient.h> WiFiServer server(80); void setup() { WiFi.mode(WIFI_AP); WiFi.softAP("esp", "lol123"); server.begin(); Serial.begin(9600);