Connection options (COMM):
----------------------------

        [com:<id/auto/device>]   (ask for autodetect)
        [baud:<rate>]            115200
        [even/mark/odd/space]    (No parity)
        [data:<len>]             8
        [stop:<numbits>]         1
        [<rts/rtscts/xonxoff>]   (No Handshake)
        [delay:<intervalms>]     (Varies with each release / used extension)

When using certain extension features, the default parameters may vary

Connection options (Network):
-----------------------------

  With the network extension enabled, you may connect via network. See bridge
  option unter network interface section for server side usage.
  Instead of the comm options (which are setup on the server), use this network
  options:

        host:<hostname>[:<port>] (Default port is 8803, varies when using
                                 certain extension)
        incomingclient[:<port>]  Await connection from remote client
        [delay:<intervalms>]     (Varies with each release / used extension)
        [ipv6]                   Connect using IPv6

Other options:
--------------

        [logfile[:filename]]     specify to create a log file of the
                                 communication. Default filename is
                                 ct_yyyy-mm-dd_hh-mm-ss.log
        [logtime]                log send/recieve time

Default commands:
-----------------

  ct [<connectionsettings>] list
        shows a list of available com ports

  ct [<connectionsettings>] test <data>
        generates binary data without sending

  ct [<connectionsettings>] [force] send <data>
        generates and sends binary data; Use the 'force' keyword to enforce
        sending even if there appears to be continuous incoming data.

  ct [<connectionsettings>] listen
        listens for incoming data. you can press "Enter" key any time to pause
        listening and generate/send binary data.

  ct cputf8
        change console codepage to utf8

  ct [<connectionsettings>] about
        shows version and copyright information

NET/Network interface:
----------------------

  With the network extension enabled, you may use the following commands:

  ct [<connectionsettings>] net bridge [ipv6] <port>
        Creates a server waiting for remote clients to connect. All data is
        output in the console window and forwarded
        use "default" for <port> to use default port (8803)

  ct [<connectionsettings>] net bridge [ipv6] host:<host>[:<port>]
        Creates a reverse-connection server waiting to connect to remote
        client. All data is output in the console window and forwarded

AT/Modem interface:
-------------------

  Special thanks to Christian Falk for AT command extension.
  With the AT extension enabled, you may use the following commands:

  ct [<connectionsettings>] at list
        shows a list of available com ports and requests device name via AT+CGMM

  ct [<connectionsettings>] at [pin:<PIN>] info
        shows detailed device information using various AT commands

  ct [<connectionsettings>] at [pin:<PIN>] unlock
        unlocks simcard with provided PIN

  ct [<connectionsettings>] at [pin:<PIN>] [smsc:<number>] [text/pdu/flash] sms <recipient> <text>
        sends a text mode SMS; Use PIN "none" to suppress entering of PIN on failure

  ct [<connectionsettings>] at [pin:<PIN>] [smsc:<number>] service sms <recipient> [voice<0/1>] [fax<0/1>] [email<0/1>] [other<0/1>]
        sends a service mode SMS; Use PIN "none" to suppress entering of PIN on failure

CT/Tracker interface:
---------------------

  With the tracker extension enabled, you may use the following commands:

  ct [<connectionsettings>] ct [dev:<DeviceID>] [service] ide
        start the tracker user interface
  ct [<connectionsettings>] ct bridge <port>
        requires the network extension enabled; Similar to NET bridge, but using
        proper default settings for CT/Tracker (port 8805, baudrate 19200)
        use "default" for <port> to use default port (8805)

HAS/House automation system interface
-------------------------------------

  With the House automation system extension enabled, you may use the following
  commands:

  ct [<connectionsettings>] ha status <object(s)>
        open object(s)
  ct [<connectionsettings>] ha open <object(s)>
        open object(s)
  ct [<connectionsettings>] ha close <object(s)>
        close object(s)
  ct [<connectionsettings>] ha listen
        listens for incoming data. you can press "Enter" key any time to pause
        listening and generate/send binary data.
  ct [<connectionsettings>] ha bridge <port>
        requires the network extension enabled; Similar to NET bridge, but using
        proper default settings for CT/Tracker (port 8806, baudrate ???)
        use "default" for <port> to use default port (8806)

  Objects (seperate by comma):
        system <Param>
        door   <ID>            all doors
        window <ID>            all windows

ADB interface:
--------------

  Create a subfolder "adb" and copy a working adb.exe plus required dlls to that
  directory. For rooting, also copy the superuser binary ("su") and apk to that
  folder and name them accordingly:
    ChainsDD Superuser apk:     superuser.apk   superuser.arm
    Chainfire SuperSU apk:      supersu.apk     supersu.arm
    ClockworkMod Superuser apk: susc.apk        sucm.arm
  (processor types are not yet supported. Currently it will simply upload the
  .arm file)

  With the ADB extension enabled, you may use the following commands:

  ct [<connectoptions>] adb start [server]
        starts the ADB server
  ct [<connectoptions>] adb kill [server]
        kills the ADB server
  ct [<connectoptions>] adb whipe [server]
        kills the ADB server, and whipes settings
  ct [<connectionsettings>] adb screenshot save <filename>
        grab a screenshot and save to file
  ct [<connectionsettings>] adb screenshot server [ipv6] <port>
        requires the network extension enabled;
        starts a HTTP WebServer serving screenshots;
        Use http://<hostname>[:<port>]/ctadb/screenshot.png as URL
        e.g. http://127.0.0.1:81/ctadb/screenshot.png
  ct [<connectoptions>] adb input gui
        starts the input gui
  ct [<connectoptions>] adb reboot
        reboots the device
  ct [<connectoptions>] adb reboot bootloader
        reboots the device into boot loader
  ct [<connectoptions>] adb reboot recovery
        reboots the device into recovery mode
  ct [<connectoptions>] adb root superuser
        roots the device using ChainsDD Superuser apk
  ct [<connectoptions>] adb root supersu
        roots the device using Chainfire SuperSU apk
  ct [<connectoptions>] adb root sucm
        roots the device using ClockworkMod Superuser apk

Data generation instructions:
-----------------------------

  hex(<hex sequence>)               e.g. hex(00 01 02 03)
  byte(<value>[, <value>])          e.g. byte(0xff)
  word(<value>[, <value>])          e.g. word(0xffff); little endian
  dword(<value>[, <value>])         e.g. dword(0xffffffff); little endian
  qword(<value>[, <value>])         e.g. qword(0xffffffffffffffff); little
                                    endian; 64 bit version only
  ansi/utf8/utf16/utf16be(<text>)   e.g. ansi(AT+CGMM\r)

  Text escape characters:
        \0        byte(0)
        \a        byte(7)
        \b        byte(8)
        \t        byte(9)
        \n        byte(10)
        \v        byte(11)
        \f        byte(12)
        \r        byte(13)
        \?        byte(63)        ?
        \\        byte(92)        \
        \(        byte(40)        (
        \)        byte(41)        )
        \'        byte(39)        '
        \"        byte(34)        "
