Index: hcitool.c =================================================================== RCS file: /cvsroot/bluez/utils/tools/hcitool.c,v retrieving revision 1.35 diff -u -r1.35 hcitool.c --- hcitool.c 21 Dec 2003 16:08:25 -0000 1.35 +++ hcitool.c 14 Feb 2004 14:56:52 -0000 @@ -436,7 +436,7 @@ bacpy(&cr->bdaddr, &bdaddr); cr->type = ACL_LINK; if (ioctl(dd, HCIGETCONNINFO, (unsigned long) cr) < 0) { - if (hci_create_connection(dd, &bdaddr, HCI_DM1 | HCI_DH1, 0, 0, &handle, 25000) < 0) { + if (hci_create_connection(dd, &bdaddr, htobs(HCI_DM1 | HCI_DH1), 0, 0, &handle, 25000) < 0) { perror("Can't create connection"); close(dd); exit(1); @@ -653,7 +653,7 @@ exit(1); } - if (hci_create_connection(dd, &bdaddr, ptype, 0, role, &handle, 1000) < 0) + if (hci_create_connection(dd, &bdaddr, htobs(ptype), 0, role, &handle, 1000) < 0) perror("Can't create connection"); hci_close_dev(dd); }