Add getopt processing to the software, configurable hci device and delay settings, and better protect against incorrect program arguments.