diff --git a/usr.sbin/bluetooth/hccontrol/hccontrol.h b/usr.sbin/bluetooth/hccontrol/hccontrol.h index 4424f7678a5d..466414fbaa96 100644 --- a/usr.sbin/bluetooth/hccontrol/hccontrol.h +++ b/usr.sbin/bluetooth/hccontrol/hccontrol.h @@ -65,6 +65,7 @@ char const * const hci_coding2str (int); char const * const hci_vdata2str (int); char const * const hci_hmode2str (int, char *, int); char const * const hci_ver2str (int); +char const * const hci_lmpver2str (int); char const * const hci_manufacturer2str(int); char const * const hci_features2str (uint8_t *, char *, int); char const * const hci_cc2str (int); diff --git a/usr.sbin/bluetooth/hccontrol/info.c b/usr.sbin/bluetooth/hccontrol/info.c index 12b685bc2296..d7bad36bb8de 100644 --- a/usr.sbin/bluetooth/hccontrol/info.c +++ b/usr.sbin/bluetooth/hccontrol/info.c @@ -59,7 +59,8 @@ hci_read_local_version_information(int s, int argc, char **argv) hci_ver2str(rp.hci_version), rp.hci_version); fprintf(stdout, "HCI revision: %#04x\n", le16toh(rp.hci_revision)); - fprintf(stdout, "LMP version: %#02x\n", rp.lmp_version); + fprintf(stdout, "LMP version: %s [%#02x]\n", + hci_lmpver2str(rp.lmp_version), rp.lmp_version); fprintf(stdout, "LMP sub-version: %#04x\n", le16toh(rp.lmp_subversion)); fprintf(stdout, "Manufacturer: %s [%#04x]\n", diff --git a/usr.sbin/bluetooth/hccontrol/link_control.c b/usr.sbin/bluetooth/hccontrol/link_control.c index 1558cc5adbd3..6123e4479875 100644 --- a/usr.sbin/bluetooth/hccontrol/link_control.c +++ b/usr.sbin/bluetooth/hccontrol/link_control.c @@ -729,7 +729,8 @@ again: fprintf(stdout, "Connection handle: %d\n", le16toh(ep->con_handle)); - fprintf(stdout, "LMP version: %#02x\n", ep->lmp_version); + fprintf(stdout, "LMP version: %s [%#02x]\n", + hci_lmpver2str(ep->lmp_version), ep->lmp_version); fprintf(stdout, "LMP sub-version: %#04x\n", le16toh(ep->lmp_subversion)); fprintf(stdout, "Manufacturer: %s [%#04x]\n", diff --git a/usr.sbin/bluetooth/hccontrol/util.c b/usr.sbin/bluetooth/hccontrol/util.c index d4c1687f4279..380cc3de58a4 100644 --- a/usr.sbin/bluetooth/hccontrol/util.c +++ b/usr.sbin/bluetooth/hccontrol/util.c @@ -148,18 +148,33 @@ char const * const hci_ver2str(int ver) { static char const * const t[] = { - /* 0x00 */ "v1.0B", - /* 0x01 */ "v1.1" + /* 0x00 */ "Bluetooth HCI Specification 1.0B", + /* 0x01 */ "Bluetooth HCI Specification 1.1", + /* 0x02 */ "Bluetooth HCI Specification 1.2", + /* 0x03 */ "Bluetooth HCI Specification 2.0" }; return (ver >= SIZE(t)? "?" : t[ver]); } /* hci_ver2str */ +char const * const +hci_lmpver2str(int ver) +{ + static char const * const t[] = { + /* 0x00 */ "Bluetooth LMP 1.0", + /* 0x01 */ "Bluetooth LMP 1.1", + /* 0x02 */ "Bluetooth LMP 1.2", + /* 0x03 */ "Bluetooth LMP 2.0" + }; + + return (ver >= SIZE(t)? "?" : t[ver]); +} /* hci_lmpver2str */ + char const * const hci_manufacturer2str(int m) { static char const * const t[] = { - /* 0000 */ "Ericsson Mobile Communications", + /* 0000 */ "Ericsson Technology Licensing", /* 0001 */ "Nokia Mobile Phones", /* 0002 */ "Intel Corp.", /* 0003 */ "IBM Corp.", @@ -177,7 +192,7 @@ hci_manufacturer2str(int m) /* 0015 */ "Broadcom Corporation", /* 0016 */ "Mitel Semiconductor", /* 0017 */ "Widcomm, Inc.", - /* 0018 */ "Telencomm Inc.", + /* 0018 */ "Zeevo, Inc.", /* 0019 */ "Atmel Corporation", /* 0020 */ "Mitsubishi Electric Corporation", /* 0021 */ "RTX Telecom A/S", @@ -206,7 +221,24 @@ hci_manufacturer2str(int m) /* 0044 */ "Macronix International Co. Ltd.", /* 0045 */ "GCT Semiconductor", /* 0046 */ "Norwood Systems", - /* 0047 */ "MewTel Technology Inc." + /* 0047 */ "MewTel Technology Inc.", + /* 0048 */ "ST Microelectronics", + /* 0049 */ "Synopsys", + /* 0050 */ "Red-M (Communications) Ltd", + /* 0051 */ "Commil Ltd", + /* 0052 */ "Computer Access Technology Corporation (CATC)", + /* 0053 */ "Eclipse (HQ Espana) S.L.", + /* 0054 */ "Renesas Technology Corp.", + /* 0055 */ "Mobilian Corporation", + /* 0056 */ "Terax", + /* 0057 */ "Integrated System Solution Corp.", + /* 0058 */ "Matsushita Electric Industrial Co., Ltd.", + /* 0059 */ "Gennum Corporation", + /* 0060 */ "Research In Motion", + /* 0061 */ "IPextreme, Inc.", + /* 0062 */ "Systems and Chips, Inc", + /* 0063 */ "Bluetooth SIG, Inc", + /* 0064 */ "Seiko Epson Corporation" }; return (m >= SIZE(t)? "?" : t[m]);