Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    LoPy4 fresh after firmware flash hangs after main.py runs

    Scheduled Pinned Locked Moved LoPy
    lopy4 firmware
    5 Posts 3 Posters 361 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      dnear1
      last edited by

      I now have a dozen different Lopy 4 units. Most of them are working great. Trying to get this new unit online and it's giving me a bit of a headache. I've flashed it with new firmware, erased the filesystem and updated the pybytes registration several times. Even tried deleting the device and adding it as a new device. When it first boots up, the serial output indicates it connected to the wifi successfully. But it never shows online and I can't get any response from REPL. When rebooted, this is all I get on the serial:

      ets Jun  8 2016 00:22:57
      
      rst:0x1 (POWERON_RESET),boot:0x32 (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:1
      load:0x3fff8028,len:8
      load:0x3fff8030,len:1688
      load:0x4009fa00,len:0
      load:0x4009fa00,len:14592
      entry 0x400a059c
      WMAC: 807D3A937CEC
      Firmware: 1.18.2.r6
      Pybytes: 0.9.12
      Pybytes configuration read from /flash/pybytes_config.json
      Initialized watchdog for WiFi and LTE connection with timeout 660000 ms
      WiFi connection established
      WARNING: consider enabling TLS by using pybytes.enable_ssl()
      Connected to MQTT mqtt.pybytes.pycom.io
      Pybytes connected successfully (using the built-in pybytes library)
      Now starting user code in main.py
      

      I checked with Wireshark and I see DHCP discovery, DHCP request and ARP broadcasts. About 10 packets filtered out by eth.src[0:3]==80:7D:3A
      After that, crickets.

      Input voltage is 5.05vdc and the heartbeat flashes blue every few seconds. Tried to FTP in with FileZilla to the IP address but it never connects. Ping fails

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @dnear1
        last edited by

        @dnear1 REPL is started after main.py finishes. So if main.py is not terminated, you will not get the REPL prompt. You can try to put your code from main.py in a new thread, wich allows you to leave main.py while the thread continues to run.

        1 Reply Last reply Reply Quote 0
        • D Offline
          dnear1
          last edited by

          For this unit, it theoretically shouldn't have ANY code loaded to it. I've tried erase flash filesystem, update pybytes registration, reset lora region, etc. from the pycom firmware uploader. Firmware flash is successful. Afterwards, It briefly pings pybytes but doesn't stay online so I can't access the filesystem from there either.

          I removed it from my PCB and put another one in its place. That unit is fully operational.. so the PCB itself isn't the issue.. just the Pycom Lora4 module.

          robert-hhR J 2 Replies Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @dnear1
            last edited by

            @dnear1 How did you erase the flash, with esptool.py?
            And did you try to load the standard (non-pybytes) firmware?

            1 Reply Last reply Reply Quote 0
            • J Offline
              jcaron @dnear1
              last edited by

              @dnear1 can you use FTP to check the contents of the file system including main.py?

              Also what happens if you Send Ctrl-C on the serial interface?

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom