Skip to content
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-Config example installation issue #5

Closed
bmeck opened this issue Dec 2, 2017 · 10 comments
Closed

Wifi-Config example installation issue #5

bmeck opened this issue Dec 2, 2017 · 10 comments

Comments

@bmeck
Copy link
Contributor

bmeck commented Dec 2, 2017

I have tried a few examples and have noticed that some things occur when trying to run wifi-config using mcconfig -d -m -p esp from my MacBook Pro 2015.

  1. warning: serialport_set_baudrate: baud rate 921600 may not work appears consistently

  2. install modules failure shows up after sync hitting 100% sometimes

    I am presuming this relates to serialport_set_baudrate

  3. An exception seems to always occur due to some timer, that shows up even without the module failure.

Exception (28):
epc1=0x4022dced epc2=0x00000000 epc3=0x00000000 excvaddr=0x01610029 depc=0x00000000
ctx: cont
sp: 3ffe97a0 end: 3ffe9a70 offset: 01a0
>>>stack>>>
3ffe9940:  3fff839c 0160ffff fffffffe 4022dce7
3ffe9950:  4022dcb4 3ffe9950 00000000 3ffefe04
3ffe9960:  fffffffe 3ffe9a9c 3ffe9984 3fff836c
3ffe9970:  3fff838c 3fff839c 00000000 00000000
3ffe9980:  00000000 4022dc6e 3ffe9950 3ffeffd4
3ffe9990:  3ffefe04 fffffffe 3ffe9a9c 00000000
3ffe99a0:  3fff83fc 00000000 00000000 00000000
3ffe99b0:  00000000 00000000 00000000 00000000
3ffe99c0:  3fff8514 3fff8514 3ffefff4 3ffefcec
3ffe99d0:  3fff8514 3ffeff14 3ffefefc 3ffe9a9c
3ffe99e0:  fffffffe 3ffefe04 3ffeffd4 4022b614
3ffe99f0:  3fffdad0 00000000 3ffe9a94 402517a8
3ffe9a00:  00000000 00000020 00000035 00000003
3ffe9a10:  3fff8514 4025d01c 00000021 3fff839c
3ffe9a20:  3fff835c 00000000 00000000 4025cb40
3ffe9a30:  feefeffe feefeffe feefeffe 3ffe9a9c
3ffe9a40:  00000000 00000000 00000001 402514a1
3ffe9a50:  3fffdad0 00000000 3ffe9a94 402514cc
3ffe9a60:  feefeffe feefeffe 3ffe8a50 4010011c
<<<stack<<<

# EXCEPTION DESCRIPTION
# Exception 28 LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads

# EXCEPTION LOCATION
# 0x4022dced: reportScan at /Users/bfarias/Documents/moddable/modules/network/wifi/esp/modwifi.c:188

# CALLS
# 0x4022dce7: reportScan at /Users/bfarias/Documents/moddable/modules/network/wifi/esp/modwifi.c:188
# 0x4022dcb4: reportScan at /Users/bfarias/Documents/moddable/modules/network/wifi/esp/modwifi.c:184
# 0x4022dc6e: reportScan at /Users/bfarias/Documents/moddable/modules/network/wifi/esp/modwifi.c:178
# 0x4022b614: modTimersExecute at /Users/bfarias/Documents/moddable/modules/base/timer/mc/timer.c:111
# 0x402517a8: loop at /Users/bfarias/Documents/moddable//build/devices/esp/main.cpp:85
# 0x402514a1: esp_schedule at /Users/bfarias/esp/esp8266-2.3.0/cores/esp8266/core_esp8266_main.cpp:110
# 0x402514cc: loop_wrapper() at /Users/bfarias/esp/esp8266-2.3.0/cores/esp8266/core_esp8266_main.cpp:110
# 0x4010011c: cont_norm at /Users/bfarias/esp/esp8266-2.3.0/cores/esp8266/cont.S:109

^[[A^CCaught signal 2
make: *** [debugmac] Error 1
  1. It fails to load once fully synced and prints /Users/bfarias/Documents/moddable/modules/piu/MC/piuFont.c (247) # Break: (host): font not found: OpenSans--20! in xsbug.

    This one seems a bit odd, since my build directory doesn't have that string/file name anywhere, but it does have some other OpenSans strings:

    grep log
    $ grep -r "OpenSans" /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config/
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//main.elf matches
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	$(RESOURCES_DIR)/OpenSans-Regular-20.fnt\
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	$(RESOURCES_DIR)/OpenSans-Semibold-18.fnt\
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	$(RESOURCES_DIR)/OpenSans-Semibold-16.fnt\
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	$(RESOURCES_DIR)/OpenSans-Regular-20-alpha.bmp\
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	$(RESOURCES_DIR)/OpenSans-Semibold-18-alpha.bmp\
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	$(RESOURCES_DIR)/OpenSans-Semibold-16-alpha.bmp\
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:$(RESOURCES_DIR)/OpenSans-Regular-20.fnt: /Users/bfarias/Documents/moddable/examples/piu/wifi-config/fonts/OpenSans-Regular-20.fnt
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	@echo "# copy OpenSans-Regular-20.fnt"
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:$(RESOURCES_DIR)/OpenSans-Semibold-18.fnt: /Users/bfarias/Documents/moddable/examples/piu/wifi-config/fonts/OpenSans-Semibold-18.fnt
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	@echo "# copy OpenSans-Semibold-18.fnt"
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:$(RESOURCES_DIR)/OpenSans-Semibold-16.fnt: /Users/bfarias/Documents/moddable/examples/piu/wifi-config/fonts/OpenSans-Semibold-16.fnt
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	@echo "# copy OpenSans-Semibold-16.fnt"
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:$(RESOURCES_DIR)/OpenSans-Regular-20-alpha.bmp: /Users/bfarias/Documents/moddable/examples/piu/wifi-config/fonts/OpenSans-Regular-20.png $(TMP_DIR)/mc.rotation.h
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	@echo "# png2bmp OpenSans-Regular-20-alpha.bmp"
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	$(PNG2BMP) /Users/bfarias/Documents/moddable/examples/piu/wifi-config/fonts/OpenSans-Regular-20.png -a -o $(@D) -r 0
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:$(RESOURCES_DIR)/OpenSans-Semibold-18-alpha.bmp: /Users/bfarias/Documents/moddable/examples/piu/wifi-config/fonts/OpenSans-Semibold-18.png $(TMP_DIR)/mc.rotation.h
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	@echo "# png2bmp OpenSans-Semibold-18-alpha.bmp"
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	$(PNG2BMP) /Users/bfarias/Documents/moddable/examples/piu/wifi-config/fonts/OpenSans-Semibold-18.png -a -o $(@D) -r 0
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:$(RESOURCES_DIR)/OpenSans-Semibold-16-alpha.bmp: /Users/bfarias/Documents/moddable/examples/piu/wifi-config/fonts/OpenSans-Semibold-16.png $(TMP_DIR)/mc.rotation.h
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	@echo "# png2bmp OpenSans-Semibold-16-alpha.bmp"
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//makefile:	$(PNG2BMP) /Users/bfarias/Documents/moddable/examples/piu/wifi-config/fonts/OpenSans-Semibold-16.png -a -o $(@D) -r 0
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.resources.c:	{"OpenSans-Regular-20.fnt", _0, sizeof(_0)},
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.resources.c:	{"OpenSans-Semibold-18.fnt", _1, sizeof(_1)},
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.resources.c:	{"OpenSans-Semibold-16.fnt", _2, sizeof(_2)},
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.resources.c:	{"OpenSans-Regular-20-alpha.bmp", _7, sizeof(_7)},
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.resources.c:	{"OpenSans-Semibold-18-alpha.bmp", _8, sizeof(_8)},
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.resources.c:	{"OpenSans-Semibold-16-alpha.bmp", _9, sizeof(_9)},
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.resources.c.o matches
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.resources.c.o.unmapped matches
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.xs.c:/* 0706 */	{ (txSlot*)&gxHeap[604], -32071, 0x84, XS_KEY_X_KIND, { .key = { "OpenSans20", 0x17240 } }},
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.xs.c:/* 0707 */	{ (txSlot*)&gxHeap[580], -32070, 0x84, XS_KEY_X_KIND, { .key = { "OpenSans18", 0x17246 } }},
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.xs.c:/* 0736 */	{ (txSlot*)&gxHeap[726], -32041, 0x84, XS_KEY_X_KIND, { .key = { "OpenSans16", 0x17244 } }},
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.xs.c.o matches
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.xs.c.o.unmapped matches
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.xs.h:#define xsID_OpenSans20 -32071
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.xs.h:#define xsID_OpenSans18 -32070
    /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//mc.xs.h:#define xsID_OpenSans16 -32041
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//modules/assets.xsb matches
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//modules/connection-error.xsb matches
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//modules/login.xsb matches
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//modules/mc.xsi matches
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//modules/network-list.xsb matches
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//resources/OpenSans-Regular-20.fnt matches
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//resources/OpenSans-Semibold-16.fnt matches
    Binary file /Users/bfarias/Documents/moddable/build/tmp/esp/debug/wifi-config//resources/OpenSans-Semibold-18.fnt matches
    
@phoddie
Copy link
Collaborator

phoddie commented Dec 3, 2017

  1. The serialport_set_baudrate warning comes from the esptool that downloads the binary. It considers higher baud rates on macOS unreliable. Switching to a lower baud rate suppresses the warning, at the cost of longer download times.

  2. The install modules failure warning is due to accidentally leaving SUPPORT_MODS enabled in esp/xsHost.c. A fix for that is committed.

  3. I wasn't able to reproduce the reportScan crash. In reading the code, it seems possible it could use uninitiated memory in an attempt to skip the first scan record (which was a bad workaround for a bug in an earlier version of the Espressif SDK). I've cleaned that up and it will be up later today.

  4. I wasn't able to reproduce the OpenSans--20 problem.

@wdimmit
Copy link
Contributor

wdimmit commented Dec 3, 2017

When running the keyboard example, I am seeing the OpenSans--20 failure as well.

@phoddie
Copy link
Collaborator

phoddie commented Dec 3, 2017

Thanks, Will. I can reproduce the problem with the piu/keyboard example. I fixed it by adding the following line in PiuStyleLookupFont at line 196:

 case 4: c_strcat(buffer, "Regular");break;

That change works on ESP and Mac. It works with the piu/wifi-config example too, but that worked for me before the change too.

I don't want to commit the change without having Patrick review it first.

@PeterJensen
Copy link

I got the reportScan error as reported by @bmeck, first time I ran it. Second time it worked. After playing around trying to enter a valid SSID I got the traceback again.

@phoddie
Copy link
Collaborator

phoddie commented Dec 5, 2017

This commit fixes the problem with piu/keyboard Will reported.

@rwaldron
Copy link
Contributor

rwaldron commented Dec 5, 2017

I hit the same issue, so I changed:

  • tools/mcconfig/make.esp.mk:
# serial port configuration
- UPLOAD_SPEED ?= 921600
+ UPLOAD_SPEED ?= 115200

And was able to successfully load programs to the ESP8266

@phoddie
Copy link
Collaborator

phoddie commented Dec 6, 2017

@rwaldron - I'm curious if what you encountered was the warning that 921600 may not work (which is annoying but not a failure) or an inability to flash at that speed. I work at 921600 with ESP8266. There are occasional failures to connect. but they are rare enough that the speed increase is worth it. Working at 115200 gets tedious pretty quickly - so you might try at least 230400 if you are having problems at the highest speed.

@rwaldron
Copy link
Contributor

rwaldron commented Dec 6, 2017

@phoddie the operation would stop completely without the change that I made above. I will try 230400 tomorrow and report back!

@bmeck
Copy link
Contributor Author

bmeck commented Dec 6, 2017

This seems to be fixed with the updated public branch

@bmeck bmeck closed this as completed Dec 6, 2017
@rwaldron
Copy link
Contributor

rwaldron commented Dec 6, 2017

the operation would stop completely without the change that I made above.

I've just now restored to 921600 and my attempt to flash was successful (despite the warning).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants