Get started with MicroPython
Use picocom in Linux
Digi XBee3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
70
Now you can type MicroPython commands at the
>>>
prompt.
Use picocom in Linux
With the XBee Smart Modem in MicroPython mode (
AP
=
4
), you can access the MicroPython prompt
using a terminal.
Note
The user must have read and write permission for the serial port the XBee Smart Modem is
connected to in order to communicate with the device.
1. Open a terminal in Linux and type
picocom -b 115200 /dev/ttyUSB0
. This assumes you have
no other USB-to-serial devices attached to the system.
2. Press
Ctrl
+
B
to get the MicroPython version banner and prompt. You can also press
Enter
to
bring up the prompt.
If you do have other USB-to-serial devices attached:
1. Before attaching the XBee Smart Modem, check the directory
/dev/
for any devices named
ttyUSBx
, where
x
is a number. An easy way to list these is to type:
ls /dev/ttyUSB*
. This
produces a list of any device with a name that starts with
ttyUSB
.
2. Take note of the devices present with that name, and then connect the XBee Smart Modem.
3. Check the directory again and you should see one additional device, which is the XBee Smart
Modem.
4. In this case, replace
/dev/ttyUSB0
at the top with
/dev/ttyUSB<number>
, where
<number>
is the new number that appeared.
5. It should connect and show Terminal ready.