Other terminal programs
If you do not use the MicroPython Terminal in XCTU, you can use other terminal programs to communicate with the XBee Cellular Modem. If you use Microsoft Windows, follow the instructions for Tera Term, if you use Linux, follow the instructions for picocom. To download these programs:
- Tera Term for Windows. See https://ttssh2.osdn.jp/index.html.en.
-
PuTTY for Windows
- Picocom for Linux. See https://developer.ridgerun.com/wiki/index.php/Setting_up_Picocom_-_Ubuntu and for the source code and in-depth information https://github.com/npat-efault/picocom.
Tera Term for Windows
With the XBee Cellular Modem in MicroPython mode (AP = 4), you can access the MicroPython prompt using a terminal.
- Open Tera Term. The Tera Term: New connection window appears.
-
Click the Serial radio button to select a serial connection.
- From the Port: drop-down menu, select the COM port that the XBee Cellular Modem is connected to.
- Click OK. The COMxx - Tera Term VT terminal window appears and Tera Term attempts to connect to the device at a baud rate of 9600 b/s.
- Click Setup and Serial Port. The Tera Term: Serial port setup window appears.
- In the Tera Term: Serial port setup window, set the parameters to the following values:
- Port: Shows the port that the XBee Cellular Modem is connected on.
- Baud rate: 9600
- Data: 8 bit
- Parity: none
- Stop: 1 bit
- Flow control: hardware
- Transmit delay: N/A
-
Click OK to apply the changes to the serial port settings. The settings should go into effect right away.
-
To verify that local echo is not enabled and that extra line-feeds are not enabled:
-
In Tera Term, click Setup and select Terminal.
- In the New-line area of the Tera Term: Serial port setup window, click the Receive drop-down menu and select CR if it does not already show that value.
- Make sure the Local echo box is not checked.
-
- Click OK.
- Press Ctrl+B to get the MicroPython version banner and prompt.
Now you can type MicroPython commands at the >>> prompt.
Use picocom in Linux
With the XBee Cellular 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 Cellular Modem is connected to in order to communicate with the device.
- Open a terminal in Linux and type picocom -b 9600 /dev/ttyUSB0. This assumes you have no other USB-to-serial devices attached to the system.
- 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:
- Before attaching the XBee Cellular 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.
- Take note of the devices present with that name, and then connect the XBee Cellular Modem.
- Check the directory again and you should see one additional device, which is the XBee Cellular Modem.
- In this case, replace /dev/ttyUSB0 at the top with /dev/ttyUSB<number>, where <number> is the new number that appeared.
- It should connect and show Terminal ready.
Now you can type MicroPython commands at the >>> prompt.