Tera Term (rarely TeraTerm) is an open-source, free, software implemented, terminal emulator (communications) program. It emulates different types of computer terminals, from DEC VT100 to DEC VT382. It supports telnet, SSH 1 & 2 and serial port connections. It also has a built-in macro scripting language and a few other useful plugins. TeraTerm defaults to setting the baud rate at 9600 bps (8-N-1). If you need to adjust the serial settings, go up to Setup Serial Port. You'll see a window pop up with a lot of familiar looking serial port settings. Adjust what you need to and hit 'OK'.

You are viewing documentation for version: 2.0 (latest) | Version History

The fastest way get started with the RS9116 EVK and WiSeConnect™ is to use a PC with a terminal application such as Tera Term.To get started with a microcontroller instead, see Getting Started with a Microcontroller

Using AT-Commands and a Tera Term example script, your EVK will be connected to a wireless network in minutes.

There's just a few steps involved:

To get started with app development on a host MCU using the RS9116 Simple API (SAPI), refer to Using RS9116W with STM32.

Download WiSeConnect™

STEP 1.Download the WiSeConnect™ Software Driver Package
STEP 2. Unzip the software package to the PC location of your choice.

Note! If you experience a Path too long error during the unzip process you should change the PC location to reduce the base path length or use 7-Zip to uncompress the software package.

Additional Software Requirements

The terminal program Tera Term is required to complete the steps in this guide. Other terminal programs can be used to control the RS9116W however the example scripts used in this guide will only work with Tera Term. Download Tera Term for PC.

Parallel Port

Connect the EVK

STEP 1. Connect the EVK to a PC using the USB interface labeled UART as identified below. There are several USB interfaces on the RS9116 EVK however, for the purposes of basic evaluation using a PC, only the UART port is required.

NOTE! There are several version of the RS9116 EVK. Your EVK may look slightly different than the image above but the steps in this guide will remain the same.

STEP 2. If this is the first time connecting the EVK to your PC, verfy that it is properly detected by the PC. The EVK will appear to the PC as a COM port labeled USB Serial Port (COMx). If the EVK is not properly detected you may need to download and install the FTDI Virtual COM Port (VCP) driver.

STEP 3. Configure your terminal application with the following settings:

  • Configure the serial port settings to 115200 baud / 8-bit data / No parity / 1 stop bit
  • Enable local echo
  • Set receive and transmit new-line characters to CR+LF

See, Tera Term setup instructions.

Load the RS9116W Firmware

The RS9116W firmware must be loaded from flash into the device upon power-up or reset. This action is performed via the bootloader menu as described in the following steps.

STEP 1. After power-up or reset, enter the bootloader as follows (this sequence sends the key combination |U).

  • press and hold Shift
  • press then release | (the 'vertical line' or 'pipe' character)
  • press then release u
  • release Shift

The console displays the bootloader menu after the characters |UU (highlighted in yellow) in the following example.

Note! The bootloader menu does not appear automatically on boot because the device waits to perform Auto Baud Rate Detection (ABRD). The character sequence Shift + | followed by Shift + u initiates ABRD causing the device to enter bootloader mode. For more details on ABRD and the bootloader, see the RS9116W Programming Reference Manuals.

STEP 2. Press 1 to load the default firmware. The console displays Loading.. followed by Loading Done as shown in the following example. Note that the yellow highlighted 1 is shown twice because both Tera Term and the RS9116 bootloader echo any character typed.

Note!

  • The bootloader automatically loads the default firmware after 20 seconds if a selection is not made.
  • If the console only displays Loading.. without Loading Done, the device may be in legacy binary mode. See, Switching between legacy binary mode and AT-command mode.
  • The device can be configured in 'Bootloader Bypass Mode' as described in the RS9116W Programming Reference Manuals.

STEP 3. Query the version of the firmware by typing the command at+rsi_fwversion? as shown by the yellow text in the following console example.

STEP 4. If the reported firmware version is older than the latest version available in the firmware directory of the WiSeConnect software package, we strongly suggest updating to the latest firmware. For update instructions see, Updating the RS9116W EVK Firmware

Run Tera Term Example Scripts

The WiSeConnect™ software package includes several Tera Term example scripts that use AT-Commands to demonstrate basic RS9116W functionality. The scripts are found in the WiSeConnect™ software package in the folder RS9116.NB0.WC.GENR.OSI.x.x.xxutilsscriptsteraterm_ttl_scripts

Tera Term Example Scripts

NameFilenamePurpose
Wi-Fi Stationstation_mode.ttlDemonstrates connecting to a Wi-Fi access point in station mode.
Wi-Fi Soft APap_mode.ttlDemonstrates setting up the device as a Wi-Fi Access Point and connecting to it from another mobile phone or PC
Wi-Fi Enterprise Authenticationwlan_eap_peap_station.ttlDemonstrates connecting to a Wi-Fi access point in station mode using enterprise authenticarion
Wi-Fi Low Powerlow_power_standby_associated_wifi_station .ttlConfigures the device in a low-power mode allowing the user to measure and evaluate the low-power consumption of the device
Wi-Fi Low Power + BLElow_power_standby_associated_wifi_station_and_ble_advertising.ttlDemonstrates WLAN Station standby associated power save functionality along with BLE advertising
BLE Centralble_central.ttlDemonstrates setting up the device as a BLE Central
BLE Peripheralble_preipheral.ttlDemonstrates setting up the device as a BLE Peripheral
BT SPP Masterspp_master.ttlDemonstrates setting up the device as a Bluetooth Serial Port Profile (SPP) master
BT SPP Slavespp_slave.ttlDemonstrates setting up the device as a Bluetooth Serial Port Profile (SPP) slave
Firmware Update over Wi-Fifw_upgrade_over_wifi.ttlDemonstrates how to update firmware via Wi-Fi

The following text describes how to run the Wi-Fi Station Mode script. For a description of each of the other scripts, refer to the RS9116W EVK User's Guide

Wi-Fi Station Mode

Before continuing, ensure the RS9116 EVK is plugged into your computer and TeraTerm is connected.

STEP 1. Reset the RS9116 EVK, then in the Tera Term menu select Control->Macro.

STEP 2. Navigate to the folder ./RS9116.NB0.WC.GENR.OSI.x.x.xx/utils/scripts/teraterm_ttl_scripts which contains the example scripts and select the file station_mode.ttl`.

STEP 3. Follow the prompts provided by the script.

STEP 4. Select the Wi-Fi frequency band (0 = 2.4 GHz, 1 = 5GHz, 2 = Dual Band). Note that single band EVK's only support the 2.4GHz frequency band.

STEP 5. Enter the network name (SSID) of the Wi-Fi access point you wish to connect to.

STEP 6. Enter the password of the access point you wish to connect to.

STEP 7. After successfully joining the network, several status boxes are displayed. Take note of the IP address and port # displayed, this information will be used in the following steps**.

The following steps assume the EVK and the PC are connected to the same Wi-Fi access point! If that is not the case, then you can alternately use a different computer and telnet application that is connected to the same network as the EVK.

STEP 8. In the Tera Term menu, select File->New Connection.. then enter the IP address of the EVK, select the Telnet service and enter the TCP port #.

STEP 9. A new Tera Term window opens with a TCP connection to the device. Commands typed in the new window appear in the UART console as shown below.

Miniterm¶

Miniterm is now available as module instead of example.see serial.tools.miniterm for details.

miniterm.py
The miniterm program.
setup-miniterm-py2exe.py
This is a py2exe setup script for Windows. It can be used to create astandalone miniterm.exe.

TCP/IP - serial bridge¶

This program opens a TCP/IP port. When a connection is made to that port (e.g.with telnet) it forwards all data to the serial port and vice versa.

This example only exports a raw socket connection. The next examplebelow gives the client much more control over the remote serial port.

  • The serial port settings are set on the command line when starting theprogram.
  • There is no possibility to change settings from remote.
  • All data is passed through as-is.
tcp_serial_redirect.py
Main program.

Single-port TCP/IP - serial bridge (RFC 2217)¶

Simple cross platform RFC 2217 serial port server. It uses threads and isportable (runs on POSIX, Windows, etc).

Teraterm Script Serial Port Chester

  • The port settings and control lines (RTS/DTR) can be changed at any timeusing RFC 2217 requests. The status lines (DSR/CTS/RI/CD) are polled everysecond and notifications are sent to the client.
  • Telnet character IAC (0xff) needs to be doubled in data stream. IAC followedby another value is interpreted as Telnet command sequence.
  • Telnet negotiation commands are sent when connecting to the server.
  • RTS/DTR are activated on client connect and deactivated on disconnect.
  • Default port settings are set again when client disconnects.

New in version 2.5.

Serial Port Rs-232

rfc2217_server.py
Main program.
setup-rfc2217_server-py2exe.py
This is a py2exe setup script for Windows. It can be used to create astandalone rfc2217_server.exe.

Multi-port TCP/IP - serial bridge (RFC 2217)¶

This example implements a TCP/IP to serial port service that works withmultiple ports at once. It uses select, no threads, for the serial ports andthe network sockets and therefore runs on POSIX systems only.

  • Full control over the serial port with RFC 2217.
  • Check existence of /tty/USB0..8. This is done every 5 seconds usingos.path.exists.
  • Send zeroconf announcements when port appears or disappears (usespython-avahi and dbus). Service name: _serial_port._tcp.
  • Each serial port becomes available as one TCP/IP server. e.g./dev/ttyUSB0 is reachable at <host>:7000.
  • Single process for all ports and sockets (not per port).
  • The script can be started as daemon.
  • Logging to stdout or when run as daemon to syslog.
  • Default port settings are set again when client disconnects.
  • modem status lines (CTS/DSR/RI/CD) are not polled periodically and the servertherefore does not send NOTIFY_MODEMSTATE on its own. However it responds torequest from the client (i.e. use the poll_modem option in the URL whenusing a pySerial client.)
Teraterm Script Serial Port

Teraterm Script Serial Port Replicator

Requirements:

  • Python (>= 2.4)
  • python-avahi
  • python-dbus
  • python-serial (>= 2.5)

Teraterm Macro Command

Teraterm script commands

Installation as daemon:

Komik fruit basket bahasa indonesia kelas 1

  • Copy the script port_publisher.py to /usr/local/bin.
  • Copy the script port_publisher.sh to /etc/init.d.
  • Add links to the runlevels using update-rc.dport_publisher.shdefaults99
  • That’s it :-) the service will be started on next reboot. Alternatively runinvoke-rc.dport_publisher.shstart as root.

New in version 2.5: new example Lynda php with mysql essential training exercise files download.

port_publisher.py
Multi-port TCP/IP-serial converter (RFC 2217) for POSIX environments.
port_publisher.sh
Example init.d script.

wxPython examples¶

A simple terminal application for wxPython and a flexible serial portconfiguration dialog are shown here.

wxTerminal.py
A simple terminal application. Note that the length of the buffer islimited by wx and it may suddenly stop displaying new input.
wxTerminal.wxg
A wxGlade design file for the terminal application.
wxSerialConfigDialog.py
A flexible serial port configuration dialog.
wxSerialConfigDialog.wxg
The wxGlade design file for the configuration dialog.
setup-wxTerminal-py2exe.py
A py2exe setup script to package the terminal application.

Unit tests¶

The project uses a number of unit test to verify the functionality. They allneed a loop back connector. The scripts itself contain more information. Alltest scripts are contained in the directory test.

The unit tests are performed on port loop:// unless a different devicename or URL is given on the command line (sys.argv[1]). e.g. to run thetest on an attached USB-serial converter hwgrep://USB could be used orthe actual name such as /dev/ttyUSB0 or COM1 (depending on platform).

Ps/2 Port

run_all_tests.py
Collect all tests from all test* files and run them. By default, theloop:// device is used.
test.py
Basic tests (binary capabilities, timeout, control lines).
test_advanced.py
Test more advanced features (properties).
test_high_load.py
Tests involving sending a lot of data.
test_readline.py
Tests involving readline.
test_iolib.py
Tests involving the io library. Only available for Python 2.6 andnewer.
test_url.py
Tests involving the URL feature.