uCon supports the ability to receive ASCII command strings via UDP. It uses the same mechanism as is built into MicroMonitor (aka uMon); hence, the uMon-host-tool called 'moncmd' (or uCon's script command called MONCMD) can be used to communicate with another uCon session whose MONCMD server has been turned on. There's also a cut-back version of the moncmd.exe tool that comes with uCon, called uconcmd.exe. This is probably all you'll ever need.
The 'moncmd' client (part of the freely available MicroMonitor package at the Microcross website ) is a tool that allows a developer to communicate (via UDP) with the command line interface of an embedded system running MicroMonitor. The 'uconcmd' tool comes with the uCon installation, found in the same directory as ucon.exe.
The MONCMD server in uCon is essentially the same server built into it; hence, it can receive commands via the moncmd client.
The menu item Servers->MONCMD brings up the following dialog box:
On the server side, there's not much to configure. It simply gets enabled or disabled, along with the port number (default being 777).
uCon uses the first white-space-delimited token of
the incoming command line from moncmd to determine what
to do. There are currently three different commands: SCRCMD, BUTTON and FKEY.
Example using 'SCRCMD:'...
Assume we have a uCon session running on some PC whose IP address is 126.96.36.199, and the MONCMD server has been enabled to run on port 987. We can now use either the stand-alone 'uconcmd' client or the MONCMD script command in uCon to 'talk' to this uCon session. Probably the most likely to be used is the "SEND" command, so we'll use that as the example. Assume, for example, that uCon's backend is attached to an embedded system's console port, and we want to issue the "reboot" command. The following command line would do this:
uconcmd -p 987 188.8.131.52 "SCRCMD: SEND -n \"reboot\""
Note that uconcmd is basically a trimmed down version the Micromonitor host-tool called 'moncmd'. Being able to do this with the stand-alone 'moncmd' tool allows a user to communicate with a uCon session from any machine that the moncmd tool is built for (Linux, Unix, PCWindows, etc..., the moncmd source code will build on windows or linux/unix).
Similarly, if we chose to do this with a second uCon session, we would use the MONCMD script command as the client...
MONCMD -p 987 184.108.40.206 "SCRCMD: SEND -n \"reboot\""
Note that this is essentially the same command line as the first example, except now it is within a uCon script. This would be received by the uCon session running on PC 220.127.116.11, with the MONCMD server enabled on port 987 and it would then send the reboot string to the target it is attached to.Alternatively, you may want to use a python script to communicate with this server.