Skip to contentSkip to conversation

Building btsco for Fedora 3

Bluez-devel Mark Watson 4 participants 6 messages May 15, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi. Hopefully this is the right list for this question.

I'm attempting to build btsco and the associated kernel driver for Fedora 3, kernel 2.6.11-1.14_FC3

With btsco, I get ...

Quoted 4 lines

make[2]: Entering directory `/tmp/btsco'
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -Wall -O2 -c a2recv.c
a2recv.c: In function `make_master':
a2recv.c:281: error: incompatible type for argument 2 of `hci_switch_role'

So, first question, can I get away with commenting out the relevant call?

Second question concerns the kernel driver, and to be frank my inability to keep up with the fedora build process. I get:

Quoted 1 line

make: *** /lib/modules/2.6.11-1.14_FC3/source: No such file or directory. Stop.

Turns out no modules source directory was installed with this kernel rpm, though it does exist for older kernels. Any tips? I'm guessing this is an issue with the kernel rpm?

Any help appreciated.

Mark

begin:vcard
fn:Mark Watson
n:Watson;Mark
org:Volantis Systems
adr:Occam Road;;1 Chancellor Court;Guildford;Surrey;GU9 7YT;UK email;internet:[email protected]
title:Co-Founder and Chief Technology Officer tel;work:+44 1483 739777
tel;fax:+44 1483 739739
tel;cell:+44 771 489 9417
note:Assistant = Zoe Jones, +44 1483 739773, [email protected] x-mozilla-html:TRUE
url:http://www.volantis.com
version:2.1
end:vcard

#1 lore raw

Moin,

Am Sun, 15 May 2005 01:47:37 +0100 schrieb Mark Watson:

Quoted 8 lines
Quoted 5 lines

make[2]: Entering directory `/tmp/btsco'
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -Wall -O2 -c
a2recv.c a2recv.c: In function `make_master':
a2recv.c:281: error: incompatible type for argument 2 of `hci_switch_role'

So, first question, can I get away with commenting out the relevant call?

Yes. This is from a2recv which you probably won't need anyways (it's for receiving A2DP audio data) and that specific function is only a workaround for the behaviour of the iPHONO audio dongle.

Quoted 5 lines
Quoted 2 lines

make: *** /lib/modules/2.6.11-1.14_FC3/source: No such file or directory. Stop.

Turns out no modules source directory was installed with this kernel rpm, though it does exist for older kernels.

Hmm, can't help you with that (I'm mostly always using vanilla kernels from kernel.org) but you will probably need the kernel sources to compile.

Signature · 4 lines
Henryk Plötz
Grüße aus Berlin
~~~~~~~ Un-CDs, nein danke! http://www.heise.de/ct/cd-register/ ~~~~~~~
~ Help Microsoft fight software piracy: Give Linux to a friend today! ~
#2 lore raw
In reply to Mark Watson

Mark

Quoted 1 line

Hi. Hopefully this is the right list for this question.

yes, great.

Quoted 1 line
Quoted 1 line

a2recv.c:281: error: incompatible type for argument 2 of `hci_switch_role'

go ahead and comment it out. i had no idea this api had changed though.

Quoted 1 line
Quoted 1 line

make: *** /lib/modules/2.6.11-1.14_FC3/source: No such file or directory. Stop.

source is a softlink to the source dir on my machine. it may be good enough to install the kernel-header package for your kern version. look for a kernel-source package too.

brad

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#3 lore raw
Quoted 7 lines · Brad Midgley

Mark
...

Quoted 2 lines
Quoted 1 line

make: *** /lib/modules/2.6.11-1.14_FC3/source: No such file or directory. Stop.

source is a softlink to the source dir on my machine. it may be good enough to install the kernel-header package for your kern version. look for a kernel-source package too.

Thanks Brad. Turns out the link was the thing I missed. Made link, made config in kernel source dir and the driver built. Now (and firstly, I'm probably continuing to be dense, and probably secondly, in the wrong list at this stage) after depmod the mod loads OK but when I try:

btsco <device address> 1

.. when in pairing mode on the device (a jabra 250) I get

Can't connect RFCOMM channel: Resource temporarily unavailable

I've set the default pin via bluez-pin, was previously seeing auth requests in log.

Mark

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw

Mark,

Quoted 1 line

btsco <device address> 1

try it without specifying the '1' (the channel should be autodetected)

btw, does it say anywhere in our docs that you need to specify the channel?

brad

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#5 lore raw
Quoted 3 lines · Brad Midgley

try it without specifying the '1' (the channel should be autodetected)

btw, does it say anywhere in our docs that you need to specify the channel?

You're right, it doesn't. I was following various examples from Google.

Here's my attempt to connect, with tail -f /var/log/messages in the background:

Quoted 6 lines

[bluetooth]# btsco 00:07:A4:07:52:3D

May 15 20:51:02 localhost hcid[7935]: pin_code_request (sba=00:20:E0:74:66:58, dba=00:07:A4:07:52:3D)

Error: Failed to connect to SDP server: Function not implemented Assuming channel 2

Can't connect RFCOMM channel: Resource temporarily unavailable

And here's the hcidump -X output

Quoted 24 lines

[bluetooth]# hcidump -X
HCIDump - HCI packet analyzer ver 1.11
device: hci0 snap_len: 1028 filter: 0xffffffff < HCI Command: Create Connection (0x01|0x0005) plen 13
0000: 3d 52 07 a4 07 00 18 cc 02 00 00 00 00 =R...........

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

0000: 00 01 05 04 ....

Quoted 1 line

HCI Event: PIN Code Request (0x16) plen 6

0000: 3d 52 07 a4 07 00 =R....
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
0000: 3d 52 07 a4 07 00 2b 53 65 72 76 69 63 65 20 22 =R....+Service "
0010: 6f 72 67 2e 62 6c 75 org.blu

Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

0000: 01 0d 04 12 3d 52 07 a4 07 00 ....=R....

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

0000: 22 29 00 3d 52 07 a4 07 00 01 00 ").=R......
< HCI Command: Read Voice Setting (0x03|0x0025) plen 0

Quoted 1 line

HCI Event: Command Complete (0x0e) plen 6

0000: 01 25 0c 00 60 00 .%..`.
< HCI Command: Create Connection (0x01|0x0005) plen 13
0000: 3d 52 07 a4 07 00 18 cc 02 00 00 00 00 =R...........

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

0000: 00 01 05 04 ....

Quoted 1 line

HCI Event: PIN Code Request (0x16) plen 6

Quoted 8 lines

0000: 3d 52 07 a4 07 00 =R....
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
0000: 3d 52 07 a4 07 00 2b 53 65 72 76 69 63 65 20 22 =R....+Service "
0010: 6f 72 67 2e 62 6c 75 org.blu

Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

0000: 01 0d 04 12 3d 52 07 a4 07 00 ....=R....

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

0000: 22 2a 00 3d 52 07 a4 07 00 01 00 "*.=R......

/etc/bluetooth/pin contains:

0000

I'm not confident the pin number is actually moving across ... bluepin never asks for input during the run

Mark

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel