
Get started with MicroPython
Use the MicroPython Terminal in XCTU
Digi XBee3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
66
6. Note what COM port(s) the XBee Smart Modem is using, because you will need this information
when you use terminal communication. The
Radio Modules
information panel lists the COM
port in use.
Use the MicroPython Terminal in XCTU
You can use the MicroPython Terminal to communicate with the XBee Smart Modem when it is in
MicroPython mode.
1
This requires XCTU 6.3.7 or higher. To enter MicroPython mode, follow the steps
in
Use XCTU to enter the MicroPython environment
. To use the MicroPython Terminal:
1. Click the
Tools
drop-down menu
and select
MicroPython Terminal
. The terminal opens.
2. Click
Open
. If you have not already added devices to XCTU:
a. In the
Select the Serial/USB port
area, click the COM port that the device uses.
b. Verify that the baud rate and other settings are correct.
3. Click
OK
. The
Open
icon changes to
Close
, indicating that the device is properly connected.
4. Press
Ctrl
+
B
to get the MicroPython version banner and prompt.
You can now type or paste MicroPython commands at the
>>>
prompt.
Troubleshooting
If you receive
No such port: 'Port is already in use by other applications.'
in the
MicroPython
Terminal
close any other console sessions open inside XCTU and close any other serial terminal
programs connected to the device, then retry the MicroPython connection in XCTU.
If the device seems unresponsive, try pressing
Ctrl+C
to end any running programs.
You can use the
+++
escape sequence and look for an
OK
for confirmation that you have the correct
baud rate.
Example: hello world
Before you begin, you must have previously added a device in XCTU. See
1. At the MicroPython
>>>
prompt, type the Python command:
print("Hello, World!")
2. Press
Enter
to execute the command. The terminal echos back
Hello, World!
.
Example: turn on an LED
1. Note the
DS4
LED on the XBIB board. The following image highlights it in a red box. The LED is
normally off.
1
See
if you do not use the MicroPython Terminal in XCTU.