MODE Command
The MODE command is rarely used and has one specific purpose. It controls whether or not the RS-232 (COM) port at the bottom of the JNIOR next to the LAN port is to be used for boot messages and command line interaction.
Issue the MODE command without parameters and it will display the current status of the “diagnostics port”. By default it is enabled. You would disable this if you were to use that serial port as part of your application to communicate with another device. In that case any spontaneous messages or command line interception would cause your protocol communications to fail, so you disable it.
To disable the diagnostics port issue the MODE -S command. You can think of the ‘S’ option as being “Silent”.
To enable the diagnostics port issue the MODE -V command. Okay in this case the option perhaps means “Verbose”. This is the default.
Now there is an Easter Egg here. JANOS has a few undocumented command options. There are very few and most of them provide some cryptic debug information more or less for my use. But here’s one for you.
The MODE -A command is undocumented. This enables the AUX port for command line interaction. Once you issue the MODE -A command any character received on the AUX port will start a command line process there. You cannot disable this mode. It is reset on reboot.
This “feature” was added to facilitate production program and test. The builder that initially programs the JNIOR and tests all of its I/O uses a command line connection through the AUX port to test the AUX port.
Here we see that a command line process is now active on the AUX port.
bruce_dev /> ps -v runtime mem hnd stk frm id desc 36.667 0: Idle Process 1.395 2.6K 7 9 1: Network Service 1.320 1.3K 7 17 2: System 0.048 34.5K 7 12 4: Command/AUX 4 total 39.547 uptime bruce_dev />
For this to work, you must not have an application running that uses the AUX port for communications. If you have used an application on that port you may need to prevent it from running on boot and to reboot the unit. The application may program timeouts and other port features that will interfere with the command line use. The port must also be set for 115,200 baud.