// check if command complete event for given command
 public static bool IsCommandCompleteEvent(byte[] packet, HCICommands.HCI_COMMAND command)
 {
     return (packet[0] == HCICommands.HCI_EVENT_COMMAND_COMPLETE && readBt16(packet, 3) == command.OpCode);
 }
 public static extern int bt_send_cmd(ref HCICommands.HCI_COMMAND cmd, UInt32 arg1, byte arg2, byte arg3);
 public static extern int bt_send_cmd(ref HCICommands.HCI_COMMAND cmd, Byte[] arg1, byte arg2, byte arg3, UInt16 arg4);
 public static extern int bt_send_cmd(ref HCICommands.HCI_COMMAND cmd, byte arg1);