Return-Path: Message-ID: <94e407f00511080958j74841800k45532fdbd149e9cd@mail.gmail.com> From: Arpit Rai To: bluez-devel@lists.sourceforge.net Subject: Re: [Bluez-devel] C Program for Getting Link Quality In-Reply-To: <1131454195.5824.161.camel@blade> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12203_6344898.1131472690679" References: <94e407f00511080131u11f01d79x65d05cfe47ccbb7@mail.gmail.com> <1131454195.5824.161.camel@blade> Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 9 Nov 2005 01:58:10 +0800 ------=_Part_12203_6344898.1131472690679 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Marcel I did a yum update bluez*. The verion I'm using is: [root@174-15 bluetooth]# ls -l total 116 -rw-r--r-- 1 root root 3607 Mar 2 2005 bluetooth.h On including sys/socket.h..the error is the same: [root@174-15 cprog]# gcc -o getlq getlq.c -lbluetooth getlq.c: In function 'main': getlq.c:54: error: 'hci_conn_info_req' undeclared (first use in this function) getlq.c:54: error: (Each undeclared identifier is reported only once getlq.c:54: error: for each function it appears in.) getlq.c:54: error: syntax error before ')' token getlq.c:60: error: syntax error before 'int' getlq.c: At top level: getlq.c:66: error: syntax error before '&' token getlq.c:86: error: 'rp' undeclared here (not in a function) getlq.c:87: error: syntax error before string constant getlq.c:87: error: conflicting types for 'printf' getlq.c:87: note: a parameter list with an ellipsis can't match an empty parameter name list declaration getlq.c:87: warning: data definition has no type or storage class getlq.c:89: warning: parameter names (without types) in function declaratio= n getlq.c:89: warning: data definition has no type or storage class getlq.c:90: warning: parameter names (without types) in function declaratio= n getlq.c:90: error: conflicting types for 'free' /usr/include/stdlib.h:601: error: previous declaration of 'free' was here getlq.c:90: warning: data definition has no type or storage class getlq.c:93: error: syntax error before '}' token Any idea why its saying hci_conn_info_req undeclared? Regards Arpit On 11/8/05, Marcel Holtmann wrote: > > Hi Arpit, > > > I've written a C program to help me get the link quality between two > > bluetooth dongles. But, on compilation there are problems with the > > definition: > > > > cr =3D (hci_conn_info_req *)malloc(sizeof(*cr) + sizeof(struct > > hci_conn_info)); (Error: 'hci_conn_info_req' undeclared) > > > > This the program I'm running: > > > > //Program for finding LQ > > #include > > #include > > #include > > #include > > #include > > #include > > don't forget to include before or > use a newer version of the Bluetooth library. > > Regards > > Marcel > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Bluez-devel mailing list > Bluez-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-devel > ------=_Part_12203_6344898.1131472690679 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Marcel

I did a yum update bluez*.

The verion I'm using is:

[root@174-15 bluetooth]# ls -l
total 116
-rw-r--r--  1 root root  3= 607 Mar  2  2005 bluetooth.h

On including sys/socket.h..the error is the same:

[root@174-15 cprog]# gcc -o getlq ge= tlq.c -lbluetooth
getlq.c: In function 'main':<= br style=3D"color: rgb(255, 0, 0);"> getlq.c:54: error: 'hci_conn_info_re= q' undeclared (first use in this function)
getlq.c:54: error: (Each undeclared = identifier is reported only once
getlq.c:54: error: for each function= it appears in.)
getlq.c:54: error: syntax error befo= re ')' token
getlq.c:60: error: syntax error befo= re 'int'
getlq.c: At top level:
getlq.c:66: error: syntax error befo= re '&' token
getlq.c:86: error: 'rp' undeclared h= ere (not in a function)
getlq.c:87: error: syntax error befo= re string constant
getlq.c:87: error: conflicting types= for 'printf'
getlq.c:87: note: a parameter list w= ith an ellipsis can't match an empty parameter name list declaration=
getlq.c:87: warning: data definition= has no type or storage class
getlq.c:89: warning: parameter names= (without types) in function declaration
getlq.c:89: warning: data definition= has no type or storage class
getlq.c:90: warning: parameter names= (without types) in function declaration
getlq.c:90: error: conflicting types= for 'free'
/usr/include/stdlib.h:601: error: pr= evious declaration of 'free' was here
getlq.c:90: warning: data definition= has no type or storage class
getlq.c:93: error: syntax error befo= re '}' token

Any idea why its saying hci_conn_info_req undeclared?

Regards
Arpit

On 11/8/05, Marcel Holtmann <marcel@holtmann.org> wrote:
Hi Arpit,

> I've written a C program to help me get the link qual= ity between two
> bluetooth dongles. But, on compilation there are pr= oblems with the
> definition:
>
> cr =3D (hci_conn_info_r= eq *)malloc(sizeof(*cr) + sizeof(struct
> hci_conn_info)); (Error: 'hci_conn_info_req' undeclared)
>> This the program I'm running:
>
> //Program for finding = LQ
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> #include <bluetooth/bluetooth.h&g= t;
> #include <bluetooth/hci.h>
> #include <bluetooth/= hci_lib.h>

don't forget to include <sys/socket.h> before &l= t;bluetooth/bluetooth.h> or
use a newer version of the Bluetooth library.

Regards

Mar= cel




----------------------------------------------------= ---
SF.Net email is sponsored by:
Tame your development challenges wi= th Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very = own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
________= _______________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/= lists/listinfo/bluez-devel

------=_Part_12203_6344898.1131472690679-- ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel