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

    PyGate & Lopy4 - cannot connect via serial after firmware update

    Scheduled Pinned Locked Moved Issues & Bugs
    3 Posts 3 Posters 99 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
      Deon George
      last edited by

      Hi, I just received my PyGate & Lopy4 - installed Pymakr 1.1.15 into visual studio and confirmed everything worked OK. (I am on a MAC).

      I ran the test code that found somewhere that changed the LED' to different colors and everything was working well.

      Since I read on the website to install the pygate firmware - I ran the Firmware updater to update to the pygate firmware - and access via visual studio stopped. This is all I see - no enter or any key gives me the mikropython prompt.

      (But I do see the LED flashing blue indicating that the board is running OK)

      Searching for PyCom boards on serial...
      Connecting to /dev/tty.usbmodemPy4b69761...
      

      (If I disconnect the USB I do see

      Previous board is not available anymore
      Failed to connect (Error: Port is not open). Click here to try again
      

      So I flashed with the pygate-development firmware - and same result - no response to serial input.

      So I flashed with the pybates firmware - again same result - no response to serial input.

      So I thought I might have needed to update the pygate firmware, and did so successfully with DFU:

      Claiming USB DFU Interface...
      Setting Alternate Setting #0 ...
      Determining device status: state = dfuIDLE, status = 0
      dfuIDLE, continuing
      DFU mode device DFU version 0100
      Device returned transfer size 64
      Copying data from PC to DFU device
      Download        [=========================] 100%        16384 bytes
      Download done.
      state(2) = dfuIDLE, status(0) = No error condition is present
      Done!
      

      And re-tried flashing with the different firmware - and while the flashing appears to be successful, I still cannot connect to the board via serial.

      I also tried putting in a "token" for the pybytes registration, and it only reports None as soon as I paste in the token, but it never appears in pybytes.

      What am I doing wrong? Where do I go from here?

      Thanks.

      I 1 Reply Last reply Reply Quote 0
      • I Offline
        Ian Lewis @Deon George
        last edited by

        @Deon-George I think trying to stay in VS Code or Atom (i.e. Pymakr) and diagnose USB-serial connectivity issues is going to be an uphill struggle. Someone familiar with Mac's should be able to tell you the terminal shell commands that will help you find out what the Mac OS thinks is the status of the connected Pycom hardware.

        E.g. on Linux (Ubuntu 20.04), the lsusb command shows my two connected Pycom boards (Expansion3, Pysense):

        Bus 002 Device 003: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
        ... more entries
        Bus 002 Device 002: ID 2109:8110 VIA Labs, Inc. Hub
        Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
        Bus 001 Device 004: ID 0461:4e22 Primax Electronics, Ltd 
        Bus 001 Device 003: ID 413c:2010 Dell Computer Corp. Keyboard
        Bus 001 Device 032: ID 04d8:ef98 Microchip Technology, Inc. Expansion3
        Bus 001 Device 033: ID 04d8:f012 Microchip Technology, Inc. Pysense
        Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        

        ls -l /dev/serial/by-id shows the 'serial' devices:

        total 0
        lrwxrwxrwx 1 root root 13 Nov  1 16:51 usb-Pycom_Expansion3_Pyf6d582-if00 -> ../../ttyACM1
        lrwxrwxrwx 1 root root 13 Nov  1 17:03 usb-Pycom_Pysense_Pya15b33-if00 -> ../../ttyACM0
        

        udevadm info --query all --name /dev/ttyACM0 shows device data:

        N: ttyACM0
        L: 0
        S: serial/by-id/usb-Pycom_Pysense_Pya15b33-if00
        S: serial/by-path/pci-0000:00:14.0-usb-0:1:1.0
        E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/tty/ttyACM0
        E: DEVNAME=/dev/ttyACM0
        E: MAJOR=166
        E: MINOR=0
        E: SUBSYSTEM=tty
        E: USEC_INITIALIZED=263961387106
        E: ID_BUS=usb
        E: ID_VENDOR_ID=04d8
        E: ID_MODEL_ID=f012
        E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
        E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
        E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
        E: ID_VENDOR_FROM_DATABASE=Microchip Technology, Inc.
        E: ID_MODEL_FROM_DATABASE=100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
        E: ID_VENDOR=Pycom
        E: ID_VENDOR_ENC=Pycom
        E: ID_MODEL=Pysense
        E: ID_MODEL_ENC=Pysense
        E: ID_REVISION=0010
        E: ID_SERIAL=Pycom_Pysense_Pya15b33
        E: ID_SERIAL_SHORT=Pya15b33
        E: ID_TYPE=generic
        E: ID_USB_INTERFACES=:020200:0a0000:
        E: ID_USB_INTERFACE_NUM=00
        E: ID_USB_DRIVER=cdc_acm
        E: ID_USB_CLASS_FROM_DATABASE=Communications
        E: ID_PATH=pci-0000:00:14.0-usb-0:1:1.0
        E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_1_1_0
        E: ID_MM_CANDIDATE=1
        E: DEVLINKS=/dev/serial/by-id/usb-Pycom_Pysense_Pya15b33-if00 /dev/serial/by-path/pci-0000:00:14.0-usb-0:1:1.0
        E: TAGS=:systemd:
        

        From the above (or equivalent for Mac) you get an idea whether the board is connecting ok via USB (it probably is, as the pycom-fwtool is working ok - note this will likely NOT work for the current 1.20.2.r6 firmware unless you do a 'install local file').

        python -m serial.tools.miniterm /dev/ttyACM0 115200 tries a basic serial i/o connection to the device (if you don't see the REPL prompt, try Ctrl-C i.e. KeyboardInterrupt):

        --- Miniterm on /dev/ttyACM0  115200,8,N,1 ---
        --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
        Traceback (most recent call last):
          File "main.py", line 112, in <module>
        KeyboardInterrupt: 
        Pycom MicroPython 1.20.2.r4 [v1.11-ffb0e1c] on 2021-01-12; LoPy4 with ESP32
        Pybytes Version: 1.6.1
        Type "help()" for more information.
        >>> 
        

        With the miniterm connected, you can see what streams out of the serial port when you hit the reset button on the board.

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jeremy Dahan
          last edited by

          I actually have the same problem with my Lopy4 and Pytrack boards.
          I updated the firmware on both and lost serial access.
          By downgrading to 1.20.1 I can get serial back, but upgrading to a version above 1.20.1.r1 (included) breaks serial.
          I did try 1.20.2.x versions, including 1.20.2.r6 and I also tried using development versions (1.20.3.x).
          I also tried with the "Erase during update" option.
          Only downgrading to 1.20.1 has worked so far.

          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