Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
xbary
@xbary
i find problem
I have such a code:
'''

include <WiFiUdp.h>

include <WiFiServer.h>

include <WiFiClientSecure.h>

include <WiFiClient.h>

include <ESP8266WiFiType.h>

include <ESP8266WiFiSTA.h>

include <ESP8266WiFiScan.h>

include <ESP8266WiFiMulti.h>

include <ESP8266WiFiGeneric.h>

include <ESP8266WiFiAP.h>

include <ESP8266WiFi.h>

typedef enum {

sfSetup,
sfWaitForWiFiConnect,
sfIterate

}TSUPLA_func;

TSUPLA_func SuplaFunc = sfSetup;

define WIFI_STATICIP

void SUPLA_DoEvent(void)
{

switch (SuplaFunc)
{
case sfWaitForWiFiConnect:
{
    if (WiFi.status() == WL_CONNECTED)
    {
        SuplaFunc = sfSetup;
        break;
    }
    break;
}
case sfSetup:
{
    if (WiFi.status() == WL_CONNECTED)
    {
        SuplaFunc = sfIterate;
        break;
    }
    else
    {
        WiFi.mode(WIFI_STA);

ifdef WIFI_STATICIP

        WiFi.config(IPAddress(192,168,1,32), IPAddress(192, 168, 1, 1), IPAddress(255, 255, 255, 0), IPAddress(8, 8, 8, 8), IPAddress(8, 8, 4, 4));
        Serial.println("Set Static IP.");

else

        Serial.println("Set DHCP IP.");

endif

        WiFi.begin("xb_HUAWEI", "0987654321");
        SuplaFunc = sfWaitForWiFiConnect;
        break;
    }
}
case sfIterate:
{
    if (WiFi.status() == WL_CONNECTED)
    {

    }
    else
    {
        SuplaFunc = sfWaitForWiFiConnect;
    }
    break;
}
default:
{
    SuplaFunc = sfSetup;
    break;
}

}

}

void setup()
{
Serial.begin(115200);
delay(10);
Serial.setDebugOutput(true);
SuplaFunc = sfSetup;
Serial.println("Start");
}

void loop()
{
SUPLA_DoEvent();
}

xbary
@xbary
ESP nicely combines statically with rounter
The problem is that when the router restarts, it's ESP to wait for WIFI availability, but something stops it popping WDT reset ....
Interestingly, if we connect to an address with a DHCP router, then when the rounter restart does not pop up my WDR Reset ... what could be the problem?
xbary
@xbary

Start
STUB: dhcp_stop
Set Static IP.
scandone
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt

connected with xb_HUAWEI, channel 11
ip:192.168.1.32,mask:255.255.255.0,gw:192.168.1.1
ip:192.168.1.32,mask:255.255.255.0,gw:192.168.1.1
pm open,type:2 0
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
pm close 7
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
no xb_HUAWEI found, reconnect after 1s
reconnect
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 3
cnt

connected with xb_HUAWEI, channel 11

ets Jan 8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v00000000
~ld
Start
STUB: dhcp_stop
Set Static IP.
scandone
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 3
cnt

connected with xb_HUAWEI, channel 11
ip:192.168.1.32,mask:255.255.255.0,gw:192.168.1.1
ip:192.168.1.32,mask:255.255.255.0,gw:192.168.1.1

Oleg Perevyshin
@mcmega
How to measure the supply voltage with ESP.getVcc()? How to properly connect the ESP? Core 2.4.0.
xbary
@xbary
I found this problem ^^
The problem lies in the WiFi.config function
As Auto Reconnect is set, the core itself is suspended on this feature, and if it is called manually, it also hangs. And it hangs when ESP connects properly, then this network to which I connected disappears and after a while let's get back to Core or manually call again WiFi.Config ... it crashes WatchDog ...
Shelby Merrick
@forkineye
Noticed lwip2 is included and selected by default in the latest pulls. Is lwip2 recommended now? Any known issues with it? Haven't found much information on the implementation of it within the core yet.
Matej Sychra
@suculent
How is the LWIP2 being selected? In case I would like to change it and test the difference?
Shelby Merrick
@forkineye
@suculent it's an option in the Arduino IDE
Develo
@devyte
lwip1.4 has too many issues, especially with udp. Although lwip2 is experimental (and will be for some time to come), having it as default for now forces user attention and promotes testing. At this time, there has been only one issue with it reporting a crash, and a whole lot of old issues addressed, so it's a lot more positive than negative. I'm not sure that crash is due to lwip2 itself.
@suculent the Arduino IDE was reworked a bit (more to come after 2.4 is out), and you can select which version of lwip you want to build against. This is available in latest git.
Matej Sychra
@suculent
Ok. I prefer lwip2 anyway because my use-case has custom udp protocol.
Shelby Merrick
@forkineye
I was having some very odd issues when testing with lwip2 last night with processing incoming multicast streams so rolled back to the pre-compiled open source lwip1 included. I'll do more testing against lwip2 and see if I can figure out what was going on. Also, noticed the set hostname wasn't coming across with the DHCP request in lwip2. Will investigate further and post issues once I have good data.
Develo
@devyte
Please do as much testing as you can. Be aware that there is an elusive arp bug that has come up in randomly in both lwip versions. It is suspected to be in the espressif link layer code, but so far nobody has been able to conclusively prove it is there and no
... not in lwip itself
Thomas Cooper
@thomascoope

I'm trying to flash my ESP12-E using an FTDI232. I have the following schematic layout: https://www.dropbox.com/s/8032n9hre7bt6dd/FTDI232%20%26%20ESP8266_schem.png?dl=0

When I try to flash the ESP in Arduino I get the following message at 115200 baud:

warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04
error: espcomm_upload_mem failed

The LED on the ESP8266 flashes 4 times during the upload.

& get the following at 9600baud:

warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: didn't receive command response
error: espcomm_upload_mem failed

Both using the NodeMCU reset method.

david gauchard
@d-a-v
About lwIP-v2: it is not supposed to improve UDP (maybe it does). It was TCP flaws in lwIP-v1.4 that initially triggered the work on this. Please file new issues if problems arise with it that do not happen with legacy lwIP-v1.4.
brutzler
@brutzler
Hi, I have a question to SPIFFS. As far as I know its a part of the flash, that is not used for the "normal" ESP program-code.
But can be used for FS. Is there any possibility to gain access to the files in SPIFFS without a matching sketch? e.g. with a third party software, that is reading/writing this part of flash directly from a computer.
Matej Sychra
@suculent
You can use the esptool to not just write but also read flash to your computer. You could also upload a sketch that will list and output files to serial, but that would be a bit more tricky as you don’t want to overwrite spiffs on upload (which Arduino IDE does by default).
phunandcode
@phunandcode
Hey all, I hope I found the right room after being at esp32! I'm a total beginner with IoT and boards like Arduino. I have a Wemos d1 mini retired with a bunch of extras and I have played around with basic functions like lighting up leds on my expansion board etc. I have a small project in my mind but it's hard to find good documentation. Should I install the ESP8266 core for Arduino? Would it make development easier? Am I correct that I can then use arduino code with the board?
Me No Dev
@me-no-dev
yes you can
you are correct :)
phunandcode
@phunandcode
Ok thanks :)! Any good beginner tips for me?
Something that you would have liked to know when you started?
Me No Dev
@me-no-dev
uhmmm :D I am actually a wrong person to ask this :D
go through the documentation in github and check the examples
phunandcode
@phunandcode
Since you're not a dev right? ;)
Me No Dev
@me-no-dev
exactly :D
brutzler
@brutzler

@suculent

...to overwrite spiffs on upload (which Arduino IDE does by default)

You are sure about this? I made opposite experience.
Matej Sychra
@suculent
Might depend on default setting for respective board.
In Arduino IDE there is a plugin to write specific folder to SPIFFS as well as in PlatformIO. It’s just a matter of taking control over it.
Matej Sychra
@suculent
But original request was to read someone elses spiffs, which is entirely possible, unless you overwrite it with own sketch and the rest. Easiest will be the esptool way.IMHO.
phunandcode
@phunandcode
Anyone here that could help me out with my problem: I want to have a predefined led combination on the tm1638 and check if the user has input the same
I have the user input functionality ready, as in user presses a button to turn a certain led on/off
But I dont know how to store a certain led combination as a variable to check against in a loop
brutzler
@brutzler

@suculent

But original request was to read someone elses spiffs....

Oh, that was not my intention. I thought about reading the SPIFFS of an ESP from the computer that is connectet via serial interface.
The plugin of the arduino IDE might be the solution. Will check this later on...
al1fch
@al1fch

Hi
After todays upgrade none of my sketches boots.
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:812
load:0x40078000,len:0
load:0x40078000,len:11404
entry 0x40078aa0

Board Wemos Lolin, Arduino IDE 1.8.4, Windows 10
All is OK with previous version running under Ubuntu

Me No Dev
@me-no-dev
wrong room?
come to arduino-esp32 instead
al1fch
@al1fch
I'm on arduino-esp32 with "board WEMOS LOLIN32".... all was OK before upgrade via GIT, done todays one hour ago
Me No Dev
@me-no-dev
yes, but you are in ESP8266 Arduino room ;)