Need help fixing bricked GPy

  • 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-hh Thanks so much for the help!

  • @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 In the worst case you can delete it with:

    import uos

    and then create a new

  • @robert-hh This worked, thank you! Another question, somewhat unrelated. I'm following the steps here => to connect my GPy to router and I edited the 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!')

    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' to adjust the file. So my question is how do I access the file system so I can edit the file to fix this error?

  • @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:

    waiting for download

    If updating fails, try a complete flash erase using (e.g. here:
    The link contains instructions for reading.
    Command e.g.:
    python3 --port your_usb_port erase_flash

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

Log in to reply

Pycom on Twitter