Using 86ComSh (on 86Duino EduCake’s RS232 Port)

This application note provides information about using 86ComSh on an 86Duino EduCake to enable FreeDOS console redirection through the RS232 serial port.

1. 86ComSh Introduction

Inherited from FreeDOS, you can enable the Console Redirection feature on DuinOS using 86ComSh with MODE and CTTY. The 86ComSh executable is developed using the 86Duino DOS SDK. You can find the 86ComSh executable binary under the \TOOLS folder and its source code under the \TOOLS\SRC\86ComSh folder (From the \TOOLS\SRC\86ComSh folder, you can launch the make command to compile and generate 86ComSh executable binary). MODE is an external command for DuinOS (FreeDOS), to configure system settings. CTTY is an internal command for DuinOS (FreeDOS), to configure default system I/O.

When launching 86ComSh, a command line parameter is needed to designate a serial port for the session, such as 1 to use Serial1 (COM1). After 86ComSh is launched, you can use the MODE and CTTY commands to configure DuinOS (FreeDOS) console redirection settings. The 86ComSh.BAT batch file, comes with DuinOS, include command line with parameters to launch and configure console redirection.

DuinOS (FreeDOS) console redirection has some limitation, such as not able to support application with graphical interface. Avoid launching application through console redirection that uses the same serial port allocated to support console redirection, to avoid conflict and unpredictable result.

2. Enable Console Redirection at Boot-up

You can modify AUTOEXEC.BAT batch file to enable console redirection at boot-up, as follow:

Attach a MicroSD configured with DuinOS to your development workstation through an USB-to-MicroSD adapter

sd_reader

Open the AUTOEXEC.BAT batch file with Notepad or text editor.

sd_reader

Locate the line of code CALL TOOLS\86UsbSh.BAT and add REM to the beginning of the line (if it’s not already there).

sd_reader

Locate the line of code CALL TOOLS\86ComSh.BAT and delete the REM at the beginning of the line.

change the command line parameters to 4 and 1152, as CALL TOOLS\86ComSh.BAT 4 1152.

The “4” parameters configure the console redirection through the EduCake’s RS232 serial port.

sd_reader

Save all changes to the AUTOEXEC.BAT file.

3. Using Console Redirection

You need an USB-to-RS232 adapter and a RS232-to-RS232 null modem cables to establish Serial (RS232) connectivity between the development PC and serial port on teh 86Duino EduCake.

sd_reader

sd_reader

Attached the USB-to-RS232 adapter cable to the 86Duino EduCake with an RS-232 to RS232 null modem adapter, as shown below:

sd_reader

Attached the USB side of the USB-to-RS232 adapter to the development PC, as shown below:

sd_reader

Note: In the above figure, there is a separate USB-to-MicroUSB cable attached to the 86Duino EduCake, to power the EduCake.

Assuming device driver for the USB-to-RS232 adapter is installed, from the Device Manager, under the “COM and LPT” node, you can find an entry for the USB-to-RS232 adapter and its assigned serial port name. For this exercise, COM11 is the serial port assigned to the USB-to-RS232 adapter.

sd_reader

For the example here, we use PuTTY as the console redirection terminal, setting the serial line to COM11, communication speed to 115200 and connection type to Serial, as shown below.

sd_reader

From the PuTTY configuration screen, after clicking on Open to establish connection, you can see a command prompt screen with “C:\” showing, a DOS screen from 86Duino via console redirection.

From this screen, you can enter DOS command, such as dir to execute on 86Duino.

sd_reader

After executing the “dir” command, you can see output from the command redirect to the PuTTY terminal screen, as shown below.

sd_reader


Hacking

The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.