-
Notifications
You must be signed in to change notification settings - Fork 833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIFI AP not initialising correctly #452
Comments
Did you put any delays in the sketch?
Also , is the power supply beefy enough for the esp?
…On Mon 7 May, 2018, 4:26 PM DiggiD, ***@***.***> wrote:
Hi,
Trying to implement the MQTTServer example sketch (as is) on an ESP8266.
im using library version 2.4 and the latest arduino IDE to compile and
flash.
but i cant seem to get it connected...
the serial monitor spits out the following on a 10-15s repeat:
`
ets Jan 8 2013,rst cause:2, boot mode:(3,4)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 1
Exception (29):
epc1=0x4000e1c3 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000018
depc=0x00000000
ctx: cont
sp: 3fff2c20 end: 3fff3080 offset: 01a0
stack>>>
3fff2dc0: 00000000 3fff48fc 4024c6c0 401004d8
3fff2dd0: 40226bca 00000000 40240000 40106bd8
3fff2de0: 402397dd 00000017 60000200 40239802
3fff2df0: 054d15ec 40221e0b 3fff48fc 3fff449c
3fff2e00: 40226ea2 3fff48fc 3fff449c 00000000
3fff2e10: 0000000a 3fff02c0 3fff023c 3fff04ac
3fff2e20: 00000000 40239e9b 3fff023c 3fff449c
3fff2e30: 00000018 3fff1cfc 3fff3fe4 3fff1cfc
3fff2e40: 4024c708 00000064 3fff2e78 402224f5
3fff2e50: 3fff023c 3fff449c 3fff1cfc 00000000
3fff2e60: 00000064 402224dc 3fff449c 3fff1cfc
3fff2e70: 0fe83a2e 0000ce2a 00000000 00000000
3fff2e80: 00000000 00000000 00000000 00000000
3fff2e90: 00000000 00000000 00000000 00000000
3fff2ea0: 00000000 00000000 00000000 40223853
3fff2eb0: 3fff449c 3fff3fe4 3fff3fe4 402238a0
3fff2ec0: 00000000 3fff02c0 3fff10b8 00000000
3fff2ed0: 4023fbc5 00000003 00000003 3fff3fe4
3fff2ee0: 4023fd23 00000003 00000003 4023fcd7
3fff2ef0: 3fff1f8c 00000001 00000001 3fff3ffc
3fff2f00: 4023fde6 00000003 3fff3fe4 00000001
3fff2f10: 402043d5 00000000 00000000 4020f0b3
3fff2f20: 3ffe8b6b 00000000 3fff1b14 40209ed7
3fff2f30: 3fff1f64 00000142 00000142 4010020c
3fff2f40: 00000001 3fff3fe4 3fff2f7c 40100690
3fff2f50: 3ffe8b6b 4024b994 3fff1f8c 00000000
3fff2f60: 00000001 3fff3fe4 3fff1b14 4020a05d
3fff2f70: 00000000 00000000 00000000 00000000
3fff2f80: 00000000 00000000 3fff2fb0 40100690
3fff2f90: 3fffdad0 00000000 3fff1b14 3fff204c
3fff2fa0: 3fffdad0 00000000 3fff1b14 4020a0b4
3fff2fb0: 00000000 00000000 00000000 00000000
3fff2fc0: 00000000 00000000 3fff3fe4 0000000f
3fff2fd0: 00000009 0000000a 0000000a 4020136f
3fff2fe0: feefeffe 00000000 3fff1b14 40202f68
3fff2ff0: 3fffdad0 00000001 3fff1f8c 4020e494
3fff3000: 0001c200 0000001c 00000000 4020bac8
3fff3010: feefeffe 00000000 3fff2044 40203031
3fff3020: feefeffe feefeffe feefeffe feefeffe
3fff3030: feefeffe feefeffe feefeffe feefeffe
3fff3040: feefeffe feefeffe feefeffe feefeffe
3fff3050: feefeffe feefeffe feefeffe 3fff204c
3fff3060: 3fffdad0 00000000 3fff2044 4020fbd0
3fff3070: feefeffe feefeffe 3fff2060 40100710
<<<stack<<<
`
thanks for your help
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#452>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AKvJrnupvozn1F4TDngVDGSiHFp20gGHks5twChIgaJpZM4T0x-l>
.
|
hi darksh, i have an 1 amp PSU driving the ESP8266 |
This seems to indicate it worked at least once to configure the WiFi settings. If you didn't, then it might be reading from previous values. If that's the case, you may need to completely erase the flash of the ESP8266 to clear those values. Also, what version of the library are you using? Exactly what version of the Arduno IDE? and what platform? (win10/x86 linux/etc?) What chip/module are you using? (nodemcuV1/Wemos Mini D1/etc) |
Also, what version of the ESP8266 board library are you using? i.e. Look in the Board Manager. |
@crankyoldgit im using version 2.4 of the IRremoteESP8266 / Arduino IDE v1.8 / MacOS / ESP8266-01 |
ESP8266 Board v2.4 as well |
I haven't tested it on an ESP-01 but in theory it should work, if you disable all the serial output etc. But the sending GPIO probably won't work without on a ESP-01 board, you'll need to change it and you'll need to invert the signal if you want to drive an IR-LED off it. I really recommend a Nodemcu or Wemos board instead. See also: #7 (comment) |
hmmm... i did read that before i began this project. |
i tried using a new board and that worked..
|
Another ESP-01 board, or a nodemcu/wemos board? Just a long shot, have you double checked the mqtt settings? (Or tried it without the MQTT enabled? e.g. Uncomment: |
another ESP-01 im committed to this board unfortunately- ive got waaay too many- planning on giving them away to friends as working IR blasters :) ill try with MQTT disabled-- thanks! |
Let me know how you go with MQTT disabled. Your serial output seems to have it dying just before the mDNS stuff which is before MQTT etc. I'd have expected more debug statements before it crashed etc. The code it may have died in is pretty boiler-plate. I'd suggest adding more debug (serial.Print) statements to see if you can identify where it is dying. That said. It works fine for me (and others) on Nodemcu and Wemos boards. I use it every day to control my TV, aircon & stereo etc. |
disabling MQTT didnt change anything-- ive got exactly the same errors. trying to debug, tho-
gives me errors
also, is there an easier way of cleaning the flash thru the sketch itself? |
Yes there is. However as the code is set up, you need to call it from the web interface, which you are not getting too. Hence why I linked this earlier: https://github.com/espressif/esptool#erase-flash-erase_flash--erase-region
As for debug, there is a routine builtin. See: https://github.com/markszabo/IRremoteESP8266/blob/master/examples/IRMQTTServer/IRMQTTServer.ino#L184 e.g.
|
Just checking, what version of the WifiManager library have you got installed? Also, just did a search on "WifiManager ESP-01" and got this: It may not work on ESP-01's as is. |
Yeah. That seems to explain it a bit. You should see a line on the serial console like "WiFi connected. IP address: 192.168.XX.YY" from this line Your logs indicate you didn't, so I think the problem is in/with WifiManager.. Try changing I got the idea from that issue & https://github.com/tzapu/WiFiManager/blob/master/examples/OnDemandConfigPortal/OnDemandConfigPortal.ino |
Also tzapu/WiFiManager#537 indicates that the issue could be with WifiManager AND mDNS. Things to try: remove the mdns stuff, and/or upgrade the esp8266 arduino core board library to 2.4.1 (as per comments in that issue) |
And more digging:
That I'm guessing the SSID and/or password selected/provided doesn't work or there is some other "wifi" problem. |
ok..
but atleast we know its definitely a wifi thing now.
the |
yeah really wierd... once its "connected" with the above WL result = 3, it spits out all those exceptions. BUT, im able to connect to it on my local network-- unfortunately it shows me the WifiConfig portal only. |
Weird. Failing all that, it might just pay to setup wifi manually the old fashioned way instead of using WifiManager. E.g. Similar to how it is done in https://github.com/markszabo/IRremoteESP8266/blob/master/examples/IRServer/IRServer.ino |
tried switching back to your original statement
gives me the following
|
The fact you are not seeing that debug line I'm listing indicates to me that it is still dying in the WifiManager library/code. Perhaps trying reverting the board manager component back to 2.3.x for the esp8266 core. Or .. try configuring the wifi manually. :-/ |
yeah i think ill approach the manual method first.. cheers @crankyoldgit :] |
I've tried compiling it under platformio on my linux machine for the ESP01 board (assumed 512k version). You can try out the firmware binary and see if that uploads/works for you. No promises etc. |
Success!! also, after much trial and error- took out most of it and added it back function by function-
commenting the local IP call in the debug statement avoids the exception errors altogether.. 👍
I haven't poked around that debug function to find the issue, i'm going to stick with the bypass for the time being.
Woot! onwards... |
That's totally weird that it works on wemos etc, and not on the ESP-01. Could be a difference in compilers between platformio and the arduino IDE. Can you please try the following on your ESP01 and see if it still causes it to berk?:
Also, did you try the firmware I uploaded? |
|
Yay! As for uploading the firmware, as you've now got the IRMQTTServer loaded on the device, you can just upload the firmware I supplied via the web/http interface on the ESP8266. i.e. Very bottom of the main page on the website running on the device. Again, I'm really interested in the result as it may be a difference from my test/build environment of platformio vs. the typical user's Arduino IDE one. P.S. I needed to upload a lot when developing it, and I didn't want to continually physically have to unplug things as I use the device in my house constantly. ;-) |
sorry for the delay @crankyoldgit i uploaded your firmware and it worked flawlessly. |
No. That was the unmodified code. i.e. before adding the Anyway, we've modified the code to work around the Arduino IDE issue, and as most folk will use that, it's probably for the best. So, thanks VERY much for testing it and allowing me to confirm at least part of the root cause. Go forth, and make your ESP-01 modules useful! P.S. We don't have an "official" circuit for sending (or receiving) on the ESP-01, so if you care to document what you end up with, please consider letting us know/pointing us to it so we can add it to our docs. We still get a fair few requests on how to use the ol' ESP-01 boards. |
thank you, for your prompt and awesome support! my circuit is quite simple, similar to many IR blasters online. VCC=3.3v Sender: |
thank you! we may have to re-open this. noticed abnormal startup issue.. using your platformIO firmware/ or standard IRMQTTserver/arduinoIDE compile- should i start a new issue? |
I'm not sure I understand what you are saying. i.e. what the problem is. That sounds like how I would expect it to be. If it doesn't have a previous setup (that the firmware recognizes/is in the same spot etc) then it does the whole wifi setup process. Then reboots, which then uses the "new" config and no-longer asks the config etc. Or am I missing something? |
oops never mind.. my mistake! i kept this statement in it was causing the config portal to be shown on every restart. |
@crankyoldgit ummm ive noticed another small bug... using tested and retested this for a whole day with different firmwares.. including the platformio one you sent me. |
The TL;DR: is you can't transmit serial and use the same GPIO to send IR with. The firmware I provided/uploaded will be using pin 4 (See https://github.com/markszabo/IRremoteESP8266/blob/master/examples/IRMQTTServer/IRMQTTServer.ino#L133) so it won't transmit with an IR led on Pin 3. If I understand it correctly, Pin 3 on the ESP-01 is the Serial TX on the ESP8266. Thus, sending serial output is going to cause issues. Either disable it completely (e.g. turn off DEBUG) then you should be able to use Pin 3 fine. As we describe in the FAQs, the ESP-01 is tricky. Your options are limited. I recommend you use the ESP8266 RX pin (which I think is Pin 2 on the ESP-01 a.k.a. GPIO1). It should be fine to use as long as nothing serial is SENT to the ESP-01. You'll need to change this line |
@DiggiD Any chance you could provide a Fritzing diagram with the IR led part of the circuit connected to Pin 2 (GPIO1) ... assuming the above works. Thanks in advance. |
FYI the code fix earlier is now included in the latest release (2.4.1) |
i believe, |
Yes, ignore my complete lack-of ESP-01 expertise. ;-) Basically, I think you should be using the RX pin on the ESP side, and only when If I'm reading it right, RX == GPIO3 == Pin 7 (according to https://circuits4you.com/wp-content/uploads/2016/12/ESP-01-Pin-Out.png) Which I think you are using in your diagram. D'oh! |
G'ah. Not my day. |
hehe all good. i am using the rx pin in the diagram (gpio3) |
Yes, and if that doesn't work, set |
P.S. Let me know how it goes, and I'll add it to the example code if it works. |
checked! |
Hi,
Trying to implement the MQTTServer example sketch (as is) on an ESP8266.
im using library version 2.4 and the latest arduino IDE to compile and flash.
but i cant seem to get it connected...
the serial monitor spits out the following on a 10-15s repeat:
The text was updated successfully, but these errors were encountered: