wifi problems between versions of chip [SOLVED not WIFI related disregard]

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
jcolo
Posts: 8
Joined: Tue Dec 15, 2020 11:50 am

wifi problems between versions of chip [SOLVED not WIFI related disregard]

Post by jcolo » Tue Dec 15, 2020 12:04 pm

**********************************************************************************************************
A try / except block was obscuring the real issue that was a pin connected to the wrong pin *
Not wifi related, I was confused. *
Please ignore *
***********************************************************************************************************


I have multiple boards running the same software. A simple logger of temp/humitiy etc.

My tests are done with a adafruit feather with chip ESP32D0WD. Other are ESP32DWQ6

I use micropython v1.3

I can manually activate wifi and run my program steps manually all works. However, when the scrips are run automatically, all but the adafruit fail. Its like there was a race condition with WIFI activations.

I leave below the traces. Please advice

WORKING

Code: Select all

>>> import machine
>>> machine.reset()
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5148
load:0x40078000,len:12880
load:0x40080400,len:3484
entry 0x40080630
I (539) cpu_start: Pro cpu up.
I (539) cpu_start: Application information:
I (539) cpu_start: Compile time:     Sep  2 2020 03:04:09
I (542) cpu_start: ELF file SHA256:  0000000000000000...
I (548) cpu_start: ESP-IDF:          v4.0.1
I (553) cpu_start: Starting app cpu, entry point is 0x40082830
I (545) cpu_start: App cpu up.
I (564) heap_init: Initializing. RAM available for dynamic allocation:
I (570) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (577) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (583) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (589) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (595) heap_init: At 3FFCAD78 len 00015288 (84 KiB): DRAM
I (601) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (607) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (614) heap_init: At 4009E9D8 len 00001628 (5 KiB): IRAM
I (620) cpu_start: Pro cpu start user code
I (638) spi_flash: detected chip: gd
I (639) spi_flash: flash io: dio
I (639) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (380) modsocket: Initializing
I (670) wifi:wifi driver task: 3ffd1f04, prio:23, stack:6656, core=0
I (1987) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1997) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (2027) wifi:wifi firmware version: aa5336b
I (2027) wifi:config NVS flash: enabled
I (2027) wifi:config nano formating: disabled
I (2027) wifi:Init dynamic tx buffer num: 32
I (2027) wifi:Init data frame dynamic rx buffer num: 32
I (2037) wifi:Init management frame dynamic rx buffer num: 32
I (2037) wifi:Init management short buffer num: 32
I (2047) wifi:Init static rx buffer size: 1600
I (2047) wifi:Init static rx buffer num: 10
I (2047) wifi:Init dynamic rx buffer num: 32
I (2157) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0
I (2157) wifi:mode : sta (30:ae:a4:28:a8:c4)
I (2167) wifi: STA_START
I (2647) wifi:new:<4,0>, old:<1,0>, ap:<255,255>, sta:<4,0>, prof:1
I (3497) wifi:state: init -> auth (b0)
I (3507) wifi:state: auth -> assoc (0)
I (3507) wifi:state: assoc -> run (10)
I (3527) wifi:connected with ASUS_Guest2, aid = 1, channel 4, BW20, bssid = ac:9e:17:97:1e:9a
I (3527) wifi:security: WPA2-PSK, phy: bgn, rssi: -60
I (3537) wifi:pm start, type: 1

I (3537) network: CONNECTED
I (3627) wifi:AP's beacon interval = 102400 us, DTIM period = 3
I (4547) tcpip_adapter: sta ip: 192.168.33.188, mask: 255.255.255.0, gw: 192.168.33.1
I (4547) network: GOT_IP
tiempo espera 2502
OK
print same firmware
I (5197) wifi:state: run -> init (0)
I (5197) wifi:pm stop, total sleep time: 996443 us / 1659372 us

I (5197) wifi:new:<4,0>, old:<4,0>, ap:<255,255>, sta:<4,0>, prof:1
I (5207) wifi: STA_DISCONNECTED, reason:8



NOT WORKING

Code: Select all

 >>> import machine
>>> machine.reset()
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5148
load:0x40078000,len:12880
load:0x40080400,len:3484
entry 0x40080630
I (539) cpu_start: Pro cpu up.
I (539) cpu_start: Application information:
I (539) cpu_start: Compile time:     Sep  2 2020 03:04:09
I (542) cpu_start: ELF file SHA256:  0000000000000000...
I (548) cpu_start: ESP-IDF:          v4.0.1
I (553) cpu_start: Starting app cpu, entry point is 0x40082830
I (545) cpu_start: App cpu up.
I (564) heap_init: Initializing. RAM available for dynamic allocation:
I (570) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (576) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (583) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (589) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (595) heap_init: At 3FFCAD78 len 00015288 (84 KiB): DRAM
I (601) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (607) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (614) heap_init: At 4009E9D8 len 00001628 (5 KiB): IRAM
I (620) cpu_start: Pro cpu start user code
I (638) spi_flash: detected chip: gd
I (639) spi_flash: flash io: dio
I (639) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (370) modsocket: Initializing
[Errno 110] ETIMEDOUT
118
Traceback (most recent call last):
  File "main.py", line 5, in <module>
  File "micro_termo/__init__.py", line 107, in termo
NameError: local variable referenced before assignment
MicroPython v1.13 on 2020-09-02; ESP32 module with ESP32
Type "help()" for more information.
This is the wifi starting log of one of the boards athta only work manually but not scripted. (wemos)

Code: Select all

 >>> import network
>>> wlan = network.WLAN(network.STA_IF)
I (27290) wifi:wifi driver task: 3ffd1e8c, prio:23, stack:6656, core=0
I (28384) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (28394) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (28594) wifi:wifi firmware version: aa5336b
I (28604) wifi:config NVS flash: enabled
I (28604) wifi:config nano formating: disabled
I (28604) wifi:Init dynamic tx buffer num: 32
I (28604) wifi:Init data frame dynamic rx buffer num: 32
I (28604) wifi:Init management frame dynamic rx buffer num: 32
I (28614) wifi:Init management short buffer num: 32
I (28624) wifi:Init static rx buffer size: 1600
I (28624) wifi:Init static rx buffer num: 10
I (28624) wifi:Init dynamic rx buffer num: 32
Software is identical in all cases. Deployment is automated and identical in all cases. I have tested with 8 boards only one works. Precise my regular test board. All production boards fail.

I am lost.

Any help appreciated.

JC

Post Reply