Using 86UsbSh
This application note provides information showing how to use 86UsbSh to enable connectivity between a PC and 86Duino using an USB-to-MicroUSB adapter, interacting with DuinOS using DOS command.
1. 86UsbSh Introduction
86UsbSh is an USB DOS shell application designed specifically for the 86Duino platform to remotely execute DOS command via a client PC connecting to an 86Duino device running DuinOS, through an USB connection. The 86UsbSh executable is developed using the 86Duino DOS SDK. You can find the 86UsbSh executable binary under the \TOOLS folder and its source code under the \TOOLS\SRC\86UsbSh folder. From the \TOOLS\SRC\86UsbSh folder, you can launch the make
command to compile and generate the 86UsbSh executable.
When executing DOS command on an 86Duino device via 86UsbSh, the stdout output from the DOS command is redirected to the Z:\tmp.txt file. After the completing the DOS command, contents from the Z:\tmp.txt file are transmitted to the client PC connecting to the 86Duino device via 86UsbSh.
(Note: the Z: drive is a RAM disk created by DuinOS during startup. If the Z: is deleted, the 86UsbSh utility will fail to function as expected.)
86UsbSh is limited to support command line program, does not support program with graphical interface and does not support program that requires interaction with keyboard. In addition, when you execute program through 86UsbSh that access USB device (such as calling 86Duino’s Serial.print()
function), it may conflict with 86UsbSh and create unpredictable result.
2. Enable 86UsbSh at Boot-up
By default, DuinOS is configured to enable 86UsbSh at Boot-up, with an entry in the AUTOEXEC.BAT batch file to call the TOOLS\86UsbSh.BAT batch file which in turn launch 86UsbSh. If the DuinOS you are using does not have the necessary entry to launch 86UsbSh, go through the following steps to modify AUTOEXEC.BAT:
Attach a MicroSD configured with DuinOS to your development workstation through an USB-to-MicroSD adapter.
Open the AUTOEXEC.BAT batch file with Notepad or text editor.
Insert the CALL TOOLS\86UsbSh.BAT
to AUTOEXEC.BAT, as follow:
To prevent the system from launching 86UsbSh during boot-up, you can add REM
at the beginning of the CALL TOOLS\86UsbSh.BAT
3. Using 86UsbSh
Attach the 86Duino device to you development workstation using an USB-to-MicroUSB adapter:
Launch 86Duino Coding IDE and select an appropriate COM Port.
Launch Serial Port Monitor.
Launch a DOS command, such as dir
to show the current directory’s contents
Press Enter to see the output from the command, as shown below.
Leaving 86UsbSh in two ways:
1. Launch quit
command and press Send
2. Use keyboard(connect to 86Duino) input q
and press Enter
The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.