Blackdog Startup Sequence Documentation

The startup sequence for the Blackdog is a bit complicated. This article is a work in progress. I will update it as I try to recreate the Realm-manager.exe functionality....
Outstanding Questions/Issues:

If you have any knowledge about these issues please email me.

  • How is authentication between the Blackdog and XMing X Window server accomplished?

  • What does the realm_cfg.exe program do?

Plans and ideas

  • Build a better RealmManager (currently called DogBoss) which:

    • Allows user setting of various XMing Switches (for example -clipboard)

    • Allows user defined programs to be run on the host when the device starts up.

    • Does a better job of cleaning up after itself.

    • Open source license.

Startup Sequence

  1. Realm-autorun.exe starts.

    • A temporary directory is created on the host Please see the note at the bottom about temporary directory naming.

    • Realm-manager.exe is copied from the CD image to the temporary directory.

    • Realm-manager.exe is called from Realm-autorun.exe, with the following command line:
      Realm-manager.exe --cdrom=K --parent-pid=3808
      	--cdrom=Drive Letter without colon
      	--parent-pid= Process ID of the parent (the PID of the autorun program)

  2. Realm-manager.exe starts

    • It copies files from the device's cdimage into an appropriate temp directory on the host.

    • The following files are copied:

    • RealmManager then calls the following programs

      • Realm-net.exe -d X:

        • where

          X: is the drive letter of the cd image presented to the host by the device.

        • Finds a free subnet

        • Communicates this to the dog by attempting to read various directories and files in the X:NET_ADDR

        • Returns the subnet via stdout

      • Realm-cfg.exe -d

        • Where:

          -d specifies the IP address of the device.

          Note: This address corresponds to the IP Address assigned to the USB0: network interface on the device.

        • What does this program actually do? No output appears on stdout.

      • Realm-networking.exe -a

        • Where:

          -a [IP of the proxy] [(USB) network interface IP on the dog]

        • This program runs until the RealmManager program terminates it.

      • Xming/Realm-windowing -notrayicon -internalwm -fp tcp/

        • Starts the Xming X Server on the Windows Host

        • -notrayicon (Don't display a tray icon)

        • -internalwm (Use the internal window manager)

        • -fp tcp/ (Sets the font path to the address of the blackdog device, port 7100)
        • This program runs until the RealmManager program terminates it.

    • At this point RealmManager appears to go into a loop monitoring the registry entries under:
      Looking for changes (the Etherfast USB adapter going away specifically).

    • Once the ethernet interface is gone, RealmManager then attempts to stop:
      • Realm-networking.exe

      • Realm-windowing.exe

    • Finally it appears that the RealmManager program creates a batch file in the parent of the RealmX directory.

      This file is called "RDel2.bat" and, on my system, contains:

      	rmdir /s /q C:DOCUME~1/tbayne/LOCALS~1/Temp/
      	if exist C:DOCUME~1/tbayne/LOCALS~1/Temp/ goto begin1
      	erase /f /q C:DOCUME~1/tbayne/LOCALS~1/Temp/RDel2.bat
      	if exist C:DOCUME~1/tbayne/LOCALS~1/Temp/RDel2.bat goto begin2
      Which goes into an infinite loop trying to delete the RealmX directory and all it's contents.


  • The temp directory is located in the directory pointed to by the "TEMP" environment variable, and is named "RealmX", where X is a number, 1 to ?, if the directory already exists then the number is incremented, this is repeated until an unused directory is found.

  • There appears to be some situations where the dog can't clean up after itself, and leaves behind RealmX directories, usually empty.

  • Operations used to communicate the first part of 169.x.x.x
    CreateFile K:net_Addr3169
    CreateFile K:net_Addr3
    QueryDirectory K:Net_Addr3169
    CloseFile K:net_addr3
    ReadFile K:Net_Addr3169
    CloseFile K:Net_Addr3169
    - For each portion of the IP, in this order:
  • Currently 0.00/5
Rating: 0.00/5 (0 votes cast)

Share It!


Trackback URL for this entry:

Here's what others have to say about 'Blackdog Startup Sequence Documentation':