Shop OBEX P1 Docs P2 Docs Learn Events
Parallax-ESP Module Latest Hack - Page 5 — Parallax Forums

Parallax-ESP Module Latest Hack

1235711

Comments

  • David Betz wrote: »
    ...and there is no executable for Windows or the Mac either. Fixing that is beyond what I have time for now.

    I wonder how they compiled for win32... I use it (esptool-ck windows version) in my dos batch file I posted earlier in this thread.


    David Betz wrote: »
    It seems safer just to use esptool-ck since we have the sources for that and it just links with standard C libraries.

    Sounds good! I don't even know if esptool.py provides any REAL benefit over esptool-ck.

  • Clock Loop wrote: »
    David Betz wrote: »
    ...and there is no executable for Windows or the Mac either. Fixing that is beyond what I have time for now.

    I wonder how they compiled for win32... I use it (esptool-ck windows version) in my dos batch file I posted earlier in this thread.
    The Makefile has instructions for building it under Windows. I just don't have time to install the cross tools to do it. If someone else wants to try, I'd be happy to merge their changes.

  • David Betz wrote: »
    @"Clock Loop" I just pushed changes to build esptool-ck, add it to the release folder, and use it in the flash scripts. Please check to see if this works for you.


    YOU DID IT ALL!!!!! I didn't need to edit a single file.

    GIT to flash! Like a nice wrapped up gift presented on a silver platter, NICE JOB, Thank you.!
  • Now that the build problems are resolved, what is the status of the firmware itself. What problems have people noticed?
  • BTW, in case it isn't obvious, the Parallax-ESP build assumes a 2MB module. Even if the actual module is 4MB, only the first 2MB is used. This is because Parallax had some 2MB and some 4MB modules and I'm not sure if any of the 2MB modules made it into the field other than prototypes so we are being conservative.
  • David Betz wrote: »
    Now that the build problems are resolved, what is the status of the firmware itself. What problems have people noticed?

    I posted this earlier in this thread, but I will repost.
    Clock Loop wrote: »
    I have more bad news.
    When powering on any of my esp's (they all have the working firmware from the last working commit) and then connecting to them in ap mode.
    When I navigate to the Networks page the module will do a hard crash and restart.
    It will only do this when you first access the network page after it powers on, repeated accessing the page will not crash the module.

    Heres the debug pin output. From power on, you can see where it crashes.
    It has a E:M 2056 and a E:M 2096, I don't normally see those.
    This is the parallax WX esp8266 module.
    When it crashes, my webbrowser times out, my pc immediately reconnects(like it didn't even disconnect to the ap)
    And I then click the esp address bookmark again and then the network page, and it doesn't crash.
       Flash config restore ok
       108> Reset Pin: 13
       109> RX Pullup: 0
       115> DISCOVER: initialized
       115> Version v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)
       115> Using pin 13 for reset
       116> 2MB flash: base 00100000, size 1048576
       120> Flash filesystem mounted!
       124> Httpd init
       125>
       126> Ready
       127> mode : softAP(xx:xx:xx:xx:xx:xx)
       131> add if1
       133> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
       140> bcn 100
     47679> add 1
     47679> aid 1
     47679> station: xx:xx:xx:xx:xx:xx join, AID = 1
     80281> Conn req from  192.168.4.2:60624, using pool slot 0
     80283> URL = /
     80286> Pool slot 0 is done. Closing.
     80286> Pool slot 0: socket closed.
     80291> Conn req from  192.168.4.2:60626, using pool slot 0
     80292> URL = /index.html
     80295> Heatshrink compressed file; decode parms = b4
     80323> Pool slot 0 is done. Closing.
     80324> Pool slot 0: socket closed.
     80427> Conn req from  192.168.4.2:60628, using pool slot 0
     80428> URL = /style.css
     80428> Heatshrink compressed file; decode parms = b4
     80474> Pool slot 0 is done. Closing.
     80474> Pool slot 0: socket closed.
     80477> Conn req from  192.168.4.2:60630, using pool slot 0
     80478> URL = /logo.png
     80524> Pool slot 0 is done. Closing.
     80524> Pool slot 0: socket closed.
     80531> Conn req from  192.168.4.2:60632, using pool slot 0
     80532> URL = /wx/setting?name=module-name
     80532> GET args = name=module-name
     80534> GET 'module-name' --> 'PCB1'
     80539> Pool slot 0 is done. Closing.
     80542> Pool slot 0: socket closed.
     80546> Conn req from  192.168.4.2:60634, using pool slot 0
     80550> URL = /favicon.ico
     80552> Heatshrink compressed file; decode parms = b4
     80563> Conn req from  192.168.4.2:60636, using pool slot 1
     80564> URL = /wx/setting?name=version
     80565> GET args = name=version
     80568> GET 'version' --> 'v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)'
     80576> Pool slot 1 is done. Closing.
     80578> Pool slot 0 is done. Closing.
     80581> Pool slot 1: socket closed.
     80584> Pool slot 0: socket closed.
     82823> Conn req from  192.168.4.2:60640, using pool slot 0
     82824> URL = /wifi/wifi.html
     82825> Heatshrink compressed file; decode parms = b4
     82858> Conn req from  192.168.4.2:60642, using pool slot 1
     82859> URL = /wifi/style.css
     82860> Heatshrink compressed file; decode parms = b4home page
     82862> Conn req from  192.168.4.2:60644, using pool slot 2
     82867> E:M 2056
     82869> URL = /wifi/140medley.min.js
     82872> Heatshrink compressed file; decode parms = b4
     82877> E:M 2096
     82878> Fatal exception 29(StoreProhibitedCause):
     82883> epc1=0x4000df64, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
     ets Jan  8 2013,rst cause:1, boot mode:(3,0)
    
    load 0x40100000, len 2592, room 16
    tail 0
    chksum 0xf3
    load 0x3ffe8000, len 764, room 8
    tail 4
    chksum 0x92home page
    load 0x3ffe82fc, len 676, room 4
    tail 0
    chksum 0x22
    csum 0x22
    
    2nd boot version : 1.7(5d6f877)
    SPI Speed : 80MHz
    SPI Mode : QIO
    SPI Flash Size & Map: 16Mbit(512KB+512KB)
    jump to run user1 @ 1000
    
    
    
    
    
    Flash config restore ok
       112> Reset Pin: 13
       112> RX Pullup: 0
       118> DISCOVER: initialized
       118> Version v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)
       118> Using pin 13 for reset
       120> 2MB flash: base 00100000, size 1048576
       124> Flash filesystem mounted!
       127> Httpd init
       129>
       129> Ready
       131> mode : softAP(xx:xx:xx:xx:xx:xx)
       134> add if1
       136> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
       144> bcn 100
      5603> add 1
      5603> aid 1
      5603> station: xx:xx:xx:xx:xx:81 join, AID = 1
     10174> Conn req from  192.168.4.2:60646, using pool slot 0
     10176> URL = /wifi/140medley.min.js
     10177> Heatshrink compressed file; decode parms = b4
     10195> Pool slot 0 is done. Closing.
     10195> Pool slot 0: socket closed.
     10202> Conn req from  192.168.4.2:60648, using pool slot 0
     10203> URL = /wx/setting?name=wifi-ssid
     10203> GET args = name=wifi-ssid
     10206> GET 'wifi-ssid' --> ''
     10211> Pool slot 0 is done. Closing.
     10212> Pool slot 0: socket closed.
     14471> Conn req from  192.168.4.2:60650, using pool slot 0
     14472> URL = /
     14474> Pool slot 0 is done. Closing.
     14474> Pool slot 0: socket closed.
     14502> Conn req from  192.168.4.2:60652, using pool slot 0
     14503> URL = /wx/setting?name=module-name
     14503> GET args = name=module-name
     14505> GET 'module-name' --> 'PCB1'
     14511> Pool slot 0 is done. Closing.
     14512> Pool slot 0: socket closed.
     14517> Conn req from  192.168.4.2:60654, using pool slot 0
     14521> URL = /wx/setting?name=version
     14524> GET args = name=version
     14527> GET 'version' --> 'v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)'
     14534> Pool slot 0 is done. Closing.
     14536> Pool slot 0: socket closed.
     15993> Conn req from  192.168.4.2:60656, using pool slot 0
     15994> URL = /wifi/wifi.html
     15995> Heatshrink compressed file; decode parms = b4
     16034> Conn req from  192.168.4.2:60658, using pool slot 1
     16035> URL = /wifi/style.css
     16036> Heatshrink compressed file; decode parms = b4
     16048> Pool slot 1 is done. Closing.
     16048> Pool slot 1: socket closed.
     16051> Pool slot 0 is done. Closing.
     16052> Pool slot 0: socket closed.
     16056> Conn req from  192.168.4.2:60660, using pool slot 0
     16058> URL = /wx/setting?name=wifi-ssid
     16061> GET args = name=wifi-ssid
     16065> GET 'wifi-ssid' --> ''
     16069> Pool slot 0 is done. Closing.
     16071> Pool slot 0: socket closed.
     16080> Conn req from  192.168.4.2:60662, using pool slot 0
     16081> URL = /wx/setting?name=module-name
     16083> GET args = name=module-name
     16086> GET 'module-name' --> 'PCB1'
     16091> Pool slot 0 is done. Closing.
     16093> Pool slot 0: socket closed.
     16097> Conn req from  192.168.4.2:60664, using pool slot 0
     16102> URL = /wx/setting?name=wifi-mode
     16105> GET args = name=wifi-mode
     16108> GET 'wifi-mode' --> 'AP'
     16112> Pool slot 0 is done. Closing.
     16115> Pool slot 0: socket closed.
     16119> Conn req from  192.168.4.2:60666, using pool slot 0
     16124> URL = /wx/setting?name=station-ipaddr
     16127> GET args = name=station-ipaddr
     16130> GET 'station-ipaddr' --> '0.0.0.0'
     16135> Pool slot 0 is done. Closing.
     16138> Pool slot 0: socket closed.
     16142> Conn req from  192.168.4.2:60668, using pool slot 0
     16147> URL = /wx/setting?name=station-macaddr
     16150> GET args = name=station-macaddr
     16154> GET 'station-macaddr' --> 'xx:xx:xx:xx:xx:xx'
     16160> Pool slot 0 is done. Closing.
     16162> Pool slot 0: socket closed.
     16176> Conn req from  192.168.4.2:60670, using pool slot 0
     16177> URL = /wx/setting?name=softap-ipaddr
     16177> GET args = name=softap-ipaddr
     16180> GET 'softap-ipaddr' --> '192.168.4.1'
     16185> Pool slot 0 is done. Closing.
     16188> Pool slot 0: socket closed.
     16192> Conn req from  192.168.4.2:60672, using pool slot 0
     16196> URL = /wx/setting?name=softap-macaddr
     16200> GET args = name=softap-macaddr
     16203> GET 'softap-macaddr' --> 'xx:xx:xx:xx:xx:xx'
     16209> Pool slot 0 is done. Closing.
     16212> Pool slot 0: socket closed.
    


    This is the olimex esp8266 module, same exact crash output it looks like.
       Flash config restore ok
       116> Reset Pin: 13
       116> RX Pullup: 0
       122> DISCOVER: initialized
       123> Version v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)
       123> Using pin 13 for reset
       124> 2MB flash: base 00100000, size 1048576
       128> Flash filesystem mounted!
       131> Httpd init
       133>
       134> Ready
       135> mode : softAP(xx:xx:xx:xx:xx:xx)
       139> add if1
       140> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
       148> bcn 100
    238395> add 1
    238395> aid 1
    238395> station: xx:xx:xx:xx:xx:xx join, AID = 1
    259860> Conn req from  192.168.4.2:60264, using pool slot 0
    259861> URL = /
    259864> Pool slot 0 is done. Closing.
    259865> Pool slot 0: socket closed.
    259870> Conn req from  192.168.4.2:60266, using pool slot 0
    259872> URL = /index.html
    259873> Heatshrink compressed file; decode parms = b4
    259902> Pool slot 0 is done. Closing.
    259902> Pool slot 0: socket closed.
    260048> Conn req from  192.168.4.2:60268, using pool slot 0
    260049> URL = /style.css
    260050> Heatshrink compressed file; decode parms = b4
    260097> Pool slot 0 is done. Closing.
    260098> Pool slot 0: socket closed.
    260101> Conn req from  192.168.4.2:60270, using pool slot 0
    260102> URL = /logo.png
    260149> Pool slot 0 is done. Closing.
    260149> Pool slot 0: socket closed.
    260155> Conn req from  192.168.4.2:60272, using pool slot 0
    260156> URL = /wx/setting?name=module-name
    260156> GET args = name=module-name
    260159> GET 'module-name' --> 'PCB2'
    260164> Pool slot 0 is done. Closing.
    260167> Pool slot 0: socket closed.
    260171> Conn req from  192.168.4.2:60274, using pool slot 0
    260175> URL = /favicon.ico
    260177> Heatshrink compressed file; decode parms = b4
    260182> Conn req from  192.168.4.2:60276, using pool slot 1
    260188> URL = /wx/setting?name=version
    260190> GET args = name=version
    260193> GET 'version' --> 'v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)'
    260204> Pool slot 1 is done. Closing.
    260205> Pool slot 1: socket closed.
    260212> Pool slot 0 is done. Closing.
    260213> Pool slot 0: socket closed.
    261528> Conn req from  192.168.4.2:60280, using pool slot 0
    261530> URL = /wifi/wifi.html
    261531> Heatshrink compressed file; decode parms = b4
    261564> Conn req from  192.168.4.2:60282, using pool slot 1
    261565> URL = /wifi/style.css
    261566> Heatshrink compressed file; decode parms = b4
    261569> Conn req from  192.168.4.2:60284, using pool slot 2
    261574> E:M 2056
    261576> URL = /wifi/140medley.min.js
    261579> Heatshrink compressed file; decode parms = b4
    261583> E:M 2096
    261585> Fatal exception 29(StoreProhibitedCause):
    261589> epc1=0x4000df64, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
     ets Jan  8 2013,rst cause:1, boot mode:(3,0)
    
    load 0x40100000, len 2592, room 16
    tail 0
    chksum 0xf3
    load 0x3ffe8000, len 764, room 8
    tail 4
    chksum 0x92
    load 0x3ffe82fc, len 676, room 4
    tail 0
    chksum 0x22
    csum 0x22
    
    2nd boot version : 1.7(5d6f877)
    SPI Speed : 80MHz
    SPI Mode : QIO
    SPI Flash Size & Map: 16Mbit(512KB+512KB)
    jump to run user1 @ 1000
    
    
    
    
    
    Flash config restore ok
       126> Reset Pin: 13
       126> RX Pullup: 0
       132> DISCOVER: initialized
       132> Version v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)
       132> Using pin 13 for reset
       134> 2MB flash: base 00100000, size 1048576
       138> Flash filesystem mounted!
       141> Httpd init
       143>
       143> Ready
       145> mode : softAP(xx:xx:xx:xx:xx:xx)
       148> add if1
       150> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
       157> bcn 100
       274> add 1
       274> aid 1
       274> station: xx:xx:xx:xx:xx:xx join, AID = 1
       784> Conn req from  192.168.4.2:60286, using pool slot 0
       785> URL = /wifi/140medley.min.js
       786> Heatshrink compressed file; decode parms = b4
       804> Pool slot 0 is done. Closing.
       805> Pool slot 0: socket closed.
     10116> Conn req from  192.168.4.2:60288, using pool slot 0
     10117> URL = /wx/setting?name=wifi-ssid
     10117> GET args = name=wifi-ssid
     10119> GET 'wifi-ssid' --> ''
     10124> Pool slot 0 is done. Closing.
     10126> Pool slot 0: socket closed.
    

  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-07 09:27

    Clock Loop wrote: »

    I can try and flash an earlier firmware to see if it does the same.

    I did just that, I flashed using an old build I saved of commit (a5bcb63)
    https://github.com/parallaxinc/Parallax-ESP/commit/a5bcb63560c3be18806231ba25700cf70a0f6f3a

    Because i cannot get the old commit from github to build properly (wtf?)

    I flashed it to the parallax WX module, and I cannot get it to crash at first boot on the wifi page no matter what I try.
    The older firmware seems to choke a bit in ap mode when you join it.
       Flash config restore ok
       121> Reset Pin: 13
       121> RX Pullup: 0
       127> DISCOVER: initialized
       127> Version v1.0 (2020-09-03 02:47:12 29-xxxxxxxx)
       127> Using pin 13 for reset
       128> 4MB flash: base 00100000, size 3145728
       133> Flash filesystem mounted!
       136> Httpd init
       137>
       138> Ready
       140> mode : softAP(xx:xx:xx:xx:xx:xx)
       143> add if1
       145> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
       153> bcn 100
     30819> add 1
     30819> aid 1
     30819> station: xx:xx:xx:xx:xx:xx join, AID = 1
     75740> station: xx:xx:xx:xx:xx:xx leave, AID = 1
     75740> rm 1
     89843> add 1
     89843> aid 1
     89843> station: xx:xx:xx:xx:xx:xx join, AID = 1
    134742> station: xx:xx:xx:xx:xx:xx leave, AID = 1
    134742> rm 1
    144825> add 1
    144825> aid 1
    144825> station: xx:xx:xx:xx:xx:xx join, AID = 1
    170114> Conn req from  192.168.4.2:33532, using pool slot 0
    170116> URL = /
    170119> Pool slot 0 is done. Closing.
    170119> Pool slot 0: socket closed.
    170125> Conn req from  192.168.4.2:33534, using pool slot 0
    170127> URL = /index.html
    170128> Heatshrink compressed file; decode parms = b4
    170156> Pool slot 0 is done. Closing.
    170156> Pool slot 0: socket closed.
    170295> Conn req from  192.168.4.2:33536, using pool slot 0
    170296> URL = /style.css
    170296> Heatshrink compressed file; decode parms = b4
    170341> Pool slot 0 is done. Closing.
    170341> Pool slot 0: socket closed.
    170345> Conn req from  192.168.4.2:33538, using pool slot 0
    170346> URL = /logo.png
    170390> Pool slot 0 is done. Closing.
    170390> Pool slot 0: socket closed.
    170395> Conn req from  192.168.4.2:33540, using pool slot 0
    170396> URL = /wx/setting?name=module-name
    170397> GET args = name=module-name
    170400> GET 'module-name' --> 'PCB1'
    170405> Pool slot 0 is done. Closing.
    170408> Pool slot 0: socket closed.
    170411> Conn req from  192.168.4.2:33542, using pool slot 0
    170416> URL = /favicon.ico
    170418> Heatshrink compressed file; decode parms = b4
    170423> Conn req from  192.168.4.2:33544, using pool slot 1
    170429> URL = /wx/setting?name=version
    170431> GET args = name=version
    170434> GET 'version' --> 'v1.0 (2020-09-03 02:47:12 29-xxxxxxxx)'
    170445> Pool slot 1 is done. Closing.
    170446> Pool slot 1: socket closed.
    170454> Pool slot 0 is done. Closing.
    170454> Pool slot 0: socket closed.
    171780> Conn req from  192.168.4.2:33546, using pool slot 0
    171781> URL = /wifi/wifi.html
    171782> Heatshrink compressed file; decode parms = b4
    171813> Conn req from  192.168.4.2:33548, using pool slot 1
    171815> URL = /wifi/style.css
    171815> Heatshrink compressed file; decode parms = b4
    171818> Conn req from  192.168.4.2:33550, using pool slot 2
    171824> URL = /wifi/140medley.min.js
    171827> Heatshrink compressed file; decode parms = b4
    171838> Pool slot 0 is done. Closing.
    171838> Pool slot 1 is done. Closing.
    171838> Pool slot 0: socket closed.
    171841> Pool slot 2 is done. Closing.
    171845> Pool slot 1: socket closed.
    171848> Pool slot 2: socket closed.
    171856> Conn req from  192.168.4.2:33552, using pool slot 0
    171857> URL = /wx/setting?name=wifi-ssid
    171860> GET args = name=wifi-ssid
    171863> GET 'wifi-ssid' --> ''
    171866> Pool slot 0 is done. Closing.
    171869> Pool slot 0: socket closed.
    171876> Conn req from  192.168.4.2:33554, using pool slot 0
    171878> URL = /wx/setting?name=module-name
    171881> GET args = name=module-name
    171884> GET 'module-name' --> 'PCB1'
    171890> Pool slot 0 is done. Closing.
    171891> Pool slot 0: socket closed.
    171899> Conn req from  192.168.4.2:33556, using pool slot 0
    171900> URL = /wx/setting?name=wifi-mode
    171903> GET args = name=wifi-mode
    171906> GET 'wifi-mode' --> 'AP'
    171910> Pool slot 0 is done. Closing.
    171913> Pool slot 0: socket closed.
    171917> Conn req from  192.168.4.2:33558, using pool slot 0
    171922> URL = /wx/setting?name=station-ipaddr
    171925> GET args = name=station-ipaddr
    171929> GET 'station-ipaddr' --> '0.0.0.0'
    171933> Pool slot 0 is done. Closing.
    171936> Pool slot 0: socket closed.
    171940> Conn req from  192.168.4.2:33560, using pool slot 0
    171945> URL = /wx/setting?name=station-macaddr
    171948> GET args = name=station-macaddr
    171952> GET 'station-macaddr' --> 'xx:xx:xx:xx:xx:xx'
    171958> Pool slot 0 is done. Closing.
    171961> Pool slot 0: socket closed.
    171964> Conn req from  192.168.4.2:33562, using pool slot 0
    171969> URL = /wx/setting?name=softap-ipaddr
    171973> GET args = name=softap-ipaddr
    171976> GET 'softap-ipaddr' --> '192.168.4.1'
    171981> Pool slot 0 is done. Closing.
    171984> Pool slot 0: socket closed.
    171989> Conn req from  192.168.4.2:33564, using pool slot 0
    171993> URL = /wx/setting?name=softap-macaddr
    171996> GET args = name=softap-macaddr
    172000> GET 'softap-macaddr' --> 'xx:xx:xx:xx:xx:xx'
    172005> Pool slot 0 is done. Closing.
    172008> Pool slot 0: socket closed.
    

    I am now going to try to flash the NEW firmware with the new esptool.py instead of the old c version, to see if the new firmware still crashes.

    It could be the new boot v1.7, I can try using the older 1.6 after I test with the newer esptool.py.
    Clock Loop wrote: »
    I can confirm that the new firmware is causing this crash issue, and it is not on the old firmware, or I cannot re-create it on the old firmware.

    I even set the new esptool.py to use 4MB for the flash (instead of 2MB)

    I don't see the exact same error/crash output though.
    I only see 49711> E:M 2096
    So programming with the full 4MB flash, stoped one of the E:M errors?
       Flash config restore ok
       118> Reset Pin: 12
       119> RX Pullup: 0
       125> DISCOVER: initialized
       125> Version v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)
       125> Using pin 12 for reset
       126> 4MB flash: base 00100000, size 3145728
       130> Flash filesystem mounted!
       134> Httpd init
       135>
       136> Ready
       137> mode : softAP(xx:xx:xx:xx:xx:xx)
       141> add if1
       143> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
       150> bcn 100
     11776> add 1
     11776> aid 1
     11776> station: xx:xx:xx:xx:xx:xx join, AID = 1
     13794> station: xx:xx:xx:xx:xx:xx leave, AID = 1
     13795> rm 1
     36991> add 1
     36991> aid 1
     36991> station: xx:xx:xx:xx:xx:xx join, AID = 1
     47317> Conn req from  192.168.4.2:34026, using pool slot 0
     47318> URL = /
     47321> Pool slot 0 is done. Closing.
     47321> Pool slot 0: socket closed.
     47331> Conn req from  192.168.4.2:34028, using pool slot 0
     47333> URL = /index.html
     47334> Heatshrink compressed file; decode parms = b4
     47360> Pool slot 0 is done. Closing.
     47361> Pool slot 0: socket closed.
     47506> Conn req from  192.168.4.2:34030, using pool slot 0
     47507> URL = /style.css
     47508> Heatshrink compressed file; decode parms = b4
     47553> Pool slot 0 is done. Closing.
     47553> Pool slot 0: socket closed.
     47556> Conn req from  192.168.4.2:34032, using pool slot 0
     47557> URL = /logo.png
     47603> Pool slot 0 is done. Closing.
     47604> Pool slot 0: socket closed.
     47609> Conn req from  192.168.4.2:34034, using pool slot 0
     47610> URL = /favicon.ico
     47611> Heatshrink compressed file; decode parms = b4
     47620> Conn req from  192.168.4.2:34036, using pool slot 1
     47621> URL = /wx/setting?name=module-name
     47623> GET args = name=module-name
     47626> GET 'module-name' --> 'wx-xxxxxx'
     47632> Pool slot 1 is done. Closing.
     47634> Pool slot 0 is done. Closing.
     47637> Pool slot 1: socket closed.
     47640> Pool slot 0: socket closed.
     47644> Conn req from  192.168.4.2:34038, using pool slot 0
     47649> URL = /wx/setting?name=version
     47652> GET args = name=version
     47655> GET 'version' --> 'v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)'
     47662> Pool slot 0 is done. Closing.
     47664> Pool slot 0: socket closed.
     49657> Conn req from  192.168.4.2:34042, using pool slot 0
     49659> URL = /wifi/wifi.html
     49660> Heatshrink compressed file; decode parms = b4
     49694> Conn req from  192.168.4.2:34044, using pool slot 1
     49695> URL = /wifi/style.css
     49696> Heatshrink compressed file; decode parms = b4
     49699> Conn req from  192.168.4.2:34046, using pool slot 2
     49704> URL = /wifi/140medley.min.js
     49707> Heatshrink compressed file; decode parms = b4
     49711> E:M 2096 49711> E:M 2096
     49714> Pool slot 0 is done. Closing.
    
     ets Jan  8 2013,rst cause:1, boot mode:(3,0)
    
    load 0x40100000, len 2592, room 16
    tail 0
    chksum 0xf3
    load 0x3ffe8000, len 764, room 8
    tail 4
    chksum 0x92
    load 0x3ffe82fc, len 676, room 4
    tail 0
    chksum 0x22
    csum 0x22
    
    2nd boot version : 1.7(5d6f877)
    SPI Speed : 80MHz
    SPI Mode : QIO
    SPI Flash Size & Map: 32Mbit(512KB+512KB)
    jump to run user1 @ 1000
    
    
    
    
    
    Flash config restore ok
       124> Reset Pin: 12
       124> RX Pullup: 0
       131> DISCOVER: initialized
       131> Version v1.0 (2020-09-06 03:18:16 37-xxxxxxxx)
       131> Using pin 12 for reset
       132> 4MB flash: base 00100000, size 3145728
       136> Flash filesystem mounted!
       140> Httpd init
       141>
       142> Ready
       143> mode : softAP(xx:xx:xx:xx:xx:xx)
       147> add if1
       149> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
       156> bcn 100
       747> add 1
       748> aid 1
       748> station: xx:xx:xx:xx:xx:xx join, AID = 1
     10110> Conn req from  192.168.4.2:34048, using pool slot 0
     10112> URL = /wifi/style.css
     10113> Heatshrink compressed file; decode parms = b4
     10115> Conn req from  192.168.4.2:34050, using pool slot 1
     10121> URL = /wifi/140medley.min.js
     10124> Heatshrink compressed file; decode parms = b4
     10133> Pool slot 0 is done. Closing.
     10134> Pool slot 0: socket closed.
     10138> Pool slot 1 is done. Closing.
     10139> Pool slot 1: socket closed.
     10149> Conn req from  192.168.4.2:34052, using pool slot 0
     10150> URL = /wx/setting?name=wifi-ssid
     10151> GET args = name=wifi-ssid
     10153> GET 'wifi-ssid' --> ''
     10157> Pool slot 0 is done. Closing.
     10159> Pool slot 0: socket closed.
     10172> Conn req from  192.168.4.2:34054, using pool slot 0
     10173> URL = /wx/setting?name=module-name
     10173> GET args = name=module-name
     10176> GET 'module-name' --> 'wx-xxxxxx'
     10181> Pool slot 0 is done. Closing.
     10183> Pool slot 0: socket closed.
     10191> Conn req from  192.168.4.2:34056, using pool slot 0
     10192> URL = /wx/setting?name=wifi-mode
     10195> GET args = name=wifi-mode
     10198> GET 'wifi-mode' --> 'AP'
     10203> Pool slot 0 is done. Closing.
     10204> Pool slot 0: socket closed.
     10209> Conn req from  192.168.4.2:34058, using pool slot 0
     10213> URL = /wx/setting?name=station-ipaddr
     10217> GET args = name=station-ipaddr
     10220> GET 'station-ipaddr' --> '0.0.0.0'
     10226> Pool slot 0 is done. Closing.
     10228> Pool slot 0: socket closed.
    

    @"David Betz"

    Could this be related to your ram space concern or what you had called it.

  • I have posted the new and old firmware files, with all the script / batch file and data files needed to program any esp in windows or linux in my thread.

    The new firmware:
    https://forums.parallax.com/discussion/comment/1505814/#Comment_1505814

    The old firmware:
    https://forums.parallax.com/discussion/comment/1505874/#Comment_1505874

    This should make it easy for users to test both.
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-07 11:52
    Did I find a command mode POLL bug?

    I figured out I kinda did, I called ser.str(string("POLL")) WITHOUT a COLON. :
    The module responds with a Reply: '=N,0,0'
    When it should respond with a Reply: '=E,1' ?



    Heres the poll command I sent in TEXT FORM.
      ser.tx(254)  'Begin marker
      ser.str(string("POLL"))   'Tell the module to listen to ANY protocol/path.
      ser.tx(13)    'End marker  
    


    Heres the poll command in TOKEN FORM.
      ser.tx(254)  'Begin marker
      ser.str(string($EC))   'Tell the module to listen to ANY protocol/path.
      ser.tx(13)    'End marker
    

    When in TEXT FORM, i get NO reply, but TOKEN FORM, I get a reply.
    Am I doing something wrong in TEXT FORM?

    You can use the html HERE to prove it. (upload this html to your ParallaxWX module --> https://github.com/parallaxinc/propeller/blob/master/libraries/community/p1/All/WX ESP8266 SPIN Get Started/val-from-micro.html

    Heres the full prop code in TEXT FORM
    CON 
      _CLKMODE=XTAL1 + PLL16X                   ' The system clock spec
      _XINFREQ = 5_000_000                                  ' Crystal
    
      Rx        = 31     'serial in from wx device
      Tx        = 30     'serial out to wx device
    
    OBJ
    
        ser: "FullDuplexSerial.spin"
    
    VAR
    
        long Stack1[100]
    
    Pub Main   
    
    cognew(Comms, @Stack1)
    
    Pub Comms | CommandMode
        
      ser.Start(RX, TX, 0, 115200)   'Cog #2 
      waitcnt(80_000_000 + cnt)   'wait 1 second fpr serial to start.
                              
      Repeat
        ser.str(string(27))     'Set ansi command mode in putty.
        ser.str(string("[2J"))  'Clear putty telnet screen. 
      
        If CommandMode == 1    'Turn command mode on in spin.
          
          ser.str(string(27))      'Set ansi command mode in putty.                 
          ser.str(string("[2;3f")) 'Set Position in putty.      
          ser.str(string("Command Mode is On. ")) 'Tell putty command mode is on.      
          ser.str(string(27))      'Set ansi command mode in putty.      
          ser.str(string("[1;1f")) 'Set Position in putty to put cursor at 0
          
          
          waitcnt(80_000_000 + cnt)   'wait 1 second for serial to stop.
          ser.Stop              'Turn off serial to send break.
        
          dira[TX]~~          ' Set direction to output
          outa[TX]:= 0        ' Set TX low.                         
          waitcnt(80_000_000 + cnt)   'wait 1 second for command mode to start in the module.
          dira[TX]~           ' Set direction to input  
    
          ser.Start(RX, TX, 0, 115200)   'Cog #2                                  
          waitcnt(80_000_000 + cnt)   'wait 1 second for serial to start.
        
          ser.tx(254)  'Begin marker
          ser.str(string("LISTEN:HTTP,/tpfm"))   'Tell the module to listen to a specific path on http port 80.
          ser.tx(13)    'End marker  
          waitcnt(80_000_000 + cnt)   'wait 1 second 
        
        
          Repeat 5      
            
            ser.tx(254)  'Begin marker
            ser.str(string("POLL"))   'Tell the module to listen to a ANY protocol/path.    TEXT FORM DOESN'T WORK. Comment out to test token form.
            'ser.str(string($EC))   'Tell the module to listen to ANY protocol/path.     TOKEN FORM WORKS. Uncomment to test.
            ser.tx(13)    'End marker                        
            
    
    
    
    
    
            waitcnt(80_000_000 + cnt)   'wait 1 second                   
        
          ser.tx(254)  'Begin marker
          ser.str(string("SET:cmd-enable,0"))   'Turn command mode off in the WX module.  
          ser.tx(13)    'End marker
          CommandMode := 0  'Turn command mode off in spin.
          waitcnt(80_000_000 + cnt) 'Wait for 1 s  
        
        
        ser.str(string(27))      'Set ansi command mode in putty.
        ser.str(string("[2;3f")) 'Set Position in putty.
        ser.str(string("Command Mode is Off."))   'Tell putty command mode is off.                          '                                           
        ser.str(string(27))      'Set ansi command mode in putty.                         '                        
        ser.str(string("[1;1f")) 'Set Position in putty to put cursor at 0
        
          
        
        Repeat 5
          waitcnt(80_000_000 + cnt) 'Wait for 1 s  
        
        CommandMode := 1   'Turn command mode on in spin.
    


    ALL of the example code located here: https://github.com/parallaxinc/propeller/tree/master/libraries/community/p1/All/WX ESP8266 SPIN Get Started
    Has POLL with no COLON, thus FAILS.

    DO YOUR PART!
  • The token and the command string shouldn't work differently. I'll take a look at this.

    Another thing I thought of is that there is a "patch" program that gets used to patch the boot binary before it is put into the release folder. Is it possible that the locations that are patched needs to change when moving from boot_v1.6.bin and boot_v1.7.bin?
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-07 12:18
    David Betz wrote: »
    The token and the command string shouldn't work differently. I'll take a look at this.

    Another thing I thought of is that there is a "patch" program that gets used to patch the boot binary before it is put into the release folder. Is it possible that the locations that are patched needs to change when moving from boot_v1.6.bin and boot_v1.7.bin?

    I was going to ask you about that "patch" and what it did, it concerned me.

    You may be right because I just crashed the module again by overloading the available handlers.
    I used the html code posted above (val-from-micro.html)
    And the spin code above (with the correct POLL: command)
    And I hit the update button, many times when the module was NOT in command mode.
     89470> [89470] sscp: disconnecting 6
     89472> Conn req from  192.168.4.2:55091, using pool slot 0
     89493> URL = /tpfm
     89493> [89493] listener: matching '/tpfm' with '/tpfm'
     89493> sscp: no connections available for /tpfm request
     89701> Pool slot 0 is done. Closing.
     89701> Pool slot 0: socket closed.
     90373> Conn req from  192.168.4.2:55092, using pool slot 0
     90392> URL = /tpfm
     90393> [90393] listener: matching '/tpfm' with '/tpfm'
     90393> sscp: no connections available for /tpfm request
     90602> Pool slot 0 is done. Closing.
     90602> Pool slot 0: socket closed.
     90745> Pool slot 2: socket closed.
     90745> [90745] sscp: disconnecting 7
     90748> Conn req from  192.168.4.2:55093, using pool slot 0
     90762> URL = /tpfm
     90763> [90763] listener: matching '/tpfm' with '/tpfm'
     90763> sscp: no connections available for /tpfm request
     90968> Pool slot 0 is done. Closing.
     90968> Pool slot 0: socket closed.
     91484> Conn req from  192.168.4.2:55094, using pool slot 0
     91502> URL = /tpfm
     91503> [91503] listener: matching '/tpfm' with '/tpfm'
     91503> sscp: no connections available for /tpfm request
     91517> UART break detected. Switching on SSCP command parsing.
    
    
     ets Jan  8 2013,rst cause:4, boot mode:(3,6)
    
    
    wdt reset
    load 0x40100000, len 2592, room 16
    tail 0
    chksum 0xf3
    load 0x3ffe8000, len 764, room 8
    tail 4
    chksum 0x92
    load 0x3ffe82fc, len 676, room 4
    tail 0
    chksum 0x22
    csum 0x22
    
    
    
    2nd boot version : 1.7(5d6f877)
    SPI Speed : 80MHz
    SPI Mode : QIO
    SPI Flash Size & Map: 16Mbit(512KB+512KB)
    jump to run user1 @ 1000
    
    
    
    Flash config restore ok
       129> Reset Pin: 13
       129> RX Pullup: 0
       135> DISCOVER: initialized
       135> Version v1.0 (2020-09-06 09:20:49 40-xxxxxxxx)
       136> Using pin 13 for reset
       137> 2MB flash: base 00100000, size 1048576
       141> Flash filesystem mounted!
       144> file 0: val-from-micro.html 1408
       148> Httpd init
       150>
       150> Ready
       152> mode : softAP(xx:xx:xx:xx:xx:xx)
       155> add if1
       157> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
       165> bcn 100
      2097> add 1
      2097> aid 1
      2097> station: xx:xx:xx:xx:xx:xx join, AID = 1
      2165> Conn req from  192.168.4.2:55105, using pool slot 0
      2180> URL = /tpfm
      2181> /tpfm not found. 404!
      2388> Pool slot 0 is done. Closing.
      2389> Pool slot 0: socket closed.
      4902> Conn req from  192.168.4.2:55104, using pool slot 0
      9906> Pool slot 0: socket closed.
    
  • I just did the same test with a serial console and it works the same for text version as token version.

    Mike
  • I can't get my ESP to fail on startup on the Network page. How do you reproduce this problem again.

    Mike
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-07 12:33
    iseries wrote: »
    I just did the same test with a serial console and it works the same for text version as token version.

    Mike

    What prop code are you using?

    If you are using something connected directly to the module (like a PropPlug) and issuing serial terminal commands, how are you entering Command Mode?
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-07 12:37
    iseries wrote: »
    I can't get my ESP to fail on startup on the Network page. How do you reproduce this problem again.

    Mike

    After power up of the module, you connect to it when its already in AP mode. (its in this mode if you freshly flash it with flash-all.sh / .bat)
    Then when you visit the wifi page, the debug port will show it crashed and rebooted.

    Are you compiling it yourself? Or did you use my zip?

    Did you use the latest git of Parallax-ESP code?

    Are you viewing the debug (DBG) (IO2) pin on the parallax ESP module?
  • Okay, here is what is going on with POLL. If you use "POLL:", the parser thinks that you passed one parameter after the colon which is the empty string. It converts that to an integer to form the channel mask and ends up with zero. That is why you get an "N" response, no channels with activity match the zero mask. The parser isn't very smart. I guess it could check to see if there are any digits in the argument before calling atoi. On the other hand, you should probably be able to just use "POLL" without the colon. That would result in a 0xffffffff mask which would catch activity on any channel.
  • David Betz wrote: »
    On the other hand, you should probably be able to just use "POLL" without the colon. That would result in a 0xffffffff mask which would catch activity on any channel.

    That would let the code work properly in the spin examples in the obex then. (except for them all missing the break to enter command mode)
  • The "patch" program patches the SPI mode and speed and the flash size into the boot image. This is something that is done by esptool.py but not by esptool-ck. At least that was true of esptool.py at the time that I wrote the code.
  • David Betz wrote: »
    The "patch" program patches the SPI mode and speed and the flash size into the boot image. This is something that is done by esptool.py but not by esptool-ck. At least that was true of esptool.py at the time that I wrote the code.

    If you have a version that skips the patch, i can test with esptool.py. Or tell me what code to comment out to make a non-patch file.
  • I have a dongle that I use to program the ESP module and have it connected to XCTU software which has a terminal program that allows sending packets of text or binary data to test each of the different commands.

    Mike
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-07 13:09
    iseries wrote: »
    I have a dongle that I use to program the ESP module and have it connected to XCTU software which has a terminal program that allows sending packets of text or binary data to test each of the different commands.

    Mike

    I don't know what do tell you, i can't see what you are ACTUALLY sending to the module, i can't snoop your TX/RX, but if you hook up a prop and run my code, you will see that POLL without a colon doesn't work properly, you will get a Reply: '=N,0,0' when you setup a "LISTEN:HTTP,/tpfm" And then activate the listen with your webpage.
  • I just added some debug code and it looks like "POLL" and "POLL:" produce the same channel mask, 0xffffffff and hence they should behave identically. Are you not seeing that?
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-07 13:34
    Geez. Im loosing my mind, now I am seeing it reply properly with 'POLL'

    What led me onto this is this POLL command.
            ser.tx(254)  'Begin marker
            ser.str(string("POLL:HTTP,/tpfm"))   'Tell the module to listen to a specific path on http port 80.
            ser.tx(13)    'End marker
    
    It replies with '=N,0,0'

    I was probably formatting my filter wrong? But I don't know if that wrong filter, put the module into a bug state.
    And I tried that and cannot repeat it, now I see why you and iseries are not seeing it.
    I also don't know if this is a bug that only shows up after the very first flash-all boot, I will try to recreate it if I can.

    Oh well, on ward!

    About that patch....
  • Poll takes a numeric argument which which is interpreted as a mask that indicates which of the connections to listen to. This command is likely interpreted as a zero mask and the alpha characters are ignored.
    ser.str(string("POLL:HTTP,/tpfm"))   'Tell the module to listen to a specific path on http port 80.
    
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-07 14:27
    David Betz wrote: »
    Poll takes a numeric argument which which is interpreted as a mask that indicates which of the connections to listen to. This command is likely interpreted as a zero mask and the alpha characters are ignored.
    ser.str(string("POLL:HTTP,/tpfm"))   'Tell the module to listen to a specific path on http port 80.
    
    Yea I don't know, why i cannot recreate my issue, and I had the problem for DAYS until I formatted the POLL properly,
    and THEN it still showed up with just POLL, until I used POLL: and then I cannot even recreate the issue.
    I hate this. (oh but i love it)
    Its like willy wonkas, "theres no way of knowing which way we are going"
  • After running some test scripts through the unit I discovered that my UDP changes got removed from the sscp.c program and hence no UDP.

    I put them back in and it works now.

    Mike
  • iseries wrote: »
    After running some test scripts through the unit I discovered that my UDP changes got removed from the sscp.c program and hence no UDP.

    I haven't even gotten around to using UDP for anything ... YET.. So I didn't test this functionality.
  • iseries wrote: »
    After running some test scripts through the unit I discovered that my UDP changes got removed from the sscp.c program and hence no UDP.

    I put them back in and it works now.

    Mike
    Can you send another PR?

  • I've put quite a bit of time in on this over the long holiday weekend. Unfortunately, I'm back to work tomorrow and probably won't be able to do much other than merge pull requests for a while. Is there any other serious problem that needs addressing today?
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-07 20:03
    David Betz wrote: »
    Is there any other serious problem that needs addressing today?

    I do have 2.

    The version number on the Home page of the module configuration. It always says 1.0 even with all these new changes.
    And the date only reflects the compile date, so it doesn't help one to determine the version of software the module is running.

    With the change to the HOSTNAME, and the addition of the ability to change what pin the RESET signal comes from on the module, those changes would merit a 2.0 or something.

    So everything PAST this commit in 2016, should say 2.0? (but changing all that previous code to reflect this, isn't gonna happen?)
    https://github.com/parallaxinc/Parallax-ESP/tree/d8c785eb616226c809348c2a892d071fd27cb952


    And everything PAST this commit in 2020, should say 3.0? (but changing all that previous code to reflect this, isn't gonna happen?)
    https://github.com/parallaxinc/Parallax-ESP/tree/a5bcb63560c3be18806231ba25700cf70a0f6f3a
    So wouldn't it be wise to START changing the version with all these MAJOR updates and sdk changes?
    (yea yea, i know, where was i in 2016?)


    If we cannot change the previous code version to reflect the changes, how can I do it for my own compiles of previous code? (what code do i change?)



    2. Instructions on how to compile previous code would be nice, because when I try to checkout previous commits before the new sdk, I get a bad upload to the module, the TX light just blinks rapidly. I am doing something wrong when I change the head... is it related to the sub modules?

    Maybe i need to do a 'git reset --hard <hash-or-ref>' and then git submodule init and git submodule update?
    I just tried to do a git reset --hard <hash-or-ref>' and then git submodule init and git submodule update, then compiled it all, and flashed the esp, and it DOES work, so I was doing it wrong by not doing a --hard.
Sign In or Register to comment.