2005-07-06 11:37:58

by Marcel Holtmann

[permalink] [raw]
Subject: [Bluez-devel] Moving over to GCC 4.0

Hi Folks,

since Debian Etch now also switched to GCC 4.0 as default compiler, it
is time to address all GCC 4.0 problems in the BlueZ source code. I
started two days ago with fixing most of its crazy compiler warnings.
The GCC 4.0 is really picky with the signedness and so I moved over to
explicit types like uint8_t, uint16_t and uint32_t where possible. I now
hope that I haven't introduced any signedness bugs. Please start testing
the CVS versions of libs and utils.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-07-09 07:43:14

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] hcid dies on socket connect attempt.

Hi Dave,

> On a Fedora Core 4 system we have:
>
> dbus-0.33-3
> bluez-utils-2.15-7
> bluez-libs-2.15-1
>
> hcid starts up fine:
>
> ==============================================================================
> hcid -n
> hcid[12537]: Bluetooth HCI daemon
> hcid[12537]: Starting security manager 0
> ==============================================================================
>
> As soon as I try to get a Bluetooth connection, however, it dies (see
> below).
> What might be wrong?

last time I looked at the D-Bus 0.33 changes in the Fedora packages they
seemed to be wrong. Try it with the latest BlueZ CVS.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-09 04:10:30

by Dave Mielke

[permalink] [raw]
Subject: [Bluez-devel] hcid dies on socket connect attempt.

On a Fedora Core 4 system we have:

dbus-0.33-3
bluez-utils-2.15-7
bluez-libs-2.15-1

hcid starts up fine:

==============================================================================
hcid -n
hcid[12537]: Bluetooth HCI daemon
hcid[12537]: Starting security manager 0
==============================================================================

As soon as I try to get a Bluetooth connection, however, it dies (see
below).
What might be wrong?

This code works well on Fedora Core 3. Has something changed? We establish the
connection as follows:

int connection;
connection = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);

struct sockaddr_rc local;
local.rc_family = AF_BLUETOOTH;
local.rc_channel = 0;
bacpy(&local.rc_bdaddr, BDADDR_ANY);
bind(connection, (struct sockaddr *)&local, sizeof(local));

struct sockaddr_rc remote;
remote.rc_family = AF_BLUETOOTH;
remote.rc_channel = /* supplied channel number */;
bacpy(&remote.rc_bdaddr, &/* supplied addreess */);
connect(connection, (struct sockaddr *)&remote, sizeof(remote));

Now here's now hcid dies:

==============================================================================
hcid[12537]: link_key_request (sba=00:0A:3A:53:D7:FC, dba=00:A0:96:0A:C9:10)
hcid[12537]: pin_code_request (sba=00:0A:3A:53:D7:FC, dba=00:A0:96:0A:C9:10)
12537: arguments to dbus_type_is_basic() were incorrect, assertion
"_dbus_type_is_valid (typecode) || typecode == DBUS_TYPE_INVALID" failed in
file dbus-signature.c line 259.
This is normally a bug in some application using the D-BUS library.
type unknown isn't supported yet in dbus_message_append_args_valist
*** buffer overflow detected ***: hcid: processing events terminated
======= Backtrace: =========
/lib/libc.so.6(__chk_fail+0x41)[0x781565]
hcid: processing events[0x880e8b]
/usr/lib/libdbus-1.so.1[0x296155]
/usr/lib/libdbus-1.so.1[0x27649e]
/usr/lib/libdbus-1.so.1(dbus_connection_dispatch+0x20a)[0x27af44]
hcid: processing events[0x8809c0]
hcid: processing events[0x8808b0]
hcid: processing events(main+0x4c5)[0x87cfef]
/lib/libc.so.6(__libc_start_main+0xc6)[0x6b7de6]
hcid: processing events[0x87c071]
======= Memory map: ========
0026a000-002d3000 r-xp 00000000 fd:00 3051963 /usr/lib/libdbus-1.so.1.0.0
002d3000-002d8000 rwxp 00069000 fd:00 3051963 /usr/lib/libdbus-1.so.1.0.0
00301000-0031b000 r-xp 00000000 fd:00 8676400 /lib/ld-2.3.5.so
0031b000-0031c000 r-xp 00019000 fd:00 8676400 /lib/ld-2.3.5.so
0031c000-0031d000 rwxp 0001a000 fd:00 8676400 /lib/ld-2.3.5.so
003cd000-003ce000 r-xp 003cd000 00:00 0
006a3000-007c7000 r-xp 00000000 fd:00 8676401 /lib/libc-2.3.5.so
007c7000-007c9000 r-xp 00124000 fd:00 8676401 /lib/libc-2.3.5.so
007c9000-007cb000 rwxp 00126000 fd:00 8676401 /lib/libc-2.3.5.so
007cb000-007cd000 rwxp 007cb000 00:00 0
0085c000-00865000 r-xp 00000000 fd:00 8676405
/lib/libgcc_s-4.0.0-20050520.so.1
00865000-00866000 rwxp 00009000 fd:00 8676405
/lib/libgcc_s-4.0.0-20050520.so.1
0087a000-00884000 r-xp 00000000 fd:00 3051713 /usr/sbin/hcid
00884000-00885000 rwxp 00009000 fd:00 3051713 /usr/sbin/hcid
00a09000-00a15000 r-xp 00000000 fd:00 3048829
/usr/lib/libbluetooth.so.1.0.15
00a15000-00a16000 rwxp 0000c000 fd:00 3048829
/usr/lib/libbluetooth.so.1.0.15
00eb6000-00ec8000 r-xp 00000000 fd:00 8676413 /lib/libnsl-2.3.5.so
00ec8000-00ec9000 r-xp 00011000 fd:00 8676413 /lib/libnsl-2.3.5.so
00ec9000-00eca000 rwxp 00012000 fd:00 8676413 /lib/libnsl-2.3.5.so
00eca000-00ecc000 rwxp 00eca000 00:00 0
08462000-08483000 rw-p 08462000 00:00 0 [heap]
b7f78000-b7f7a000 rw-p b7f78000 00:00 0
b7f9e000-b7f9f000 rw-p b7f9e000 00:00 0
bfb89000-bfb9f000 rw-p bfb89000 00:00 0 [stack]
Aborted
==============================================================================

--
Dave Mielke | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario | Word of God. Please contact me
EMail: [email protected] | Canada K2A 1H7 | if you're concerned about Hell.
http://FamilyRadio.com/ | http://Mielke.cc/bible/


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 17:48:50

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Moving over to GCC 4.0

Hi Luiz,

> > since Debian Etch now also switched to GCC 4.0 as default compiler, it
> > is time to address all GCC 4.0 problems in the BlueZ source code. I
> > started two days ago with fixing most of its crazy compiler warnings.
> > The GCC 4.0 is really picky with the signedness and so I moved over to
> > explicit types like uint8_t, uint16_t and uint32_t where possible. I now
> > hope that I haven't introduced any signedness bugs. Please start testing
> > the CVS versions of libs and utils.
>
> Good news. :)
>
> I'd like to know if you're going to accept patches which fixes Linus sparse
> warnings, they seems to be trivial though.

I never used sparse outside the kernel, but go ahead and send patches.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 16:35:13

by Luiz Fernando Capitulino

[permalink] [raw]
Subject: Re: [Bluez-devel] Moving over to GCC 4.0

Hi Marcel,

Marcel Holtmann wrote:
> Hi Folks,
>
> since Debian Etch now also switched to GCC 4.0 as default compiler, it
> is time to address all GCC 4.0 problems in the BlueZ source code. I
> started two days ago with fixing most of its crazy compiler warnings.
> The GCC 4.0 is really picky with the signedness and so I moved over to
> explicit types like uint8_t, uint16_t and uint32_t where possible. I now
> hope that I haven't introduced any signedness bugs. Please start testing
> the CVS versions of libs and utils.

Good news. :)

I'd like to know if you're going to accept patches which fixes Linus sparse
warnings, they seems to be trivial though.

PS: I think CVS is back again, it's working here.

Thanks,


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 17:09:36

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Moving over to GCC 4.0

Hi Peter,

> > > just FYI everybody... sourceforge seems to have broken anonymous cvs
> > > (both bluez and bluetooth-alsa are affected)
> > >
> > > $ cvs update -d
> > > cvs [update aborted]: unrecognized auth response from cvs.bluez.org: cvs
> > > pserver: cannot read /cvsroot/bluez/CVSROOT/config: Input/output error
> >
> > argh, not again. This crazy error postponed the bluez-{libs|utils}-2.18
> > release already, because I always build the release packages from the
> > anonymous CVS.
>
> I've been seeing this problem on and off for a week or more.

start filing bug reports at sf.net so they have to react on it and
hopefully improve their CVS service.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 17:02:51

by Peter Robinson

[permalink] [raw]
Subject: Re: [Bluez-devel] Moving over to GCC 4.0

Hi Marcel,

> > just FYI everybody... sourceforge seems to have broken anonymous cvs
> > (both bluez and bluetooth-alsa are affected)
> >
> > $ cvs update -d
> > cvs [update aborted]: unrecognized auth response from cvs.bluez.org: cv=
s
> > pserver: cannot read /cvsroot/bluez/CVSROOT/config: Input/output error
>=20
> argh, not again. This crazy error postponed the bluez-{libs|utils}-2.18
> release already, because I always build the release packages from the
> anonymous CVS.

I've been seeing this problem on and off for a week or more.

Peter


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 16:57:50

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Moving over to GCC 4.0

Hi Brad,

> just FYI everybody... sourceforge seems to have broken anonymous cvs
> (both bluez and bluetooth-alsa are affected)
>
> $ cvs update -d
> cvs [update aborted]: unrecognized auth response from cvs.bluez.org: cvs
> pserver: cannot read /cvsroot/bluez/CVSROOT/config: Input/output error

argh, not again. This crazy error postponed the bluez-{libs|utils}-2.18
release already, because I always build the release packages from the
anonymous CVS.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 15:24:22

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Moving over to GCC 4.0

just FYI everybody... sourceforge seems to have broken anonymous cvs
(both bluez and bluetooth-alsa are affected)

$ cvs update -d
cvs [update aborted]: unrecognized auth response from cvs.bluez.org: cvs
pserver: cannot read /cvsroot/bluez/CVSROOT/config: Input/output error

Marcel Holtmann wrote:
> Hi Folks,
>
> since Debian Etch now also switched to GCC 4.0 as default compiler, it
> is time to address all GCC 4.0 problems in the BlueZ source code. I
> started two days ago with fixing most of its crazy compiler warnings.
> The GCC 4.0 is really picky with the signedness and so I moved over to
> explicit types like uint8_t, uint16_t and uint32_t where possible. I now
> hope that I haven't introduced any signedness bugs. Please start testing
> the CVS versions of libs and utils.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 12:43:59

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Querying device information.

Hi Dave,

> >this depends on the information you want.
>
> Bluetooth is new to me so I'll describe what I'm looking for in terms of USB.
> I'm looking to determine what kind of device is connected to the other end of
> the socket in the same way that I'd use the USB Vendor/Product identifiers.

no you can't, but you can use SDP to retrieve information about the
services/profiles offered by the peer device.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 12:33:59

by Dave Mielke

[permalink] [raw]
Subject: Re: [Bluez-devel] Querying device information.

[quoted lines by Marcel Holtmann on 2005/07/06 at 14:26 +0200]

>this depends on the information you want.

Bluetooth is new to me so I'll describe what I'm looking for in terms of USB.
I'm looking to determine what kind of device is connected to the other end of
the socket in the same way that I'd use the USB Vendor/Product identifiers.

--
Dave Mielke | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario | Word of God. Please contact me
EMail: [email protected] | Canada K2A 1H7 | if you're concerned about Hell.
http://FamilyRadio.com/ | http://Mielke.cc/bible/


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 12:26:27

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Querying device information.

Hi Dave,

> If, from a user-space application, I have a socket which has been created via:
>
> socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
>
> are there any special Bluetooth ioctls which can be used to, for example, query
> device information? If so, where can I find and/or read about them? Is there
> another interface I should be using? Thanks.

this depends on the information you want. In general you need to use the
BlueZ HCI API.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-06 12:09:35

by Dave Mielke

[permalink] [raw]
Subject: [Bluez-devel] Querying device information.

Please forgive me if I'm asking a question with an obvious answer.

If, from a user-space application, I have a socket which has been created via:

socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)

are there any special Bluetooth ioctls which can be used to, for example, query
device information? If so, where can I find and/or read about them? Is there
another interface I should be using? Thanks.

--
Dave Mielke | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario | Word of God. Please contact me
EMail: [email protected] | Canada K2A 1H7 | if you're concerned about Hell.
http://FamilyRadio.com/ | http://Mielke.cc/bible/


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel