Crash when connecting to my home Wifi router



  • @abilio said in Crash when connecting to my home Wifi router:

    @JF002, sorry ... don't know how the word access ended up there :P I was looking for model, but autocomplete/dictionary in cellphones always play games. I already see you have OpenWRT running (personal favorite). Thanks for trying with a static IP.

    Oh Ok :) It's a TP-Link TL-WDR3600 running OpenWrt 15.05, and only the 2.4Ghz radio is enabled. Multiple devices are connected to it : smartphone, laptop, PS3, RaspberryPi3, another dev board based on ESP8266,...

    Your tests, together with @macfreek report, will help us out finding the origin of the issue. I'll report back as soon as I have news.

    Just ask if you need other test :) I'll wait for your update!



  • @macfreek, just to try ease the detective work, when you mean it happened after 0.9.6, does it mean it didn't happen to you in 0.9.5?



  • @JF002, sorry ... don't know how the word access ended up there :P I was looking for model, but autocomplete/dictionary in cellphones always play games. I already see you have OpenWRT running (personal favorite). Thanks for trying with a static IP.

    Your tests, together with @macfreek report, will help us out finding the origin of the issue. I'll report back as soon as I have news.



  • @abilio No worry, we'll find a solution :)

    I didn't understand the first question. The router is accessible and working, as my laptop and phone are connected to it. I have full access to the router (it's running the OpenWRT firmware, so I can connect as root on it if necessary).

    I tried connecting with a fixed IP, with the same result :/

    Connecting to a Pycom device...
    Connected
    >>> from network import WLAN
    >>> wlan = WLAN(mode=WLAN.STA)
    mode : sta(24:0a:c4:00:c0:52)
    >>> wlan.ifconfig(config=('192.168.1.194', '255.255.255.0','192.168.1.1','192.168.1.1'))
    >>> wlan.connect(ssid='MY_SSID', auth=(WLAN.WPA2, '*-*********'))
    >>> I (169398) wifi: n:9 0, o:6 0, ap:255 255, sta:9 0, prof:6
    I (170372) wifi: state: 0 -> 2 (b0)
    I (170374) wifi: state: 2 -> 3 (0)
    I (170377) wifi: state: 3 -> 5 (10)
    I (170390) wifi: connected with MY_SSID, channel 9
    
    >>> wlan.isconnected()
    True
    >>> wlan.ifconfig()
    ('192.168.1.194', '255.255.255.0', '192.168.1.1', '192.168.1.1')
    >>> Guru Meditation Error of type InstrFetchProhibited occurred on core   0. Exception was unhandled.
    Register dump:
    PC      :  002c002c  PS      :  00060330  A0      :  8012228a  A1      :  3ffdfe10  
    A2      :  00000001  A3      :  3ffd9808  A4      :  002c002c  A5      :  00000008  
    A6      :  00000000  A7      :  3ffd33b4  A8      :  8011bf0c  A9      :  00000002  
    A10     :  3ffd9808  A11     :  00000001  A12     :  3ffd4f30  A13     :  00000000  
    A14     :  3ffdf718  A15     :  3ffd4d14  SAR     :  00000019  EXCCAUSE:  00000014  
    EXCVADDR:  002c002c  LBEG    :  00000000  LEND    :  00000000  LCOUNT  :  00000000  
    Rebooting...
    ets Jun  8 2016 00:22:57
    
    rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:QIO, clock div:2
    load:0x3fff9010,len:8
    load:0x3fff9018,len:812
    ho 0 tail 12 room 4
    load:0x40078000,len:3692
    load:0x4009f000,len:944
    entry 0x4009f1f0
    rtc v134 Oct 20 2016 12:36:18˜øXTAL 40M
    I (864) phy: phy_version: 246, Nov 18 2016, 17:30:07, 0, 0
    
    tcpip_task_hdlxxx : 3ffe800c, prio:18,stack:2048
    frc2_timer_task_hdl:3ffe9a24, prio:22, stack:2048
    I (1593) wifi: pp_task_hdl : 3ffec27c, prio:23, stack:8192
    mode : softAP(24:0a:c4:00:c0:53)
    dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)
    MicroPython v1.8.6-234-g765f2bc on 2016-12-02; LoPy with ESP32
    Type "help()" for more information.
    >>> 
    >>> 
    


  • I have the same problem after I just upgraded to 0.9.6.b1.
    The error is identical (except for a few registers).

    For me, the exception occurs 1-2 seconds after another device joins the local wifi network. I've tested with my laptop and iPhone, and got the same result. For the record, here is my boot.py. My main.py is empty.

    # boot.py -- run on boot-up
    
    # Allow serial connections
    import os
    from machine import UART
    uart = UART(0, 115200)
    os.dupterm(uart)
    
    # connect to wifi
    # see https://docs.pycom.io/lopy/lopy/tutorial/wlan.html
    import machine
    from network import WLAN
    wlan = WLAN(mode=WLAN.STA)
    nets = wlan.scan()
    for net in nets:
        if net.ssid == 'MySSID':
            wlan.connect(net.ssid, auth=(net.sec, 'my_password_'), timeout=5000)
            while not wlan.isconnected():
                machine.idle() # save power while waiting
            break
    

    Edit: the problem also occurs when I configure an static IP address on my LoPy.

    Edit: I also tried with a brand new WiPy 2.0, which I received today. The factory firmware is 0.9.0b, which works fine (except that network.WLAN.ifconfig() method does not exist yet). After I upgrade the firmware to 0.9.6.b1, the crash can easily be reproduced, by turning the sleep mode of my phone on and off. The crash occurs just after the phone requests a DHCP lease on the same network as the WiPy. The crash can also be reproduced by having any other device on the network renew it's DHCP lease.



  • @JF002, I'm sad to see updating didn't do the trick, but it was worth the shot.

    In order to further diagnose, can I ask you for 2 things? First would your router access. Second, can you try connecting with a fixed IP address (See how here). Probably you'll have to modify the numbers so they'll match your network. If you need further help on how to do this, please write me.

    Regards,
    Abilio


Log in to reply
 

Pycom on Twitter