Can not connect to LoPy over serial
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?
@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.
@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.
@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?
dit you tied with different cable?
for checking firmware version call