|
uCon Frequently Asked Questions This text provides a few quick pointers to uCon's capabilities. For more detailed information refer to uCon documentation/help. Check back regularly, this is a work in progress! What is uCon? Its
simply a terminal emulator, like HyperTerminal, but with a lot of
interesting/unusual added capabilities aimed at the needs of embedded
systems users and/or developers (but certainly not limited to that
space).
What host system does this run on? uCon
was designed to run on a Windows PC. It has been used on all
versions from W98 up through and including Windows-8. Others have
used it with Windows virtual machine on Linux as well as WINE on Linux machines. Can I program function keys? Yes.
uCon has 8 programmable function keys and 16 programmable
buttons. The only difference between the two is that the function
keys can be activated by a keypress or a button click. Function
keys and buttons can be configured through scripts as well, so you can
have an endless set of predefined functions.
Can I configure the COM port to a non-standard baud rate? Yes.
uCon allows the user to define the baud rate from within the
dialog box that opens under Config->Backends->COM Port..
Can I access my PC's COM port from a remote machine? Yes. As of this writing, you have two options: telnet or http (web browser).
uCon's telnet server supports up to eight simultaneous clients; while http has been tested with just one. Can I connect to something other than a COM port? Yes.
uCon provides several "backends": COM port, telnet client, SSH client,
and a connectionless UDP client (similar to netcat).
Go to menu item Config->Backend for these alternatives.
What actually gets installed? The
installer doesn't do much, and that's on purpose... It just
creates a 'ucon' directory under your "program files" directory and
then under that, creates a few additional directories, along with the
executables (including an uninstaller) and a few other support files.
It asks if you want a desktop-icon, and also places uCon in the
startup "programs" list. How do I log my target interaction to a file? There are two ways to do this in uCon: standard and longterm... Standard: This is the typical logging mechanism that you would just turn on for the duration of the interaction you want to log, then turn it off and you'll have all that ineraction in a file. Just click on Logging->Standard to open the dialog, set the filename you want to log to and check the Enabled checkbox. Note that the standard logging can be quickly enabled/disabled through a toolbar button (the one that looks like a file folder with an arrow pointing into it). LongTerm: This feature supports the idea that you will have uCon attached to some device for a long duration (days/weeks/months) and you want to have the start of each day be the start of a new log file with some maximum amount of space allocated for this logging storage. Once the space allocation is reached, uCon will treat each of the files like a circular queue that has maxxed out. It will simply overwrite the oldest entry. This is handy for cases where you may end up logging so much data that your disk space will max out (not such a problem these days, but it was in the past!). To use this mechanism, click on Logging->Longterm, specify the directory into which you want the files to be placed. Provide a filename prefix (uCon will append a date timestamp to this), set the max size and then check the Enabled checkbox. I need to see what my target is sending in ASCII-coded hex.. No
problem!. Menu item Config->Miscellaneous has a group of
checkboxes that allow you to pick a few different options for this.
Can I automate custom command sequences and target interaction? Yes.
uCon has a fairly complete scripting language that allows you to
interact with the target by sending command strings, wait for responses
and then branch in the script based on the content of the response.
There are a few dozen scripting commands ranging from target
interaction to TFTP transfers, file access, etc... Refer to
Help->Scripts for more information on that.
Can I include interaction with other programs in uCon scripts? Yes.Refer to the SYSTEM and SHELLEXEC commands. These commands allow you to run other commands from within a uCon script. I need a quick example on how to interact with a target in a script... The main command used for this is SEND. This
script command allows you to send a string to the target, and then
either wait for a known response (typically some kind of
target-specific command line prompt), or just wait for some period of
time. Here are two quick examples: Example 1: Send the line "echo hello world" to the target, wait for 3 seconds, then send it again. The -n option tells the SEND command not to wait for anything. In this case, the wait is actually done using the SLEEP command... SEND -n "echo hello world" SLEEP 3000 SEND -n "echo hello world again" Example 2: Repeat the above example, but this time, send the command, and wait for the target to send back a prompt. In this case, the target's prompt is "uMON>"... SEND -p uMON> "echo hello world" SEND -p uMON> "echo hello world again" Notice in this case, there is no SLEEP 3000 command needed because the script will not complete the first SEND until it receives the string "uMON>" from the target. This ability to throttle each command based on the prompt returned from the target is quite handy when the commands have varying durations of execution time. There are many other options to the SEND command so refer to menu item Help->Scripts and then click on the SEND command for more information. To create a new script, just go to menu item Scripts->New. It will open up an editor (of your choice) and you can then just start typing (the above lines for example). Then save the file to the scripts directory under your uCon installation. Then just click on Scripts->Run to start it up. I need to do some fairly complex target interaction with a script, can I? Yes.
uCon's basic scripting primitives provide some flexibility for scripts;
but if you really need to get down and dirty then you can write your
scripts using Lua. Can I start a script by clicking on a button or function key? Yes.
In the configuration dialogs for buttons (menu item Config->Buttons)
and function keys (Config->Function Keys) there is a check box
column labeled "Script?". If this is checked, then the text for
that particular button/function-key is considered to be a path to a
filename which is then considered to be a script that will be started
when that particular button/key is activated. I need more programmable buttons/function keys? uCon
supports a total of 24 (8 funckeys, 16 buttons), but if you need more
than that, you can
allocate a few of the buttons/fkeys to be used to reload other presets.
One of the script commands is FKEY, this allows you to build a
script
to load up the function key (and button) settings. Also, you can
automatically create a script that will re-build your current
function-key/button setup by using the menu itemp
Scripts->Fkey2Script. I need to insert a timestamp at the start of every line, can I do that? Yes.
uCon allows you to specify one of several different timestamp
formats that will automatically be inserted at the beginning of each
line. To enable this, go to menu item Config->Timestamp
to open the timestamp dialog box. Pick the format you like
from the drop-down list, and then check the Enabled checkbox.
From then on you will see that each line of output from your
target connection will be preceded by a formatted timestamp.
Notice also that there is a toolbar button (the one with the icon
that looks like an old-style analog clock) that quickly
enables/disables timestamping based on the settings in the dialog.
Once I get all this stuff set up, can I save the configuration? Yes.
Establish your buttons/function keys and environment and then
click on the Save button or menu item File->SaveAs. Then next
time you start uCon, use the "Pre-established Configuration" group to
browse for your configuration file.
What about help? uCon
has an extensive set of built-in help information. The installation includes a
complete set html formatted documentation on the local machine;
thus allowing the user to access help information even if the PC is not
connected to the web.
Does uCon run on VISTA, Windows-7/8? Yes in all cases.
What if I need uCon to do something kinda weird? The
purpose of uCon's public availability is to interact with users and
hear about other ideas that may be applicable to a program like uCon.
As a result, the author (ed.sutter@nokia.com) is open for just about anything (within reason of course)! |