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

    Need help fixing bricked GPy

    Scheduled Pinned Locked Moved GPy
    5 Posts 2 Posters 308 Views 2 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.
    • P Offline
      pycom_user123
      last edited by pycom_user123

      I'm concerned I may have bricked my GPy. When I power up the board the LED remains permanently lit red and my attempts to safe boot the module have been unsuccessful . Given that I don't have an expansion board I'm unable connect with the device at all and I'm not really sure what else i can try. Any ideas?

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

        @pycom_user123 At least you need an USB/UART bridge. Then you can re-flash the device. Connect:

        GPY   USB/UART bridge
        GND -> GND
        Vin -> 5V
        P0 -> Tx
        P1 -> Rx
        P2 -> GND
        

        and then push reset. Then you can run the firmware updater. Tx and RX have sometimes to be swapped. The labeling at the bridges is sometimes the opposite. When you connect a terminal emulator, you should see a boot message like:

        rst:0x1 (POWERON_RESET),boot:0x2 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_FEO_V2))
        waiting for download
        

        If updating fails, try a complete flash erase using esptool.py (e.g. here: https://github.com/espressif/esptool/tree/4dab24e1b28632d270adf7305fe0d008d1acee99)
        The link contains instructions for reading.
        Command e.g.:
        python3 esptool.py --port your_usb_port erase_flash

        Unless the device is physically damaged, which rarely happens, you can always restore it.

        P 1 Reply Last reply Reply Quote 0
        • P Offline
          pycom_user123 @robert-hh
          last edited by robert-hh

          @robert-hh This worked, thank you! Another question, somewhat unrelated. I'm following the steps here => https://docs.pycom.io/tutorials/all/wlan.html to connect my GPy to router and I edited the boot.py file with the code below:

          from network import WLAN
          wlan = WLAN(mode=WLAN.STA)
          
          nets = wlan.scan()
          for net in nets:
              if net.ssid == 'ssid':
                  print('Network found!')
                  wlan.connect(net.ssid, auth=(net.sec, 'password'), timeout=5000)
                  while not wlan.isconnected():
                      machine.idle() # save power while waiting NameError: name 'machine' is not defined
                  print('WLAN connection succeeded!')
                  break
          

          I'm getting an error that reads "NameError: name 'machine' is not defined". I'm no longer able to access ftp server using the the command 'ftp 192.168.4.1' to adjust the boot.py file. So my question is how do I access the file system so I can edit the boot.py file to fix this error?

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

            @pycom_user123 Just a note ahead:
            Enclose program code in lines with three backticks ``` . That will keep the indentation. The error is caused by omission of
            import machine

            Through a serial console and the USB/UARt interface you can get access to the REPL prompt. Also, since the connect statement was executed, you may see the device in the network you connected it to, but then under a different IP address, which was assigned by the router. In any case you can deal then with boot.py. In the worst case you can delete it with:

            import uos
            uos.remove("boot.py")

            and then create a new boot.py.

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              pycom_user123 @robert-hh
              last edited by

              @robert-hh Thanks so much for the help!

              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