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

    Can not connect to LoPy over serial

    Scheduled Pinned Locked Moved LoPy
    5 Posts 3 Posters 2.8k 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.
    • M Offline
      MariusW
      last edited by MariusW

      Hi.

      Up until today I could connect to the LoPy over serial.

      I have tried using mpfshell which after a long while gives me the error "could not enter raw repl".
      Pymakr initially shows a connection over serial, but when trying to run code I get an error saying a friendly repl couldn't be started.
      The stand alone update tool cannot get a connection either.

      I can get a repl over telnet. By doing this I have tried formatting the file system, but it didn't help.
      boot.py contains the default settings
      Not sure what firmware I am running, but it was updated about a week ago.

      Any ideas on what I can try to do?

      -Marius

      L 1 Reply Last reply Reply Quote 0
      • L Offline
        livius @MariusW
        last edited by

        @MariusW
        dit you tied with different cable?

        for checking firmware version call
        os.uname()

        think about people first, then computers

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          MariusW @livius
          last edited by

          @livius Haven't checked the firmware yet, but I have tried with a different lopy with same firmware. Connected immidiately. Is it safe to say the LoPy's serial connection is dead somehow?

          1 Reply Last reply Reply Quote 0
          • W Offline
            WaveJunkie
            last edited by

            @MariusW I ran into that yesterday when setting up an additional new LoPy and Expansion board that had yet to be used. It responded in Pymakr with the 0.90b firmware from the factory. I used the Firmware update tool to try to put a new build of firmware since 1.5.1b1 was just released. The upgrade had done nothing for an hour "downloading" so I canceled it. I tried to get the firmware update tool to work and found it was having problems with the pycom.io site. So I manually updated the firmware, that's when I noticed it locked me out of the serial REPL. 8-(

            I tried the following procedures....

            • [Check Serial Port, Baud Rate & REPL Enablement] It is possible to have 115200 at firmware console boot, but have a different one for REPL. Look at your boot.py (listed below) for the settings to enable REPL serial access @ 115200 Baud. Also with so many usb dev boards and adapters double check which serial port it is actually using to communicate.

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

            • [Safe Mode] Tried booting to safe mode with Primary, Secondary and Factory firmware. Unfortunately the firmware seemed to ignore the settings in boot.py for enabling serial console REPL access. However I was able to connect via Wifi and get to the telnet REPL.

            • [Reload FS] If you can access REPL via telnet and you have copies of your project saved, I would just go ahead and wipe the filesystem using the REPL command as shown below. Once completed I would FTP a clean/good backup of flash directory and all subfolders back on to the LoPy.

              import os
              os.mkfs('/flash')

            • [Manual Firmware Update] The process did indeed work to put a newer firmware on the board but it requires you to download the firmware seperately. I put 1.3.0b1 firmware on it (as it was the newest version on the support page) and loaded a test app.

            • [Change Serial Adapter] I was using the Pycom Expansion Board 1.0 and LoPy combination for the first time. Thinking it might be a flow control issue I disabled RTS/CTS using the boards jumpers and still no REPL. Previously I had been using Microcenter FTDI adapters with breadboards for the other LoPy setups.

            I reconfigured the new LoPy using the FTDI setup. I was able to download the Latest firmware update tool ( 1.1.0b1 then 1.1.1b1 ) and flash the latest version. Magically I was able to get REPL working. It seemed like it was an issue with the expansion board but there were multiple things going wrong with pycom.io and related services at the time. I am using 3v power and logic from the FTDI adapter so I am not sure why it would do that.

            -WaveJunkie

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              MariusW @WaveJunkie
              last edited by

              @WaveJunkie Thank you for your very comprehensive answer.

              Many of the things you mentioned, I have already tried.
              As previously mentioned I tried with a different lopy using the same computer and cable, and that worked. After that I thought the lopy was dead. However, after a friend wanted to try it on his computer it worked. In disbelief i reconnected it to my computer again and it worked there as well all of a sudden.

              I have no idea what happened, but I won't complain as I am up and running again :)

              Thanks again for taking your time to answer.

              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