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

    Unable to Program SiPy

    Scheduled Pinned Locked Moved SiPy
    replsipyfirmwareserialpymakr
    7 Posts 3 Posters 2.1k 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.
    • C Offline
      choco
      last edited by

      Despite some initial success, I am unable to program SiPy module. My main setup is Windows 7 64-bit, using Atom and most recent Pymakr package, and a PyCom SiPy w/ Expansion Board 2.0. I have the latest firmware for the boards.

      Here is a detailed description of troubleshooting/results:

      1. Unboxing/Setup
        - Connected over serial. Updated to latest firmware with wizard.
        - Able to program the device over REPL in Atom

      2. Building a project
        - Moved main and boot files inside of the project folder
        - Synchronized and ran perfectly. Checked Sigfox backend and saw all messages received

      3. Failures with Atom
        - REPL began locking up. I was either left at “Connecting on COMxx” or could see the “>>>,” but could not type anything.
        - Inconsistent: I could program if I unplugged and plugged back in. Sometimes, though connected the REPL would lock.

      4. Troubleshooting (With no Success)
        - OS: Also tried Xubuntu. Was not even able to update firmware.
        - Hardware: Tried multiple cables, another module, and another expansion board. Board is in correct orientation.
        - Firmware: I am updated to the latest version. I had some success restoring to factory firmware, but then lost ability again to program and updated to latest again.
        - Serial: Also tried VS Code, PuTTY, and Python 2.7's serial module, all of which I was successful with before any issues began. I am using the correct baud rate, and port, and have the latest drivers installed.
        - Telnet: Tried with Mac OSX Laptop and with iPhone (SSH Client Free app). I get a response, but still cannot type. I am simply left with this response and no '>>>' for entering commands:

        MicroPython v1.8.6-776-gd0a46cd on 2017-09-29; SiPy with ESP32
        Login as: Password:
        Login succeeded!
        Type "help()" for more information
        

      I may post this in another part of the discussion board as well, since there seems to be more support for LoPy, and the issue is not necessarily just for SiPy.

      TL;DR my SiPy connects to and is recognized by my computer, but I cannot program it.

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

        @choco this may sound silly, but have you tried Ctrl-C? While your boot.py/main.py is running, REPL is not available unless you terminate the currently running script.

        1 Reply Last reply Reply Quote 0
        • C Offline
          choco
          last edited by choco

          Ctrl-C does nothing as well (and I have my project and global settings marked true for Ctrl-C on Connect). The REPL is entirely locked and unresponsive. When I open Atom, this is what I see:

          Connecting on COM23...         # I open Atom
          Cancelled                      # I hit "reconnect" after a while
          Connecting on COM23...
          > Failed to connect (Error: Port is not open). Click here to try again.    # Same line twice
          > Failed to connect (Error: Port is not open). Click here to try again.
          []    # Flashing cursor
          

          Device manager shows USB Serial Port 23 as active when I plug the SiPy in, and it disappears when I remove it. Further, if I open a session in PuTTY, though I cannot issue any commands, when I close out of PuTTY, I get a dialog box asking if I want to close the session.

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

            @choco The serial connection is independent from the SiPy, since it is provided by the USB/UART bridge, which works, even when the SiPy is silent. What confuses me is that you see the splash screen of MicroPython, but no >>> prompt. Could you try ro erase flash and then re-load the firmware. For erasing you need esptool.py, which is in the subdirectory of the updater software. And then, in a command window, run:
            python3 esptool.py --port COM23 erase_flash

            C 1 Reply Last reply Reply Quote 0
            • C Offline
              choco @robert-hh
              last edited by choco

              @robert-hh I'm on Windows, but I got this output:

              ...\Pycom Firmware Update\Upgrade\bin> esptool.py --port COM23 erase_flash
              esptool.py v2.0-beta1
              Connecting................................................
              
              A fatal error occurred: Failed to connect to Espress if device: Timed out waiting for packet header
              
              J 1 Reply Last reply Reply Quote 0
              • J Offline
                jcaron @choco
                last edited by

                @choco IIRC you need to be in upgrade mode (connect P23-GND on boot) to use esptool.

                1 Reply Last reply Reply Quote 0
                • C Offline
                  choco
                  last edited by

                  @jcaron It worked! My bad. Didn't even think about that. I erased flash memory and uploaded most recent firmware. Thank you @robert-hh as well.

                  For the future, are there any best practices for connecting/disconnecting, from both a hardware and software standpoint. e.g. my boot.py file:

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

                  Should I include anything else?

                  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