From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 28 11:01:41 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FEB516A424 for ; Tue, 28 Mar 2006 11:01:41 +0000 (UTC) (envelope-from cfernandezh@udc.es) Received: from mail.udc.es (mail.udc.es [193.147.41.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5457343D67 for ; Tue, 28 Mar 2006 11:01:31 +0000 (GMT) (envelope-from cfernandezh@udc.es) Received: from localhost (localhost [127.0.0.1]) by mail.udc.es ("Servidor de correo del SIAIN") with ESMTP id 5771615EBB6; Tue, 28 Mar 2006 13:00:53 +0200 (CEST) Received: from [193.144.50.98] (unknown [193.144.50.98]) by mail.udc.es ("Servidor de correo del SIAIN") with ESMTP id 0743015EBB2; Tue, 28 Mar 2006 13:00:53 +0200 (CEST) Message-ID: <44291782.8010003@udc.es> Date: Tue, 28 Mar 2006 13:01:22 +0200 From: =?ISO-8859-1?Q?Carlos_Fern=E1ndez_Herranz?= User-Agent: Mozilla Thunderbird 1.0.6 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maksim Yevmenkin References: <4423D096.2010205@udc.es> <44248823.3040907@savvis.net> In-Reply-To: <44248823.3040907@savvis.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-bluetooth@freebsd.org Subject: Re: About Inquiry_with_RSSI X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 11:01:41 -0000 Hello. In the bluetooth specification there isn't neither a specific command to carry out an inquiry with rssi nor a command packet. I've tried to implement the "write_inquiry_mode" command and then make an usual inquiry. The problem is that the "write_inquiry_mode" command doesn't seem to work, because I only receive " NG_HCI_EVENT_INQUIRY_RESULT" events instead of "NG_HCI_EVENT_INQUIRY_RESULT_WITH_RSSI" ones. Could you tell me if I'm doing something wrong?: #define NG_HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 0x22 *typedef* *struct* { u_int8_t num_responses; //* number of responses *// //* ng_hci_inquiry_response[num_responses] -- see below *// } __attribute__ ((packed)) ng_hci_inquiry_result_with_rssi_ep; *typedef* *struct* { bdaddr_t bdaddr; u_int8_t pagescan_rep_mode; u_int8_t pagescan_period_mode; u_int8_t page_scan_mode; u_int8_t uclass[NG_HCI_CLASS_SIZE]; u_int16_t clock_offset; char rssi; } __attribute__ ((packed)) ng_hci_inquiry_response_with_rssi; #define NG_HCI_OCF_WRITE_INQUIRY_MODE 0x0045 *typedef* *struct* { uint8_t mode; } __attribute__ ((packed)) ng_hci_write_inquiry_mode_cp; #define NG_HCI_WRITE_INQUIRY_MODE_CP_SIZE 1 *typedef* *struct* { uint8_t status; } __attribute__ ((packed)) ng_hci_write_inquiry_mode_rp; #define NG_HCI_WRITE_INQUIRY_MODE_RP_SIZE 1 ...................... static int socket_open(char const *node) { *struct* sockaddr_hci addr; *struct* ng_btsocket_hci_raw_filter filter; int s, mib[4]; size_t size; s = socket(PF_BLUETOOTH, SOCK_RAW, BLUETOOTH_PROTO_HCI); *if* (s < 0) fprintf(stderr, "Could not create socket\n"); memset(&addr, 0, *sizeof*(addr)); addr.hci_len = *sizeof*(addr); addr.hci_family = AF_BLUETOOTH; strncpy(addr.hci_node, node, *sizeof*(addr.hci_node)); *if* (bind(s, (*struct* sockaddr *) &addr, *sizeof*(addr)) < 0) fprintf(stderr, "Could not bind socket, node=%s\n", node); *if* (connect(s, (*struct* sockaddr *) &addr, *sizeof*(addr)) < 0) fprintf(stderr, "Could not connect socket, node=%s\n", node); memset(&filter, 0, *sizeof*(filter)); bit_set(filter.event_mask, NG_HCI_EVENT_COMMAND_COMPL - 1); bit_set(filter.event_mask, NG_HCI_EVENT_COMMAND_STATUS - 1); bit_set(filter.event_mask, NG_HCI_EVENT_INQUIRY_COMPL - 1); bit_set(filter.event_mask, NG_HCI_EVENT_INQUIRY_RESULT - 1); ///Inquiry_rssi modification/ bit_set(filter.event_mask, NG_HCI_EVENT_INQUIRY_RESULT_WITH_RSSI - 1); bit_set(filter.event_mask, NG_HCI_EVENT_CON_COMPL - 1); bit_set(filter.event_mask, NG_HCI_EVENT_DISCON_COMPL - 1); bit_set(filter.event_mask, NG_HCI_EVENT_REMOTE_NAME_REQ_COMPL - 1); bit_set(filter.event_mask, NG_HCI_EVENT_READ_REMOTE_FEATURES_COMPL - 1); bit_set(filter.event_mask, NG_HCI_EVENT_READ_REMOTE_VER_INFO_COMPL - 1); bit_set(filter.event_mask, NG_HCI_EVENT_RETURN_LINK_KEYS - 1); bit_set(filter.event_mask, NG_HCI_EVENT_READ_CLOCK_OFFSET_COMPL - 1); bit_set(filter.event_mask, NG_HCI_EVENT_CON_PKT_TYPE_CHANGED - 1); bit_set(filter.event_mask, NG_HCI_EVENT_ROLE_CHANGE - 1); *if* (setsockopt(s, SOL_HCI_RAW, SO_HCI_RAW_FILTER, (void * const) &filter, *sizeof*(filter)) < 0) fprintf(stderr, "Could not setsockopt()\n"); size = (*sizeof*(mib)/*sizeof*(mib[0])); *if* (sysctlnametomib("net.bluetooth.hci.command_timeout",mib,&size) < 0) fprintf(stderr, "Could not sysctlnametomib()\n"); ; *if* (sysctl(mib, *sizeof*(mib)/*sizeof*(mib[0]), (void *) &timeout, &size, NULL, 0) < 0) fprintf(stderr, "Could not sysctl()\n"); timeout ++; *return* (s); } //* socket_open *// ................. //* Send Write_Inquiry_Mode command to the unit (Bluetooth v1.2 upgrade)*// static int hci_write_inquiry_mode(int s, int mode) { ng_hci_write_inquiry_mode_cp cp; ng_hci_write_inquiry_mode_rp rp; int n; //* parse command parameters *// *switch* (mode) { *case* 0: cp.mode = (uint8_t) mode; *break*; *case* 1: cp.mode = (uint8_t) mode; *break*; *default*: *return* (ERROR); } n = *sizeof*(rp); *if* (hci_request(s, NG_HCI_OPCODE(NG_HCI_OGF_HC_BASEBAND, NG_HCI_OCF_WRITE_INQUIRY_MODE), (char const *) &cp, *sizeof*(cp), (char *) &rp, &n) == ERROR) { *return* (ERROR); } *if* (rp.status != 0x00) { fprintf(stdout, "Status: %s [%#02x]\n", hci_status2str(rp.status), rp.status); *return* (FAILED); } *return* (OK); } //* hci_write_inquiry_mode *// ............................ static int hci_inquiry(int s) { int n0, timo; uint8_t b[512]; ng_hci_inquiry_cp cp; ng_hci_event_pkt_t *e = (ng_hci_event_pkt_t *) b; //* set defaults *// cp.lap[2] = 0x9e; cp.lap[1] = 0x8b; cp.lap[0] = 0x33; cp.inquiry_length = INQ_LENGHT; cp.num_responses = NUM_RESPONSES; //* send request and expect status back *// n0 = *sizeof*(b); *if* (hci_request(s, NG_HCI_OPCODE(NG_HCI_OGF_LINK_CONTROL, NG_HCI_OCF_INQUIRY), (char const *) &cp, *sizeof*(cp), b, &n0) == ERROR) *return* (ERROR); *if* (*b != 0x00) *return* (FAILED); timo = timeout; timeout = cp.inquiry_length * 1.28 + 1; wait_for_more: //* wait for inquiry events *// n0 = *sizeof*(b); *if* (hci_recv(s, b, &n0) == ERROR) { timeout = timo; *return* (ERROR); } *if* (n0 < *sizeof*(*e)) { timeout = timo; errno = EIO; *return* (ERROR); } *switch* (e->event) { *case* NG_HCI_EVENT_INQUIRY_RESULT: { ng_hci_inquiry_result_ep *ir = (ng_hci_inquiry_result_ep *)(e + 1); uint8_t *r = (uint8_t *)(ir + 1); *for* (n0 = 0; n0 < ir->num_responses; n0++) hci_inquiry_response(&r); *goto* wait_for_more; } *case* NG_HCI_EVENT_INQUIRY_RESULT_WITH_RSSI: { ng_hci_inquiry_result_with_rssi_ep *ir = (ng_hci_inquiry_result_with_rssi_ep *)(e + 1); uint8_t *r = (uint8_t *)(ir + 1); *for* (n0 = 0; n0 < ir->num_responses; n0++) hci_inquiry_response_with_rssi(&r); *goto* wait_for_more; } *case* NG_HCI_EVENT_INQUIRY_COMPL: *break*; *default*: *goto* wait_for_more; } timeout = timo; *return* (OK); } //* hci_inquiry *// ................. static void hci_inquiry_response_with_rssi(uint8_t **b) { ng_hci_inquiry_response_with_rssi *ir = (ng_hci_inquiry_response_with_rssi *)(*b); strcpy(respuesta,hci_bdaddr2str(&ir->bdaddr)); printf("BTADDR: %s \t RSSI: %d", hci_bdaddr2str(&ir->bdaddr), ir->rssi); write_cmd(respuesta, strlen(respuesta)); } //* hci_inquiry_response_with_rssi *// .......................... Best regards. Carlos. Maksim Yevmenkin wrote: > [...] > >> >> I would like to know if it could be possible upgrade the Bluetooth >> stack so the command Inquiry_with_RSSI could be supported and the way >> I could > > > strictly speaking it should be already supported. all you need to do > is to create proper hci command packet and send it via hci raw socket. > you also might need to adjust filter settings on the hci raw socket to > allow command to be sent. > > whats missing is the definition of new bluetooth v1.2 hci commands and > events, but nothing prevents you from defining those locally and > creating valid hci command packet. > > of course, the device itself must support bluetooth v1.2 hci > commands/events. > >> do it. Can I follow the BlueZ stack to adapt the FreeBSD one? > > > i'm not sure what are you asking here. > > thanks, > max > From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 28 11:44:08 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F7A616A420 for ; Tue, 28 Mar 2006 11:44:08 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from mail10.svc.cra.dublin.eircom.net (mail10.svc.cra.dublin.eircom.net [159.134.118.26]) by mx1.FreeBSD.org (Postfix) with SMTP id A65C443D49 for ; Tue, 28 Mar 2006 11:44:06 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 93741 messnum 6678277 invoked from network[83.70.176.191/unknown]); 28 Mar 2006 11:44:05 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail10.svc.cra.dublin.eircom.net (qp 93741) with SMTP; 28 Mar 2006 11:44:05 -0000 Received: (nullmailer pid 2030 invoked by uid 1000); Tue, 28 Mar 2006 11:42:39 -0000 Date: Tue, 28 Mar 2006 12:42:39 +0100 (BST) To: =?ISO-8859-1?Q?Carlos_Fern=E1ndez_Herranz?= In-Reply-To: <44291782.8010003@udc.es> References: <4423D096.2010205@udc.es> <44248823.3040907@savvis.net> <44291782.8010003@udc.es> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1252152330-1143546114=:2390" Content-ID: Message-Id: <1143546159.980113.1641.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: About Inquiry_with_RSSI X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 11:44:09 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1252152330-1143546114=:2390 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: On Tue, 28 Mar 2006, Carlos Fern=E1ndez Herranz wrote: > The problem is that the "write_inquiry_mode" command doesn't seem to > work, because I only receive " NG_HCI_EVENT_INQUIRY_RESULT" events > instead of "NG_HCI_EVENT_INQUIRY_RESULT_WITH_RSSI" ones. > > Could you tell me if I'm doing something wrong?: you dont show where you are actually calling the hci_write_inquiry_mode() function, did you actually do that? iain --0-1252152330-1143546114=:2390-- From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 28 11:56:41 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA06F16A400 for ; Tue, 28 Mar 2006 11:56:41 +0000 (UTC) (envelope-from cfernandezh@udc.es) Received: from mail.udc.es (mail.udc.es [193.147.41.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C6DB43D46 for ; Tue, 28 Mar 2006 11:56:41 +0000 (GMT) (envelope-from cfernandezh@udc.es) Received: from localhost (localhost [127.0.0.1]) by mail.udc.es ("Servidor de correo del SIAIN") with ESMTP id E7D8715EC0F; Tue, 28 Mar 2006 13:56:02 +0200 (CEST) Received: from [193.144.50.98] (unknown [193.144.50.98]) by mail.udc.es ("Servidor de correo del SIAIN") with ESMTP id A53C915EC0E; Tue, 28 Mar 2006 13:56:02 +0200 (CEST) Message-ID: <44292470.5020803@udc.es> Date: Tue, 28 Mar 2006 13:56:32 +0200 From: =?ISO-8859-1?Q?Carlos_Fern=E1ndez_Herranz?= User-Agent: Mozilla Thunderbird 1.0.6 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <4423D096.2010205@udc.es> <44248823.3040907@savvis.net> <44291782.8010003@udc.es> <1143546159.980113.1641.nullmailer@galant.ukfsn.org> In-Reply-To: <1143546159.980113.1641.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-bluetooth@freebsd.org Subject: Re: About Inquiry_with_RSSI X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 11:56:41 -0000 Sorry, here is the code: char *end_inquiry="end_inquiry"; char *unreachable="unreachable"; //int timeout; int numeric_bdaddr = 0; char *nodo; char respuesta[20]; int main(int argc, char *argv[]) { // char *cmd, *btaddr; // int continuar=1; int socket; int res; char *handle=malloc(5**sizeof*(char)); *if* (argc!=3) exit(1); nodo=malloc (10**sizeof*(char)); *if* ((find_hci_name (argv[1]))!=0) continuar=0; *else* continuar=1; *while* (continuar) { // cmd = "inquiry"; / / *if*(strcmp(cmd,"inquiry")==0) { socket=socket_open(nodo); printf("\nWRITE_INQUIRY_MODE: %d \n", hci_write_inquiry_mode(socket, 0x01)); /********************************/ *if* (hci_inquiry(socket)!=OK) { fprintf(stderr,"Inquiry failed\n"); } printf("\nCLOSE SOCKET: %d\n", close(socket)); } *else* *if* (strcmp(cmd,"link")==0) { //DO LINK QUALITY } /// free(auxstr); / } free(nodo); *return* (0); } //* main *// Thank you. Iain Hibbert wrote: >On Tue, 28 Mar 2006, Carlos Fernández Herranz wrote: > > > >>The problem is that the "write_inquiry_mode" command doesn't seem to >>work, because I only receive " NG_HCI_EVENT_INQUIRY_RESULT" events >>instead of "NG_HCI_EVENT_INQUIRY_RESULT_WITH_RSSI" ones. >> >>Could you tell me if I'm doing something wrong?: >> >> > >you dont show where you are actually calling the hci_write_inquiry_mode() >function, did you actually do that? > >iain > From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 28 12:20:34 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 091DB16A420 for ; Tue, 28 Mar 2006 12:20:34 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from mail06.svc.cra.dublin.eircom.net (mail06.svc.cra.dublin.eircom.net [159.134.118.22]) by mx1.FreeBSD.org (Postfix) with SMTP id 654D043D49 for ; Tue, 28 Mar 2006 12:20:33 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 63148 messnum 2891339 invoked from network[83.70.176.191/unknown]); 28 Mar 2006 12:20:31 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail06.svc.cra.dublin.eircom.net (qp 63148) with SMTP; 28 Mar 2006 12:20:31 -0000 Received: (nullmailer pid 2772 invoked by uid 1000); Tue, 28 Mar 2006 12:08:23 -0000 Date: Tue, 28 Mar 2006 13:08:23 +0100 (BST) To: =?ISO-8859-1?Q?Carlos_Fern=E1ndez_Herranz?= In-Reply-To: <44292470.5020803@udc.es> References: <4423D096.2010205@udc.es> <44248823.3040907@savvis.net> <44291782.8010003@udc.es> <1143546159.980113.1641.nullmailer@galant.ukfsn.org> <44292470.5020803@udc.es> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1150075504-1143547703=:2803" Message-Id: <1143547703.630752.2338.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: About Inquiry_with_RSSI X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 12:20:34 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1150075504-1143547703=:2803 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 28 Mar 2006, Carlos Fern=E1ndez Herranz wrote: > Sorry, here is the code: and hcidump shows the command going in and completing correctly? If you subsequently do a Read_Inquiry_Mode command, does it return mode=3D=3D0x01? iain --0-1150075504-1143547703=:2803-- From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 28 14:50:14 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 526BE16A423 for ; Tue, 28 Mar 2006 14:50:14 +0000 (UTC) (envelope-from cfernandezh@udc.es) Received: from mail.udc.es (mail.udc.es [193.147.41.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B5B743D55 for ; Tue, 28 Mar 2006 14:50:13 +0000 (GMT) (envelope-from cfernandezh@udc.es) Received: from localhost (localhost [127.0.0.1]) by mail.udc.es ("Servidor de correo del SIAIN") with ESMTP id 9E97815EBC9; Tue, 28 Mar 2006 16:49:35 +0200 (CEST) Received: from [193.144.50.98] (unknown [193.144.50.98]) by mail.udc.es ("Servidor de correo del SIAIN") with ESMTP id 7257D15EBC8; Tue, 28 Mar 2006 16:49:35 +0200 (CEST) Message-ID: <44294D1D.4010901@udc.es> Date: Tue, 28 Mar 2006 16:50:05 +0200 From: =?ISO-8859-1?Q?Carlos_Fern=E1ndez_Herranz?= User-Agent: Mozilla Thunderbird 1.0.6 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <4423D096.2010205@udc.es> <44248823.3040907@savvis.net> <44291782.8010003@udc.es> <1143546159.980113.1641.nullmailer@galant.ukfsn.org> <44292470.5020803@udc.es> <1143547703.630752.2338.nullmailer@galant.ukfsn.org> In-Reply-To: <1143547703.630752.2338.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-bluetooth@freebsd.org Subject: Re: About Inquiry_with_RSSI X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 14:50:14 -0000 I didn't try the "Read_Inquiry_Mode" command yet (because I have to implement it), but the response I get from *if* (rp.status != 0x00) { fprintf(stdout, "Status: %s [%#02x]\n", hci_status2str(rp.status), rp.status); *return* (FAILED); } at the end of the hci_write_inquiry_mode function is: Status: Unsupported feature or parameter value [0x11] Iain Hibbert wrote: >On Tue, 28 Mar 2006, Carlos Fernández Herranz wrote: > > > >>Sorry, here is the code: >> >> > >and hcidump shows the command going in and completing correctly? > >If you subsequently do a Read_Inquiry_Mode command, does it return >mode==0x01? > >iain > From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 28 15:10:31 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F11F16A448 for ; Tue, 28 Mar 2006 15:10:31 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from mail09.svc.cra.dublin.eircom.net (mail09.svc.cra.dublin.eircom.net [159.134.118.25]) by mx1.FreeBSD.org (Postfix) with SMTP id DC63543D48 for ; Tue, 28 Mar 2006 15:10:30 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 98420 messnum 2872225 invoked from network[83.70.176.191/unknown]); 28 Mar 2006 15:10:28 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail09.svc.cra.dublin.eircom.net (qp 98420) with SMTP; 28 Mar 2006 15:10:28 -0000 Received: (nullmailer pid 3711 invoked by uid 1000); Tue, 28 Mar 2006 15:09:08 -0000 Date: Tue, 28 Mar 2006 16:09:08 +0100 (BST) To: =?ISO-8859-1?Q?Carlos_Fern=E1ndez_Herranz?= In-Reply-To: <44294D1D.4010901@udc.es> References: <4423D096.2010205@udc.es> <44248823.3040907@savvis.net> <44291782.8010003@udc.es> <1143546159.980113.1641.nullmailer@galant.ukfsn.org> <44292470.5020803@udc.es> <1143547703.630752.2338.nullmailer@galant.ukfsn.org> <44294D1D.4010901@udc.es> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-571369511-1143558548=:3517" Message-Id: <1143558548.478651.3242.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: About Inquiry_with_RSSI X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 15:10:31 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-571369511-1143558548=:3517 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 28 Mar 2006, Carlos Fern=E1ndez Herranz wrote: > I didn't try the "Read_Inquiry_Mode" command yet (because I have to imple= ment > it), but the response I get from > > *if* (rp.status !=3D 0x00) { > fprintf(stdout, "Status: %s [%#02x]\n", > hci_status2str(rp.status), rp.status); > *return* (FAILED); > } > > > at the end of the hci_write_inquiry_mode function is: > > Status: Unsupported feature or parameter value [0x11] Looks like your Bluetooth controller does not support RSSI with Inquiry. Um, I'm not sure how FreeBSD hccontrol works, but it looks that you can get the device features list with 'read_local_supported_features' command to hccontrol? The version I have here doesnt look to know about the "RSSI with Inquiry" feature, which would be indicated by bit 6 (0x40) in byte 3 of the features report. Note, that "RSSI with Inquiry" is not the same as "RSSI" - I think the latter is just for the Read_RSSI command and you must be already connected for that (need connection handle) iain --0-571369511-1143558548=:3517--