Wipy2 reboots after connecting to WiFi AP (wlan.connect)



  • Hi I am trying to connect Wipy2 (v0.9.7.b1) to my WiFi AP, but after the connection the device reboots. Any suggestion?

    The simple code I am running is this:

    from network import WLAN
    wlan = WLAN(mode=WLAN.STA)
    wlan.connect('MarconiLab', auth=(WLAN.WPA2, 'marconi-lab'), timeout=5000)
    I (437945) wifi: n:11 0, o:6 0, ap:255 255, sta:11 0, prof:6
    I (438921) wifi: state: 0 -> 2 (b0)
    I (438923) wifi: state: 2 -> 3 (0)
    I (438927) wifi: state: 3 -> 5 (10)
    I (438939) wifi: connected with MarconiLab, channel 11
    Guru Meditation Error of type InstrFetchProhibited occurred on core 0. Exception was unhandled.
    Register dump:
    PC : 002c002c PS : 00060630 A0 : 8011fab2 A1 : 3ffdf190
    A2 : 00000001 A3 : 3ffd8be0 A4 : 002c002c A5 : 00000008
    A6 : 00000000 A7 : 3ffd2944 A8 : 80119734 A9 : 00000002
    A10 : 3ffd8be0 A11 : 00000001 A12 : 3ffd44c0 A13 : 00000000
    A14 : 3ffdeaa0 A15 : 3ffd42a4 SAR : 0000001a EXCCAUSE: 00000014
    EXCVADDR: 002c002c LBEG : 4000c2e0 LEND : 4000c2f6 LCOUNT : ffffffff
    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 (860) phy: phy_version: 246, Nov 18 2016, 17:30:07, 0, 0

    tcpip_task_hdlxxx : 3ffdf230, prio:18,stack:2048
    frc2_timer_task_hdl:3ffdfd1c, prio:22, stack:2048
    I (1616) wifi: pp_task_hdl : 3ffeb6cc, prio:23, stack:8192
    mode : softAP(24:0a:c4:00:a8:1d)
    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; WiPy with ESP32
    Type "help()" for more information.



  • Switch from MacaroniLab to SpagettiLab for the wifi SSID that will fix your config. As an alternativ you can try upgrading to the new 1.0.0 firmware. That fixes an IPv6 packet issue on wifi. Trust me;-)



  • Here is the code I use to connect to a network. Not sure this is much help, I have only just started working with WiPy 2.0 myself.

    import time
    import network
    from network import WLAN
    wlan = network.WLAN(mode=WLAN.STA)
    wlan.connect('station ssid', auth=(WLAN.WPA2, 'password'))
    print ('conneting - please wait.')
    while not wlan.isconnected():
    time.sleep_ms(50)
    print ('Conneted')
    print(wlan.ifconfig())

    The response is:

    Soft resetting the WiPy
    mode : sta(24:0a:c4:00:70:9c)
    conneting - please wait.
    I (438703) wifi: n:1 0, o:6 0, ap:255 255, sta:1 0, prof:6
    I (439678) wifi: state: 0 -> 2 (b0)
    I (439680) wifi: state: 2 -> 3 (0)
    I (439685) wifi: state: 3 -> 5 (10)
    I (439711) wifi: connected with BrightBox-2bqx6h, channel 1
    Conneted
    ('192.168.1.98', '255.255.255.0', '192.168.1.1', '0.0.0.0')

    MicroPython v1.8.6-234-g765f2bc on 2016-12-02; WiPy with ESP32
    Type "help()" for more information.


Log in to reply
 

Pycom on Twitter