Data Sheet

09Version 1.0
8.0 Programmingthedevice
8.1 UART
By default, the modules run an interactive python REPL
on UART0 which is connected to P0 (RX) and P1 (TX)
running at 115200 baud. The easiest way to connect to
the LoPy4 is via our expansion board, but any USB UART
adapter will suce. Code can be run via this interactive
REPL or you can use our PyMakr plugin for Atom or Visual
Studio Code to upload code to the board.
8.2 Wi–Fi
By default, the LoPy4 also acts as a Wi–Fi access point.
SSID: lopy4–wlan–XXXX
Password: www.pycom.io
Once connected to the LoPy4’s Wi–Fi network you can
access it in two ways.
8.2.1 Telnet
Running on port 23 is a telnet server. This acts in a
very similar way to the UART. It presents you with an
interactive REPL and can also be used to upload code via
PyMakr.
8.2.2 FTP
The LoPy4 also runs a FTP server that allows you to copy
les to and from the device, include an SD card if one is
connected. To connect to this FTP server, you need to use
plain FTP (un–encrypted) with the following credentials:
User: micro
Password: python
9.0 Bootmodes
9.1 Bootloadermode
In order to update the rmware of the LoPy4 device, it
needs to be placed into bootloader mode. In order to
do this, P2 needs to be connected to ground when the
device reboots. Once in bootloader mode you can use
the Pycom rmware update tool to update to the latest
ocial rmware. If you are developing your own rmware
based on our open–source rmware, a ashing script is
provided with the source code.
9.2 Safeboot
The micropython rmware features a safe boot feature
that skips the boot.py and main.py scripts and goes
straight to the REPL. This is useful if the device is
programmed with code that causes the device to crash or
become inaccessible. To access this mode, you need to
connect P12 to 3.3V and reset the device. Upon entering
safe boot mode, the on–board LED will begin to blink
orange. Depending on the duration the pin is held at 3.3V,
a different rmware will be run.
Table 3 – Boot modes
0–3Seconds 3–6Seconds
Current rmware without running
boot.py or main.py
Previous rmware if the rmware was uploaded via OTA
(without running boot.py and main.py)