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 >