esp-idf-template-master sample program not working
esp-idf-template-master sample program not working
I've just started trying out some ESP-WROOM-32 modules built into the ESP32 devkit v1 board from www.doit.am
After a bit of messing around, I have got the esp-idf to work with various of the examples which come with the kit, but as soon as i try to use any wifi functions, weird things happen.
Specifically, when I try out the esp-idf-template master sample program, I can flash it OK, and it starts up fine, but as soon as the esp_wifi_start() is called, the serial output stops (half way through the next message ), and although the led then starts flashing, nothing else works.
I am using the esp_idf git repository as of yesterday ( 12th June ) and running on Windows 10 under the recommended MSYS environment, but I have also tried this out on an ubuntu box, with similar results.
I have bought two of these modules, and they both behave the same, so i don't think it's a hardware issue per se.
Any suggestions from anyone
Thanks,
Gary
After a bit of messing around, I have got the esp-idf to work with various of the examples which come with the kit, but as soon as i try to use any wifi functions, weird things happen.
Specifically, when I try out the esp-idf-template master sample program, I can flash it OK, and it starts up fine, but as soon as the esp_wifi_start() is called, the serial output stops (half way through the next message ), and although the led then starts flashing, nothing else works.
I am using the esp_idf git repository as of yesterday ( 12th June ) and running on Windows 10 under the recommended MSYS environment, but I have also tried this out on an ubuntu box, with similar results.
I have bought two of these modules, and they both behave the same, so i don't think it's a hardware issue per se.
Any suggestions from anyone
Thanks,
Gary
Re: esp-idf-template-master sample program not working
Could you post your serial log?
Maybe start by putting default log level to debug in make menuconfig.
Maybe start by putting default log level to debug in make menuconfig.
Re: esp-idf-template-master sample program not working
This is what comes out on a terminal when I run the unchanged program.
D (2468) nvs: nvs_open misc 1[0m
D (2468) nvs: nvs_get_str_or_blob log[0m
I (2471) wifi: wifi firmware version: 9bf11be
I (2475) wifi: config NVS flash: enabled
I (2479) wifi: config nano formating: disabled
[0;32mI (2483) system_api: Base MAC address is not set, read default base MAC a
ddress from BLK0 of EFUSE[0m
[0;32mI (2493) system_api: Base MAC address is not set, read default base MAC a
ddress from BLK0 of EFUSE[0m
D (2502) nvs: nvs_open nvs.net80211 1[0m
D (2506) nvs: nvs_get opmode 1[0m
D (2509) nvs: nvs_get country 1[0m
D (2513) nvs: nvs_get_str_or_blob sta.ssid[0m
D (2517) nvs: nvs_get_str_or_blob sta.mac[0m
D (2521) nvs: nvs_get sta.authmode 1[0m
D (2524) nvs: nvs_get_str_or_blob sta.pswd[0m
D (2529) nvs: nvs_get_str_or_blob sta.pmk[0m
D (2533) nvs: nvs_get sta.chan 1[0m
D (2536) nvs: nvs_get auto.conn 1[0m
D (2539) nvs: nvs_get bssid.set 1[0m
D (2543) nvs: nvs_get_str_or_blob sta.bssid[0m
D (2547) nvs: nvs_get sta.phym 1[0m
D (2550) nvs: nvs_get sta.phybw 1[0m
D (2554) nvs: nvs_get_str_or_blob sta.apsw[0m
D (2558) nvs: nvs_get_str_or_blob sta.apinfo[0m
D (2562) nvs: nvs_get_str_or_blob ap.ssid[0m
D (2566) nvs: nvs_get_str_or_blob ap.mac[0m
D (2570) nvs: nvs_get_str_or_blob ap.passwd[0m
D (2575) nvs: nvs_get_str_or_blob ap.pmk[0m
D (2579) nvs: nvs_get ap.chan 1[0m
D (2582) nvs: nvs_get ap.authmode 1[0m
D (2585) nvs: nvs_get ap.hidden 1[0m
D (2589) nvs: nvs_get ap.max.conn 1[0m
D (2592) nvs: nvs_get bcn.interval 2[0m
D (2596) nvs: nvs_get ap.phym 1[0m
D (2599) nvs: nvs_get ap.phybw 1[0m
D (2602) nvs: nvs_get ap.sndchan 1[0m
D (2606) nvs: nvs_set_blob sta.mac 6[0m
D (2610) nvs: nvs_set_blob ap.mac 6[0m
I (2614) wifi: Init dynamic tx buffer num: 32
I (2617) wifi: Init dynamic rx buffer num: 32
I (2621) wifi: wifi driver task: 3ffbbe40, prio:23, stack:4096
I (2627) wifi: Init static rx buffer num: 10
I (2631) wifi: Init dynamic rx buffer num: 32
I (2635) wifi: Init rx ampdu len mblock:7
I (2639) wifi: Init lldesc rx ampdu entry mblock:4
I (2643) wifi: wifi power manager task: 0x3ffc1218 prio: 21 stack: 2560
I (2650) wifi: wifi timer task: 3ffc22a8, prio:22, stack:3584
D (2655) phy_init: loading PHY init data from application binary[0m
D (2661) nvs: nvs_open phy 0[0m
D (2664) nvs: nvs_get cal_version 4[0m
D (2668) nvs: nvs_get_str_or_blob cal_mac[
At this point the terminal stops. Obviously I'm not even getting to the point at which it might try to connect using credentials, which I would expect to fail since I haven't changed them in the program. ( I did try to use valid ones, but it made no difference as I expected )
Any ideas?
Thanks,
Gary
D (2468) nvs: nvs_open misc 1[0m
D (2468) nvs: nvs_get_str_or_blob log[0m
I (2471) wifi: wifi firmware version: 9bf11be
I (2475) wifi: config NVS flash: enabled
I (2479) wifi: config nano formating: disabled
[0;32mI (2483) system_api: Base MAC address is not set, read default base MAC a
ddress from BLK0 of EFUSE[0m
[0;32mI (2493) system_api: Base MAC address is not set, read default base MAC a
ddress from BLK0 of EFUSE[0m
D (2502) nvs: nvs_open nvs.net80211 1[0m
D (2506) nvs: nvs_get opmode 1[0m
D (2509) nvs: nvs_get country 1[0m
D (2513) nvs: nvs_get_str_or_blob sta.ssid[0m
D (2517) nvs: nvs_get_str_or_blob sta.mac[0m
D (2521) nvs: nvs_get sta.authmode 1[0m
D (2524) nvs: nvs_get_str_or_blob sta.pswd[0m
D (2529) nvs: nvs_get_str_or_blob sta.pmk[0m
D (2533) nvs: nvs_get sta.chan 1[0m
D (2536) nvs: nvs_get auto.conn 1[0m
D (2539) nvs: nvs_get bssid.set 1[0m
D (2543) nvs: nvs_get_str_or_blob sta.bssid[0m
D (2547) nvs: nvs_get sta.phym 1[0m
D (2550) nvs: nvs_get sta.phybw 1[0m
D (2554) nvs: nvs_get_str_or_blob sta.apsw[0m
D (2558) nvs: nvs_get_str_or_blob sta.apinfo[0m
D (2562) nvs: nvs_get_str_or_blob ap.ssid[0m
D (2566) nvs: nvs_get_str_or_blob ap.mac[0m
D (2570) nvs: nvs_get_str_or_blob ap.passwd[0m
D (2575) nvs: nvs_get_str_or_blob ap.pmk[0m
D (2579) nvs: nvs_get ap.chan 1[0m
D (2582) nvs: nvs_get ap.authmode 1[0m
D (2585) nvs: nvs_get ap.hidden 1[0m
D (2589) nvs: nvs_get ap.max.conn 1[0m
D (2592) nvs: nvs_get bcn.interval 2[0m
D (2596) nvs: nvs_get ap.phym 1[0m
D (2599) nvs: nvs_get ap.phybw 1[0m
D (2602) nvs: nvs_get ap.sndchan 1[0m
D (2606) nvs: nvs_set_blob sta.mac 6[0m
D (2610) nvs: nvs_set_blob ap.mac 6[0m
I (2614) wifi: Init dynamic tx buffer num: 32
I (2617) wifi: Init dynamic rx buffer num: 32
I (2621) wifi: wifi driver task: 3ffbbe40, prio:23, stack:4096
I (2627) wifi: Init static rx buffer num: 10
I (2631) wifi: Init dynamic rx buffer num: 32
I (2635) wifi: Init rx ampdu len mblock:7
I (2639) wifi: Init lldesc rx ampdu entry mblock:4
I (2643) wifi: wifi power manager task: 0x3ffc1218 prio: 21 stack: 2560
I (2650) wifi: wifi timer task: 3ffc22a8, prio:22, stack:3584
D (2655) phy_init: loading PHY init data from application binary[0m
D (2661) nvs: nvs_open phy 0[0m
D (2664) nvs: nvs_get cal_version 4[0m
D (2668) nvs: nvs_get_str_or_blob cal_mac[
At this point the terminal stops. Obviously I'm not even getting to the point at which it might try to connect using credentials, which I would expect to fail since I haven't changed them in the program. ( I did try to use valid ones, but it made no difference as I expected )
Any ideas?
Thanks,
Gary
Re: esp-idf-template-master sample program not working
For the sake of an idea to try, consider running:
make erase_flash
and then try re-flashing. This command will erase (reset) all flash memory. It is just possible that some previous application you had installed "confused" the environment.
make erase_flash
and then try re-flashing. This command will erase (reset) all flash memory. It is just possible that some previous application you had installed "confused" the environment.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: esp-idf-template-master sample program not working
Thanks for the suggestion - tried it but no difference at all
I've now added in some statements to flash the onboard LED on gpio 2 in a pattern to provide feedback.
What's weird is that although the serial port dies on me, and there's no wifi connection, the chip itself continues to run (at least the main thread ) because a pattern of on-off flashes I initiate after all the wifi calls indicates that the calls themselves returned, and returned with no error code. ( Which is definitely not right, as the SSID and password are deliberately wrong at this point ).
So, to summarize,
As soon as I try to initialize wifi, the serial uart goes haywire, the wifi fails to initialize, the call returns 0, and the chip continues to execute the program as best as it can.
I'm wondering if the latest version of the closed-source libraries has a bug in the wifi code which others with older versions haven't hit
Gary
I've now added in some statements to flash the onboard LED on gpio 2 in a pattern to provide feedback.
What's weird is that although the serial port dies on me, and there's no wifi connection, the chip itself continues to run (at least the main thread ) because a pattern of on-off flashes I initiate after all the wifi calls indicates that the calls themselves returned, and returned with no error code. ( Which is definitely not right, as the SSID and password are deliberately wrong at this point ).
So, to summarize,
As soon as I try to initialize wifi, the serial uart goes haywire, the wifi fails to initialize, the call returns 0, and the chip continues to execute the program as best as it can.
I'm wondering if the latest version of the closed-source libraries has a bug in the wifi code which others with older versions haven't hit
Gary
Re: esp-idf-template-master sample program not working
Maybe provide a description of how you built your environment? I use Ubuntu on mine. Lets look and see if there is something odd in the compiler chain you are using, the version of ESP-IDF or something else. Maybe someone can compile your program for you to build the images and you can test with a compiled binary that built on a verified environment?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: esp-idf-template-master sample program not working
Thanks for the suggestion.
I have built an environment from scratch on Ubuntu 14 LTS and tried the sample there. When I flash that sample, I get exactly the same behaviour.
If there's a known working version of the bin files I could try to flash, that might be the most effective next step. Alternatively, if there's a known older version of the environment which I could revert to and try, that might at least eliminate the possibility that some recent change is the cause of the problem.
Gary
I have built an environment from scratch on Ubuntu 14 LTS and tried the sample there. When I flash that sample, I get exactly the same behaviour.
If there's a known working version of the bin files I could try to flash, that might be the most effective next step. Alternatively, if there's a known older version of the environment which I could revert to and try, that might at least eliminate the possibility that some recent change is the cause of the problem.
Gary
Re: esp-idf-template-master sample program not working
It's all gone a bit quiet here, and I'm still having no joy getting the ESP32 modules to work as soon as I start up wifi it just stops behaving itself.
If someone does have a working .bin file I can try, I'd be very grateful, cos otherwise I'm out of ideas.
Thanks in advance
Gary
If someone does have a working .bin file I can try, I'd be very grateful, cos otherwise I'm out of ideas.
Thanks in advance
Gary
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: esp-idf-template-master sample program not working
What devboard and power supply are you using? Weird stuff happening around the time WiFi starts up usually indicates an inadequate power supply.
Re: esp-idf-template-master sample program not working
He said this one https://world.taobao.com/item/542459608596.htm That LDO may have reasonably high threshold voltage and some USB ports could have low voltage. Or bad cable.ESP_Sprite wrote:What devboard and power supply are you using? Weird stuff happening around the time WiFi starts up usually indicates an inadequate power supply.
Who is online
Users browsing this forum: No registered users and 17 guests