Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
fmgomes
@fmgomes
Regarding the WiFi.disconnect() crash, when I call this method, this is the crash log I'm seeing:

Exception (3):
epc1=0x4000deed epc2=0x00000000 epc3=0x00000000 excvaddr=0x40000014 depc=0x00000000

ctx: cont
sp: 3fff5a10 end: 3fff5cd0 offset: 01a0

stack>>>
3fff5bb0: 4010623e 3fffb2ac 000000ff 00000000
3fff5bc0: 40235be9 3fffb36c 00000484 00000000
3fff5bd0: 3fffb42c 3fff5c81 00000001 40235d3c
3fff5be0: 3fff5c20 3fffb36c 00000009 3fff4ca0
3fff5bf0: 3fff5c40 3ffffed0 3fffb36c 00000009
3fff5c00: 40235d78 3fff5d18 00000000 40214c65
3fff5c10: 402088ec 3fff40dc 3fff4cb0 3fff5d18
3fff5c20: 00000000 00000000 40211828 39ff4cb0
3fff5c30: 3fff4000 00000001 3ffe903d 40214a60
3fff5c40: 00000000 00000006 3ffe8eee 3fff4ca0
3fff5c50: 00000009 00000001 3fff5d18 40211fc9
3fff5c60: 3ffe903c 00000009 3fff5d18 40214cc3
3fff5c70: 3ffe8ee8 3fff38fc 3fff5d18 40214b38
3fff5c80: 00000009 3fff38dc 3fff5d18 40214cf5
3fff5c90: 3fff385c 3fff38dc 3fff5d18 402079d3
3fff5ca0: 00000000 00000000 00000001 3fff4ca0
3fff5cb0: 3fffdad0 00000000 3fff4c98 40211874
3fff5cc0: feefeffe feefeffe 3fff4cb0 40100958
<<<stack<<<

ets Jan 8 2013,rst cause:1, boot mode:(3,6)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld

Any idea why?
Should I close active connections first?
This message was deleted
Lars Englund
@larsenglund

What is the best practice / simplest way of enabling and disabling debug printouts? Currently I use

#define DEBUG_PRINT(x) Serial.print(x)
#define DEBUG_PRINTLN(x) Serial.println(x)
#define DEBUG_PRINTF(x, ...) Serial.printf(x, ...)

and then just empty-define them when I want to turn off debug printouts...

tzapu
@tzapu
there s something in the documentation of the core that would let you enable /disable debug using the arduino ide tools menu
if that helps
Lars Englund
@larsenglund
@tzapu thanks!
Hmm.. is this related to me just updating to arduino 1.6.8 and esp 2.2.0?
In file included from D:\bitbucket\exxact\Firmware\EDWD\EDWD.ino:11:0:

C:\Users\englund\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\cores\esp8266/Arduino.h:42:14: error: expected identifier before numeric constant

 #define HIGH 0x1

              ^
after that follows alot of errors about the expansion of the macro HIGH..
The wifi scan example compiles just fine
tzapu
@tzapu
@larsenglund no probs, don t know about the other thing..
Lars Englund
@larsenglund
Apparently an update to the Keypad library did a #define CLOSED HIGH in Keypad.h which seemed to be the source of the problem. Redefining it to #define BTN_CLOSED HIGH made the errors go away..
It was colliding with a definition of CLOSED in some WiFi stuff..
Helio Machado
@0x2b3bfa0
Hello!
@all the Benoit Blanchon ArduinoJson users: Only a question:
File configFile = SPIFFS.open("/config.json", "r");
  size_t size = configFile.size();
  std::unique_ptr<char[]> buf(new char[size]);
  StaticJsonBuffer<200> jsonBuffer;
  JsonObject& root = jsonBuffer.parseObject(buf.get());
    bool a = root["a"];
  bool b = root["b"];
  Serial.print("A: ");
  Serial.println(a);
  Serial.print("B: ");
  Serial.println(b);
config.json contents:
{"a": false, "b": true}
Why the above code returns both values as false?
A: 0
B: 0
I've checked the file on the spiffs, and it looks good.
Helio Machado
@0x2b3bfa0
Going offline for half an hour. See you later!
Helio Machado
@0x2b3bfa0
Silly error!
I missed to add configFile.readBytes(buf.get(), size);
Holger Lembke
@holgerlembke
Moin!
For a while now I try to build uploading to my esp-12 with CH340T. Works great with manual reset/prog-jumper.
or better: IDE/esptool thinks it is uploading, ESP-12 seems to see something, too. But reset does not work and serial monitor is dead.
Looking on the data lines (reset and gpio0) it looks like everything goes totally wrong.
and I have no real idea where to start to fix it.
Any suggestions?
Holger Lembke
@holgerlembke
(Addendum: building the Nodemcu solution and it works instantly...)
bobcroft
@bobcroft
holgerlembke, I believe the issue you see is to do with the DTR / RTS lines the nodeMCU set up uses these lines to control GPIO 0 and GPIO 2 during the re-flashing of the ESP. The standard download or manual reset does not use these lines (DTR/RTS). I had exactly the same issue as you using a CH340 and found that I could download prpoerly by using the nodeMCU option. However, once downloaded my code did not run as expected so I need to check and see if GPIO 0 and GPIO 2 are returned to the correct state for normal running after the flash download. If GPIO 0 is held low for some reason then the ESP will remain in the 'flash down load mode.
Holger Lembke
@holgerlembke
@bobcroft, yes, thats it. after flashing and with open monitor both lines (reset & dtr) are low. so after reset we end in uart flash mode again.
boils down to the fact that above schematic is kaputt.
oh, and I see spikes on my DTR line around every second or so.
sticilface
@sticilface
Question for boffins... I'm trying to write a method of communication between arduinos and ESP8266 using pjon. I was using arduinojson as the packet structure, but this is very inefficient... I want to create a struct, send it byte by byte, then memcpy it into the struct declared at the other end. This works great... for arduino to arduino... but the problem is that types are different sizes on ESP8266... (not quite figured out which ones yet) but it makes this not so straight forward. Does anyone have any bright ideas.. easy solutions... or examples that are out there... before i struggle and spend lots of time trying to work one out! any help appreciated...
Me No Dev
@me-no-dev
uint8_t is uint8_t everywhere. Same goes for uint16_t and uint32_t
Keith Andrew Hill
@vic10us
Whatever you do, just make sure that your structs are using primitive types that are supported directly by the processor architecture of both systems.
Me No Dev
@me-no-dev
int is not the same
sticilface
@sticilface
ok... that might be where the issue is..
Me No Dev
@me-no-dev
word, size_t, things like that are platform dependent
sticilface
@sticilface
i guess enum is too
Keith Andrew Hill
@vic10us
uint_8 or uint_16 bit etc
sticilface
@sticilface
float?
Keith Andrew Hill
@vic10us
Floats are dangerous.