[SOLVED] LoPy Bricked?



  • Hi, I have a problem with one of my LoPys. I have updated the the latest firmware after receiving it, no problem. I played around with it for a while and everything worked fine.

    Then I put a boot.py into the flash. Since then it is no longer working properly. It announces the WiFi access point and I can join the WiFi. I can ping it. I can telnet to it, but that hangs. The serial port does not get to the REPL loop, either.

    Here is the serial output at boot time:

    rst:0x10 (RTCWDT_RTC_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:312
    load:0x40078000,len:2348
    ho 0 tail 12 room 4
    load:0x4009f000,len:1364
    entry 0x4009f2f8
    frc2_timer_task_hdl:3ffd87a0, prio:22, stack:2048
    tcpip_task_hdlxxx : 3ffdc538, prio:18,stack:2048
    pp_task_hdl : 3ffde0d0, prio:23, stack:8192
    mode : softAP(24:0a:c4:00:89:8b)
    dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)
    dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)

    Then nothing happens anymore.

    First thing I tried was to boot to safe mode. I behaves as described, flashing orange etc. But still it hangs after the dhcp server message. I tried re-doing the firmware update, which works fine. But then, no change.

    Note that the blue LED flashs in regular intervals all 4 seconds.

    I am most probably missing something, but I don't know what. I idea?



  • @stevie Nice you solved this! We've noticed this reverse DNS lookup issue as well on the mac, which is not only annoying but can very easily be mistaken for other problems. We'll add a note to our documentation about it and try to figure out if there is a way to solve the issue itself.



  • Argh, problem solved. Thanks a lot for your help!

    I realized after a while that there is a Mac specific problem: When trying to connect via telnet from the Mac it takes a loooong time for it to connect, if the LoPy is in AP mode. I found this during the beta phase and forgot about it in the meantime. Apparently some reverse DNS lookup problem. So it takes a long time until the lookup times out. Then telnet succeeded and then I could change my boot.py and add the REPL.

    The necessity for setting up the serial REPL is something which is not necessary in the original MicroPython board, maybe that should be changed...

    Anyway, problem solved. Thanks!


  • administrators

    When in safeboot mode, do you see the blue LED flash every 4 seconds?

    When you try to connect to the lopy network via Wifi, you should see the following output in the serial terminal:

    n:6 0, o:6 0, ap:6 1, sta:255 255, prof:6                                       
    add 1                                                                           
    station: 00:13:ef:84:2b:01 join, AID = 1, g, 20     
    

    Sorry just realized you already said that ping was working but telnet would hang. Does ftp work?



  • Thanks for the fast reply. That would explain it. My problem is that I cannot edit the boot.py anymore. In safeboot mode I cannot connect to the py at all, because I cannot connect to telnet. So any idea how I could get rid the boot.py?


  • administrators

    Make sure your boot.py contains these lines:

    import machine
    import os
    uart = machine.UART(0, 115200)
    os.dupterm(uart)
    

    Otherwise you don't get the serial prompt.

    In safeboot mode your boot.py is ignored so you'll never get the serial REPL unless you connect through Wifi and run these commands manually.


Log in to reply
 

Pycom on Twitter