|
uCon:
Embedded System Console
|
|
|
|
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).
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.
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.
uCon has a built-in telnet server that provides access
"through" the machine from network to COM port. To try this out
go to menu item Servers->Telnet, check the "Enabled" box, then click
the OK button. You should notice that a portion of your status
bar shows something like this:
CLIENTS (port 8200): 0 This indicates that there are currently no clients connected. Now, if you open up a telnet client and try to connect to the PC running uCon, and use port 8200 you'll notice that the client now has access to the same COM port connection that your uCon session has access to. Up to 8 clients can connect simultaneously. Can I connect to something other than a COM port? Yes.
uCon provides several "backends": COM port, telnet client, SSH client,
and a moncmd UDP client (for use with MicroMonitor based targets).
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. Cut-n-Paste doesn't seem to work, what's up with that? Because
of the way uCon was designed, this is one feature that may be a bit
non-intuitive at first; however, once you get used to the way it works,
you'll see its probably more useful than what is considered standard.
uCon has a 1200 line scrollable buffer that can be copied to the
copy buffer using the floating menu that shows up when you click on the
right mouse button while the cursor is over the console area of the
uCon window. You have the option of copying either the entire
buffer or just the area of the buffer that is visible. This then
allows you to paste that entire area into a file as needed.
Further, you can automatically have this copied area transferred
to a file and open up Notebook (or the editor of your choice) with that
buffer pasted into the file for immediate viewing. To configure
something other than the default use of Notepad, refer to the dialog
that comes with menu item Config->Miscellaneous. At the bottom
of this dialog box, you'll see a text box labled "Editor". Just
put the full path of the editor you prefer in that textbox. I
personally use programmers notepad (http://www.pnotepad.org/) .
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 command. This allows 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 2 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. 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. It currently
uses WinHelp.exe for this, so if you are running uCon on VISTA or
Windows-7, then you may need to download the update provided by
Microsoft to be able to display that (now considered old) help format. As of this writing, the site for this is: http://support.microsoft.com/kb/917607
. Note that there are plans to move uCon's help over to be
entirely web-based, but that is a work-in-progress (as is this FAQ).
Does uCon run on VISTA and Windows-7? Yes in both cases. The only gotcha is the help issue (see above)..
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@alcatel-lucent.com) is open for just about anything (within reason of course)! |
|