HCI_COMMAND_PKT = 0x01;
HCI_ACLDATA_PKT = 0x02;
HCI_EVENT_PKT = 0x04;

ACL_START_NO_FLUSH = 0x00;
ACL_CONT  = 0x01;
ACL_START = 0x02;

EVT_DISCONN_COMPLETE = 0x05;
EVT_ENCRYPT_CHANGE = 0x08;
EVT_CMD_COMPLETE = 0x0e;
EVT_CMD_STATUS = 0x0f;
EVT_LE_META_EVENT = 0x3e;

EVT_LE_CONN_COMPLETE = 0x01;
EVT_LE_CONN_UPDATE_COMPLETE = 0x03;

OGF_LINK_CTL = 0x01;
OCF_DISCONNECT = 0x0006;

OGF_HOST_CTL = 0x03;
OCF_SET_EVENT_MASK = 0x0001;
OCF_RESET = 0x0003;
OCF_READ_LE_HOST_SUPPORTED = 0x006c;
OCF_WRITE_LE_HOST_SUPPORTED = 0x006d;

OGF_INFO_PARAM = 0x04;
OCF_READ_LOCAL_VERSION = 0x0001;
OCF_READ_BD_ADDR = 0x0009;

OGF_STATUS_PARAM = 0x05;
OCF_READ_RSSI = 0x0005;

OGF_LE_CTL = 0x08;
OCF_LE_SET_EVENT_MASK = 0x0001;
OCF_LE_SET_ADVERTISING_PARAMETERS = 0x0006;
OCF_LE_SET_ADVERTISING_DATA = 0x0008;
OCF_LE_SET_SCAN_RESPONSE_DATA = 0x0009;
OCF_LE_SET_ADVERTISE_ENABLE = 0x000a;
OCF_LE_LTK_NEG_REPLY = 0x001B;

DISCONNECT_CMD = OCF_DISCONNECT | OGF_LINK_CTL << 10;

SET_EVENT_MASK_CMD = OCF_SET_EVENT_MASK | OGF_HOST_CTL << 10;
RESET_CMD = OCF_RESET | OGF_HOST_CTL << 10;
READ_LE_HOST_SUPPORTED_CMD = OCF_READ_LE_HOST_SUPPORTED | OGF_HOST_CTL << 10;
WRITE_LE_HOST_SUPPORTED_CMD = OCF_WRITE_LE_HOST_SUPPORTED | OGF_HOST_CTL << 10;

READ_LOCAL_VERSION_CMD = OCF_READ_LOCAL_VERSION | (OGF_INFO_PARAM << 10);
READ_BD_ADDR_CMD = OCF_READ_BD_ADDR | (OGF_INFO_PARAM << 10);

READ_RSSI_CMD = OCF_READ_RSSI | OGF_STATUS_PARAM << 10;

LE_SET_EVENT_MASK_CMD = OCF_LE_SET_EVENT_MASK | OGF_LE_CTL << 10;
LE_SET_ADVERTISING_PARAMETERS_CMD = OCF_LE_SET_ADVERTISING_PARAMETERS | OGF_LE_CTL << 10;
LE_SET_ADVERTISING_DATA_CMD = OCF_LE_SET_ADVERTISING_DATA | OGF_LE_CTL << 10;
LE_SET_SCAN_RESPONSE_DATA_CMD = OCF_LE_SET_SCAN_RESPONSE_DATA | OGF_LE_CTL << 10;
LE_SET_ADVERTISE_ENABLE_CMD = OCF_LE_SET_ADVERTISE_ENABLE | OGF_LE_CTL << 10;
LE_LTK_NEG_REPLY_CMD = OCF_LE_LTK_NEG_REPLY | OGF_LE_CTL << 10;

HCI_OE_USER_ENDED_CONNECTION = 0x13;