[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] Errors with CVS OpenBT stack



Hi all!

I have had many errors at the time of compiling of CVS openbt stack
and I tell you for you are find out these mistakes and the solutions
that Fabrizio give me.

Best Regards

Johnny
---------------------

"Johnny Choque" <jchoque@xxxxxxx.es>
06/02/2002 18.28
 
        To:     Fabrizio Gennari/MOZ/RESEARCH/PHILIPS@EMEA1
        cc: 
        Subject:        RE: OpenBT stack issues
        Classification: 

Hi Fabrizio!

I had to download the openbt stack from CVS, but now when I try to compile
I get the following errors:

btmem.c: In function `btmem_init':
btmem.c:117: `ENOMEM' undeclared (first use in this function)
btmem.c:117: (Each undeclared identifier is reported only once
btmem.c:117: for each function it appears in.)
btmem.c:132: warning: control reaches end of non-void function
make[3]: *** [btmem.o] Error 1
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/cvs-openbt/apps/bluetooth/userstack'
make[1]: *** [all-recurse] Error 1
make[1]: Leaving directory `/root/cvs-openbt/apps/bluetooth'
make: *** [all] Error 2

I try to find it using ' grep -rw ENOMEM * ' but
I not found the ENOMEM declaration into all openbt directory.
Where is ENOMEM defined?

-----Mensaje original-----
De: fabrizio.gennari@xxxxxxx.com">mailto:fabrizio.gennari@xxxxxxx.com]
Enviado el: miercoles 6 de febrero de 2002 18:48
Para: Johnny Choque
Asunto: RE: OpenBT stack issues

Hi Johnny!

You can try to include <errno.h>. ENOMEM is defined in <asm/errno.h>

Bye 

Fabrizio Gennari
Philips Research Monza
via G.Casati 23, 20052 Monza (MI), Italy
tel. +39 039 2037816, fax +39 039 2037800

-----------------------

"Johnny Choque" <jchoque@xxxxxxx.es>
07/02/2002 12.35

 
        To:     Fabrizio Gennari/MOZ/RESEARCH/PHILIPS@EMEA1
        cc: 
        Subject:        RE: OpenBT stack issues
        Classification: 



Hi Fabrizio!

now I get the following error:

cc -Wall -O0 -g -fno-omit-frame-pointer -DHAVE_READLINE_READLINE 
-DBTD_USERS
TACK
   -c -o l2cap.o l2cap.c
l2cap.c: In function `l2cap_rtx_timeout':
l2cap.c:1964: request for member `inuse' in something not a structure or
union
l2cap.c: In function `l2cap_ertx_timeout':
l2cap.c:2002: request for member `inuse' in something not a structure or
union
l2cap.c: In function `start_rtx':
l2cap.c:3022: request for member `inuse' in something not a structure or
union
l2cap.c: In function `start_ertx':
l2cap.c:3085: request for member `inuse' in something not a structure or
union
l2cap.c:3099: structure has no member named `timer'
l2cap.c: In function `disable_ertx':
l2cap.c:3116: request for member `inuse' in something not a structure or
union
l2cap.c: At top level:
l2cap.c:1948: warning: `l2cap_rtx_timeout' defined but not used
l2cap.c:1992: warning: `l2cap_ertx_timeout' defined but not used
make[3]: *** [l2cap.o] Error 1
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/cvs-openbt/apps/bluetooth/userstack'
make[1]: *** [all-recurse] Error 1
make[1]: Leaving directory `/root/cvs-openbt/apps/bluetooth'
make: *** [all] Error 2

I think that the compiler don't recognize the variable 'inuse'. In
btcommon.h file,
'inuse' is defined into bt_timer_obj struct which it's used by
l2cap_timer_obj for
define the variable 'rtx'. That last declaration have conditional 
definition
depending
#ifdef __KERNEL__ , What's my error? I have forget some options
compilations?

Best regards,

Johnny

----------------
Hi Johnny!

This is a serious error and you should report it to the mailing list! 
Also, report the errno.h when compiling btmem.c in the userstack.

The only workaround I can tell you is to go to the file 
linux/include/linux/bluetooth/btconfig.h and replace

#define CONFIG_BLUETOOTH_L2CAP_USE_TIMERS

with

#undef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS

Also, modify the file linux/drivers/char/bluetooth/l2cap_con.c : replace 

        con->timers.rtx.inuse = 0;
        con->timers.ertx.inuse = 0;
        con->timers.rtx_no = 0;

with

#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS
        con->timers.rtx.inuse = 0;
        con->timers.ertx.inuse = 0;
        con->timers.rtx_no = 0;
#endif

and

        /* Make sure we don't have any outstanding timers on
           this connection */
        if(con->timers.rtx.inuse) {
                wake_up_interruptible(&con->wq);
                del_timer(&con->timers.rtx.timer);
        }
        if(con->timers.ertx.inuse) {
                wake_up_interruptible(&con->wq);
                del_timer(&con->timers.ertx.timer);
        }

with

#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS
        /* Make sure we don't have any outstanding timers on
           this connection */
        if(con->timers.rtx.inuse) {
                wake_up_interruptible(&con->wq);
                del_timer(&con->timers.rtx.timer);
        }
        if(con->timers.ertx.inuse) {
                wake_up_interruptible(&con->wq);
                del_timer(&con->timers.ertx.timer);
        }
#endif

After that, you will probably get an error at the time of compiling 
userstack's rfcomm.c: you should replace

        rfcomm_timer.inuse = 0;

with

#ifdef __KERNEL__
        rfcomm_timer.inuse = 0;
#endif

,

        /* Make sure we don't have any outstanding timers */
        release_wq_timer(&rfcomm_timer);

with

#ifdef __KERNEL__
        /* Make sure we don't have any outstanding timers */
        release_wq_timer(&rfcomm_timer);
#endif

and

                release_wq_timer(&rfcomm_timer);

with

#ifdef __KERNEL__
                release_wq_timer(&rfcomm_timer);
#endif

After that, you will probably get an error compiling userstack's hci.c: 
you should replace

                bt_handle_hw_error(buf[0]);

with

#ifdef __KERNEL__
                bt_handle_hw_error(buf[0]);
#endif

Now, everything should go well. It seems that the user stack is a little 
unsuported...

Best regards,
Fabrizio







-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com