Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56173 - net-wireless/bluez-utils: /etc/bluetooth/pin: must go back to the original version of the file!
Summary: net-wireless/bluez-utils: /etc/bluetooth/pin: must go back to the original ve...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Alastair Tse (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-05 14:05 UTC by Ioannis Aslanidis (RETIRED)
Modified: 2004-10-17 04:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ioannis Aslanidis (RETIRED) gentoo-dev 2004-07-05 14:05:18 UTC
I have been testing the host-to-host bluetooth system and it might be correct to have the following /etc/bluetooth/pin for external devices:

-----

#!/bin/sh
echo "PIN:123456"

-----

But in the case of interconnecting two computers through bluetooth, this file *MUST* be like the original version, that is:

-----

123456

-----

I have tested it and you can check it here: http://forums.gentoo.org/viewtopic.php?t=194183

I hope you can bring a solution that satisfies both parts :)

-- Just in case, can someone test that indeed the provided /etc/bluetooth/pin works correctly for non-host bluetooth devices like PDAs, mobile phones and so on?

Reproducible: Always
Steps to Reproduce:
Comment 1 Alastair Tse (RETIRED) gentoo-dev 2004-07-06 05:28:37 UTC
what do you mean by "two interconnecting computers"? are you using ppp to connect through them?
Comment 2 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-07-06 06:01:35 UTC
I made no connection yet. The rfcomm part comes later... first I need pin synchronization. With interconnecting two computers I mean:

HOST1--BTadapter ))))))) BTadapter--HOST2
HOST1--BTadapter ((((((( BTadapter--HOST2

Two bluetooth adapters, one on each computer. With that, you can use hcitools and scan and detect them, but nothing else. In order to do a simple l2ping, you need to have paired the 2 adapters with the pin which is read from file /etc/bluetooth/pin.
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2004-07-06 09:47:39 UTC
ok, i think i know what you mean. let me see what we can do with it.
Comment 4 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-07-06 12:34:58 UTC
Alright, forget it! I've found a workaround.

This workaround also helps on bug 56157.

alright, there is a nice problem here:

hcid.conf:

        # PIN helper
        #pin_helper /usr/bin/bluepin;
        pin_helper /etc/bluetooth/pin;

Alright, if we use the default pin helper, /usr/bin/bluepin, it doesn't work. If  we use /etc/bluetooth/pin, it does work for out-going connections. Nice! But unfortunately not enough.

The sdpd daemon, still reads /etc/bluetooth/pin and needs the raw pin number in there.

So my suggestion to solve this is the following:

-----
/etc/bluetooth/pin:
---
123456
-----
-----
/etc/bluetooth/pin-helper:
---
#!/bin/sh
echo "PIN:123456"
-----

That is, to let sdpd have it's pin file there, while still allowing hcid.conf use the text mode pin helper.
Comment 5 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-07-06 12:37:11 UTC
Sorry for writting so many times 'alright'

It would perhaps be better to have the following pin-helper:

#!/bin/sh
echo -n "PIN:"
cat /etc/bluetooth/pin

Comment 6 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-07-06 12:46:33 UTC
Additional remark:

sdpd is used for incoming connections and needs a /etc/bluetooth/pin like:

123456

hcid is used for outgoing connections and, if using the /etc/bluetooth/pin helper (which I renamed to /etc/bluetooth/pin-helper), should be the bash-script one.


I have tested this right now so I can confirm this behaviour... it is also logical, sdpd is the service discovery protocol daemon, so it is expected that it recieves incomming connections.
Comment 7 Alastair Tse (RETIRED) gentoo-dev 2004-07-24 12:56:50 UTC
reassigning to myself before i forget about this
Comment 8 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-07-24 13:07:42 UTC
I know yiu are with the 2004.2 release so... could I know when you could check this? The HOWTO is still waiting... :P
Comment 9 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-08-13 05:29:34 UTC
I'm interested in having this checked and fixed asap. Time estimation please... the fix is pretty simple.
Comment 10 Alastair Tse (RETIRED) gentoo-dev 2004-09-21 16:12:02 UTC
sorry for the delay. i was waiting for the other changes associated with -r1 as well. it is now changed in 2.10-r1.
Comment 11 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-10-17 04:15:33 UTC
Verified.