2006-08-23 08:29:17

by jonny Linux

[permalink] [raw]
Subject: [Bluez-users] How do I reset a pairing?

Hi,

I'm quite new to bluetooth, and very new to bluez. I have a desktop and a
laptop both running Fedora Core 5. I'm trying to connect to my Lego
Mindstorms NXT. If I try to connect from the laptop I get no problems
connecting. But if I try to connect from the desktop I get a "Permission
denied error", or if I try "hcitool cc <ba>" I get "Can't create connection:
Input/output error".

I don't get asked for a pin when I connect from the desktop, but I think I
was once asked for a pin. So I think somehow the pairing between the devices
has been broken. Is there anyway I can reset the pairing between the desktop
and the NXT?

Thanks,

Jonny


Attachments:
(No filename) (647.00 B)
(No filename) (713.00 B)
(No filename) (373.00 B)
(No filename) (164.00 B)
Download all attachments

2006-09-01 00:29:31

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

I killed kdebluetooth and made sure no traces of it were running. I get the
same errors.

Here is the hcidump -X -V with kdebluetooth off:
18:23:48 root@linux:/home/bearcat# hcidump -X -V
HCI sniffer - Bluetooth packet analyzer ver 1.31
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x04 handle 0 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
Error: Page Timeout
< HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> HCI Event: Command Complete (0x0e) plen 6
Read Voice Setting (0x03|0x0025) ncmd 1
status 0x00 voice setting 0x0060
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x04 handle 0 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
Error: Page Timeout

At the command line
18:21:36 bearcat@linux:~$ btsco 00:0D:44:4F:37:72
Error: Failed to connect to SDP server: Function not implemented
Assuming channel 2

Can't connect RFCOMM channel: Resource temporarily unavailable
18:23:07 bearcat@linux:~$ btsco 00:0D:44:4F:37:72
Error: Failed to connect to SDP server: Host is down
Assuming channel 2

Can't connect RFCOMM channel: Host is down


Thanks,

Bearcat

On Thursday 31 August 2006 16:08 in an email titled "Re: [Bluez-users] How do
I reset a pairing?" Marcel Holtmann wrote:
>Hi Bearcat,
>
>> Thank you. Here is the output from hcidump -X -V:
>>
>> 11:46:21 root@linux:/home/bearcat# hcidump -X -V
>> HCI sniffer - Bluetooth packet analyzer ver 1.31
>> device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
>> < HCI Command: Create Connection (0x01|0x0005) plen 13
>> bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
>> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
>>
>> > HCI Event: Command Status (0x0f) plen 4
>>
>> Create Connection (0x01|0x0005) status 0x00 ncmd 1
>>
>> > HCI Event: PIN Code Request (0x16) plen 6
>>
>> bdaddr 00:0D:44:4F:37:72
>>
>> > HCI Event: Mode Change (0x14) plen 6
>>
>> status 0x00 handle 41 mode 0x00 interval 0
>> Mode: Active
>>
>> > HCI Event: Mode Change (0x14) plen 6
>>
>> status 0x00 handle 41 mode 0x02 interval 126
>> Mode: Sniff
>>
>> > HCI Event: Connect Complete (0x03) plen 11
>>
>> status 0x22 handle 44 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
>> Error: LMP Response Timeout
>> < HCI Command: Read Voice Setting (0x03|0x0025) plen 0
>>
>> > HCI Event: Command Complete (0x0e) plen 6
>>
>> Read Voice Setting (0x03|0x0025) ncmd 1
>> status 0x00 voice setting 0x0060
>> < HCI Command: Create Connection (0x01|0x0005) plen 13
>> bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
>> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
>>
>> > HCI Event: Command Status (0x0f) plen 4
>>
>> Create Connection (0x01|0x0005) status 0x00 ncmd 1
>>
>> > HCI Event: PIN Code Request (0x16) plen 6
>>
>> bdaddr 00:0D:44:4F:37:72
>> < HCI Command: Inquiry (0x01|0x0001) plen 5
>> lap 0x9e8b33 len 6 num 0
>>
>> > HCI Event: Command Status (0x0f) plen 4
>>
>> Inquiry (0x01|0x0001) status 0x00 ncmd 1
>>
>> > HCI Event: Inquiry Result (0x02) plen 15
>>
>> bdaddr 00:0D:44:4F:37:72 mode 1 clkoffset 0x50a7 class 0x200404
>>
>> > HCI Event: Inquiry Complete (0x01) plen 1
>>
>> status 0x00
>>
>> > HCI Event: Connect Complete (0x03) plen 11
>>
>> status 0x22 handle 45 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
>> Error: LMP Response Timeout
>
>this looks like you have the KDE Bluetooth thingy running and it
>interferes when trying to connect. They always did this scanning thing
>without actually checking if the HCI controller is in use. I would
>advise you to not use KDE Bluetooth unless they switched to using the
>new D-Bus driven API.
>
>Regards
>
>Marcel

--
Bearcat M. Sandor
[email protected]
Jabber: [email protected]
ICQ: 6628727
MSN: [email protected]
Yahoo: bearcatsandor
AIM: bearcatmsandor

2006-08-31 17:50:37

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Marcel,

Thank you. Here is the output from hcidump -X -V:

11:46:21 root@linux:/home/bearcat# hcidump -X -V
HCI sniffer - Bluetooth packet analyzer ver 1.31
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: PIN Code Request (0x16) plen 6
bdaddr 00:0D:44:4F:37:72
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 41 mode 0x00 interval 0
Mode: Active
> HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 41 mode 0x02 interval 126
Mode: Sniff
> HCI Event: Connect Complete (0x03) plen 11
status 0x22 handle 44 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
Error: LMP Response Timeout
< HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> HCI Event: Command Complete (0x0e) plen 6
Read Voice Setting (0x03|0x0025) ncmd 1
status 0x00 voice setting 0x0060
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: PIN Code Request (0x16) plen 6
bdaddr 00:0D:44:4F:37:72
< HCI Command: Inquiry (0x01|0x0001) plen 5
lap 0x9e8b33 len 6 num 0
> HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Inquiry Result (0x02) plen 15
bdaddr 00:0D:44:4F:37:72 mode 1 clkoffset 0x50a7 class 0x200404
> HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
> HCI Event: Connect Complete (0x03) plen 11
status 0x22 handle 45 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
Error: LMP Response Timeout

Bearcat M. Sandor

On Thursday 31 August 2006 05:04 in an email titled "Re: [Bluez-users] How do
I reset a pairing?" Marcel Holtmann wrote:
>Hi Bearcat,
>
>
>run "hcidump -X -V". This output is not really helpful.
>
>Regards
>
>Marcel

--
Bearcat M. Sandor
[email protected]
Jabber: [email protected]
ICQ: 6628727
MSN: [email protected]
Yahoo: bearcatsandor
AIM: bearcatmsandor

2006-08-31 11:04:38

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> Alright, we're getting there. I added the line to the pincodes file and now
> the pin is accepted.
>
> However, doing an btsco 00:0D:44:4F:37:72 i get
>
> Error: Failed to connect to SDP server: Function not implemented
> Assuming channel 2
>
> Can't connect RFCOMM channel: Resource temporarily unavailable
>
> hcidump gives me:
>
> HCI sniffer - Bluetooth packet analyzer ver 1.31
> device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> > HCI Event: Command Status (0x0f) plen 4
> > HCI Event: PIN Code Request (0x16) plen 6
> > HCI Event: Mode Change (0x14) plen 6
> > HCI Event: Mode Change (0x14) plen 6
> > HCI Event: Connect Complete (0x03) plen 11
> < HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> > HCI Event: Command Complete (0x0e) plen 6
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> > HCI Event: Command Status (0x0f) plen 4
> > HCI Event: PIN Code Request (0x16) plen 6
> > HCI Event: Connect Complete (0x03) plen 11

run "hcidump -X -V". This output is not really helpful.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-31 02:48:42

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Alright, we're getting there. I added the line to the pincodes file and now
the pin is accepted.

However, doing an btsco 00:0D:44:4F:37:72 i get

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

Can't connect RFCOMM channel: Resource temporarily unavailable

hcidump gives me:

HCI sniffer - Bluetooth packet analyzer ver 1.31
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: PIN Code Request (0x16) plen 6
> HCI Event: Mode Change (0x14) plen 6
> HCI Event: Mode Change (0x14) plen 6
> HCI Event: Connect Complete (0x03) plen 11
< HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> HCI Event: Command Complete (0x0e) plen 6
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: PIN Code Request (0x16) plen 6
> HCI Event: Connect Complete (0x03) plen 11



Does rfcomm have to be running? If so, how is it best started?

My rfcomm.conf is:
#
# RFCOMM configuration file.
#

rfcomm0 {
# Automatically bind the device at startup
bind no;

# Bluetooth address of the device
device 00:0D:44:4F:37:72;

# RFCOMM channel for the connection
channel 1;

# Description of the connection
comment "Example Bluetooth device";
}


Thanks for the help folks. Slowly, but surely, i'm getting there.

Bearcat M. Sandor

On Wednesday 30 August 2006 03:52 in an email titled "Re: [Bluez-users] How do
I reset a pairing?" Marcel Holtmann wrote:
>Hi Bearcat,
>
>> Ok, the passkey-agent runs. But i get errors. Here's what i'm doing:
>>
>> 1. Switch to root.
>> 1. put headset into paring mode.
>> 2. run "btsco 00:0D:44:4F:37:72"
>> 3. run "passkey-agent 0000 00:0D:44:4F:37:72"
>>
>> I get "Can't get on system bus" from passkey-agent. Is dbus
>> misconfigured?
>
>might be. You can however use "passkey-agent --default 0000" to be on
>the safe side. There is a difference between the default passkey agent
>and the application specific passkey agent.
>
>> I know dbus is running. The "00:0D:44:4F:37:72" is the address of my
>> headset. "0:07:61:1C:9F:D3" is the address of my hub. I've tried that as
>> well. I've also tried encapsulating the 0000 with quotes in case it is a
>> string. I am running passkey-agent as root.
>
>Not needed to run it as root.
>
>> What am i doing wrong. Is there a way to create the file
>> in /var/lib/bluetooth\00:07:61:1C:9F:D3 by hand? What should the file be
>> called and what should it contain.
>
>You can use /var/lib/bluetooth/00:07:61:1C:9F:D3/pincodes and add a line
>with "00:0D:44:4F:37:72 0000" this will make the need of a passkey agent
>for that specific remote device obsolete.
>
>> I am very confused by the configuration of all this. I have seen
>> documentation that states that i need:
>>
>> 1. passkey "0000" in my hcid.conf file
>
>No. This PIN code is only for incoming connections.
>
>> 2. a /etc/bluetooth/passkeys/default file.
>
>This is Debian specific crap and has to go away anyway.
>
>> 3. A script to be called in the config file
>
>No longer supported as of 3.x releases.
>
>> 4. and now a passkey agent.
>
>That is of course the preferred way and the distribution should make it
>work nicely for you. Especially since bluez-gnome now contains a really
>good example for a passkey agent.
>
>Regards
>
>Marcel
>
>
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
>Bluez-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/bluez-users

--
Bearcat M. Sandor
[email protected]
Jabber: [email protected]
ICQ: 6628727
MSN: [email protected]
Yahoo: bearcatsandor
AIM: bearcatmsandor

2006-08-30 09:52:35

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> Ok, the passkey-agent runs. But i get errors. Here's what i'm doing:
>
> 1. Switch to root.
> 1. put headset into paring mode.
> 2. run "btsco 00:0D:44:4F:37:72"
> 3. run "passkey-agent 0000 00:0D:44:4F:37:72"
>
> I get "Can't get on system bus" from passkey-agent. Is dbus misconfigured?

might be. You can however use "passkey-agent --default 0000" to be on
the safe side. There is a difference between the default passkey agent
and the application specific passkey agent.

> I know dbus is running. The "00:0D:44:4F:37:72" is the address of my
> headset. "0:07:61:1C:9F:D3" is the address of my hub. I've tried that as
> well. I've also tried encapsulating the 0000 with quotes in case it is a
> string. I am running passkey-agent as root.

Not needed to run it as root.

> What am i doing wrong. Is there a way to create the file
> in /var/lib/bluetooth\00:07:61:1C:9F:D3 by hand? What should the file be
> called and what should it contain.

You can use /var/lib/bluetooth/00:07:61:1C:9F:D3/pincodes and add a line
with "00:0D:44:4F:37:72 0000" this will make the need of a passkey agent
for that specific remote device obsolete.

> I am very confused by the configuration of all this. I have seen documentation
> that states that i need:
>
> 1. passkey "0000" in my hcid.conf file

No. This PIN code is only for incoming connections.

> 2. a /etc/bluetooth/passkeys/default file.

This is Debian specific crap and has to go away anyway.

> 3. A script to be called in the config file

No longer supported as of 3.x releases.

> 4. and now a passkey agent.

That is of course the preferred way and the distribution should make it
work nicely for you. Especially since bluez-gnome now contains a really
good example for a passkey agent.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-30 03:30:14

by manojt ambe

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

I performed following steps.
1 ) I modified /usr/local/etc/dbus-1/system.conf as below.
<!-- This is included last so local configuration can override what's
in this standard file -->
<include ignore_missing="yes">/etc/dbus-1/system.d/bluez-hcid.conf</include>

2) I created a user "messagebus" and restarted dbus,hcid and passkey-agent.

After this the error "can't get on system bus" went away.

thanks, Manoj

"Bearcat M. Sandor" <[email protected]> wrote:
Marcel,

Ok, the passkey-agent runs. But i get errors. Here's what i'm doing:

1. Switch to root.
1. put headset into paring mode.
2. run "btsco 00:0D:44:4F:37:72"
3. run "passkey-agent 0000 00:0D:44:4F:37:72"

I get "Can't get on system bus" from passkey-agent. Is dbus misconfigured?

I know dbus is running. The "00:0D:44:4F:37:72" is the address of my
headset. "0:07:61:1C:9F:D3" is the address of my hub. I've tried that as
well. I've also tried encapsulating the 0000 with quotes in case it is a
string. I am running passkey-agent as root.

What am i doing wrong. Is there a way to create the file
in /var/lib/bluetooth\00:07:61:1C:9F:D3 by hand? What should the file be
called and what should it contain.

I am very confused by the configuration of all this. I have seen documentation
that states that i need:

1. passkey "0000" in my hcid.conf file
2. a /etc/bluetooth/passkeys/default file.
3. A script to be called in the config file
4. and now a passkey agent.

I know that the bluez site states that there is good documentation on the web,
but that's simply *not* true. Most of it conflicts and is apparently outdated
if only #4 is true now.

What am i doing wrong with this passkey-agent. If my headset device is
00:0D:44:4F:37:72 and my hub is 00:07:61:1C:9F:D3 what should the command be?

Simply, if you were me, what steps would you take to get this working.

Thank you for your help so far.

My hcidump is as follows:
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: PIN Code Request (0x16) plen 6
< HCI Command: Inquiry (0x01|0x0001) plen 5
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Inquiry Result (0x02) plen 15
> HCI Event: Inquiry Complete (0x01) plen 1
> HCI Event: Mode Change (0x14) plen 6
> HCI Event: Mode Change (0x14) plen 6
> HCI Event: Connect Complete (0x03) plen 11
< HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> HCI Event: Command Complete (0x0e) plen 6
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: PIN Code Request (0x16) plen 6

The "btsco 00:0D:44:4F:37:72" command gives me:
Error: Failed to connect to SDP server: Function not implemented
Assuming channel 2

Can't connect RFCOMM channel: Resource temporarily unavailable


Bearcat




On Tuesday 29 August 2006 17:46 in an email titled "Re: [Bluez-users] How do I
reset a pairing?" Marcel Holtmann wrote:
>Hi Bearcat,
>
>> I looked it over. I am only just starting to learn C so this is a little
>> daunting. I tried a "gcc -Wall -o passkey-agent -passkey-agent.c" and that
>> didn't work (i didn't really expect it to). I didn't see a configure
>> script that would create a make file for the agent.
>
>after ./configure you can run make and it will compile passkey-agent for
>you. It will always be compiled, but never be installed.
>
>> If my X system goes down, all of my paring devices will go down with it,
>> since i would need gnome up to get them working. How can i get this agent
>> working?
>
>Once the devices are paired. You have a link key. The hcid handles this
>for you. You need the passkey agent only for entering the PIN code.
>
>> I'm just confused. Since the bluez-gnome is a new release, what did people
>> do before it arrived to get pairing devices working?
>
>Actually I expected that someone else will write the appropriate passkey
>agents for their desktop systems. So in the end I did for the one that I
>use. Only the Nokia 770 Maemo platform had its own passkey agent.
>
>Regards
>
>Marcel

--
Bearcat M. Sandor
[email protected]
Jabber: [email protected]
ICQ: 6628727
MSN: [email protected]
Yahoo: bearcatsandor
AIM: bearcatmsandor



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users



---------------------------------
How low will we go? Check out Yahoo! Messenger?s low PC-to-Phone call rates.


Attachments:
(No filename) (373.00 B)
(No filename) (164.00 B)
Download all attachments

2006-08-30 01:08:51

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Marcel,

Ok, the passkey-agent runs. But i get errors. Here's what i'm doing:

1. Switch to root.
1. put headset into paring mode.
2. run "btsco 00:0D:44:4F:37:72"
3. run "passkey-agent 0000 00:0D:44:4F:37:72"

I get "Can't get on system bus" from passkey-agent. Is dbus misconfigured?

I know dbus is running. The "00:0D:44:4F:37:72" is the address of my
headset. "0:07:61:1C:9F:D3" is the address of my hub. I've tried that as
well. I've also tried encapsulating the 0000 with quotes in case it is a
string. I am running passkey-agent as root.

What am i doing wrong. Is there a way to create the file
in /var/lib/bluetooth\00:07:61:1C:9F:D3 by hand? What should the file be
called and what should it contain.

I am very confused by the configuration of all this. I have seen documentation
that states that i need:

1. passkey "0000" in my hcid.conf file
2. a /etc/bluetooth/passkeys/default file.
3. A script to be called in the config file
4. and now a passkey agent.

I know that the bluez site states that there is good documentation on the web,
but that's simply *not* true. Most of it conflicts and is apparently outdated
if only #4 is true now.

What am i doing wrong with this passkey-agent. If my headset device is
00:0D:44:4F:37:72 and my hub is 00:07:61:1C:9F:D3 what should the command be?

Simply, if you were me, what steps would you take to get this working.

Thank you for your help so far.

My hcidump is as follows:
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: PIN Code Request (0x16) plen 6
< HCI Command: Inquiry (0x01|0x0001) plen 5
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Inquiry Result (0x02) plen 15
> HCI Event: Inquiry Complete (0x01) plen 1
> HCI Event: Mode Change (0x14) plen 6
> HCI Event: Mode Change (0x14) plen 6
> HCI Event: Connect Complete (0x03) plen 11
< HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> HCI Event: Command Complete (0x0e) plen 6
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: PIN Code Request (0x16) plen 6

The "btsco 00:0D:44:4F:37:72" command gives me:
Error: Failed to connect to SDP server: Function not implemented
Assuming channel 2

Can't connect RFCOMM channel: Resource temporarily unavailable


Bearcat




On Tuesday 29 August 2006 17:46 in an email titled "Re: [Bluez-users] How do I
reset a pairing?" Marcel Holtmann wrote:
>Hi Bearcat,
>
>> I looked it over. I am only just starting to learn C so this is a little
>> daunting. I tried a "gcc -Wall -o passkey-agent -passkey-agent.c" and that
>> didn't work (i didn't really expect it to). I didn't see a configure
>> script that would create a make file for the agent.
>
>after ./configure you can run make and it will compile passkey-agent for
>you. It will always be compiled, but never be installed.
>
>> If my X system goes down, all of my paring devices will go down with it,
>> since i would need gnome up to get them working. How can i get this agent
>> working?
>
>Once the devices are paired. You have a link key. The hcid handles this
>for you. You need the passkey agent only for entering the PIN code.
>
>> I'm just confused. Since the bluez-gnome is a new release, what did people
>> do before it arrived to get pairing devices working?
>
>Actually I expected that someone else will write the appropriate passkey
>agents for their desktop systems. So in the end I did for the one that I
>use. Only the Nokia 770 Maemo platform had its own passkey agent.
>
>Regards
>
>Marcel

--
Bearcat M. Sandor
[email protected]
Jabber: [email protected]
ICQ: 6628727
MSN: [email protected]
Yahoo: bearcatsandor
AIM: bearcatmsandor

2006-08-29 22:05:35

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Marcel,

Great! I got it compiled. I'll play with it when i get home in a few
hours. I can't wait. If i can get this headset working i'll be so happy!

Unfortunatly, i don't know qt yet. I wonder if someone out there would be
willign to write one. In qt4 maybe?

I'll put it on my list, but it may be a while.

I'll report on how it works out (since i know you won't be able to sleep
till i get it working :P )

Thanx,

Bearcat

> Hi Bearcat,
>
>> I looked it over. I am only just starting to learn C so this is a little
>> daunting. I tried a "gcc -Wall -o passkey-agent -passkey-agent.c" and
>> that
>> didn't work (i didn't really expect it to). I didn't see a configure
>> script that would create a make file for the agent.
>
> after ./configure you can run make and it will compile passkey-agent for
> you. It will always be compiled, but never be installed.
>
>> If my X system goes down, all of my paring devices will go down with
>> it,
>> since i would need gnome up to get them working. How can i get this
>> agent
>> working?
>
> Once the devices are paired. You have a link key. The hcid handles this
> for you. You need the passkey agent only for entering the PIN code.
>
>> I'm just confused. Since the bluez-gnome is a new release, what did
>> people
>> do before it arrived to get pairing devices working?
>
> Actually I expected that someone else will write the appropriate passkey
> agents for their desktop systems. So in the end I did for the one that I
> use. Only the Nokia 770 Maemo platform had its own passkey agent.
>
> Regards
>
> Marcel
>
>
>

2006-08-29 23:46:13

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> I looked it over. I am only just starting to learn C so this is a little
> daunting. I tried a "gcc -Wall -o passkey-agent -passkey-agent.c" and that
> didn't work (i didn't really expect it to). I didn't see a configure
> script that would create a make file for the agent.

after ./configure you can run make and it will compile passkey-agent for
you. It will always be compiled, but never be installed.

> If my X system goes down, all of my paring devices will go down with it,
> since i would need gnome up to get them working. How can i get this agent
> working?

Once the devices are paired. You have a link key. The hcid handles this
for you. You need the passkey agent only for entering the PIN code.

> I'm just confused. Since the bluez-gnome is a new release, what did people
> do before it arrived to get pairing devices working?

Actually I expected that someone else will write the appropriate passkey
agents for their desktop systems. So in the end I did for the one that I
use. Only the Nokia 770 Maemo platform had its own passkey agent.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-29 21:32:31

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Marcel,

I looked it over. I am only just starting to learn C so this is a little
daunting. I tried a "gcc -Wall -o passkey-agent -passkey-agent.c" and that
didn't work (i didn't really expect it to). I didn't see a configure
script that would create a make file for the agent.

If my X system goes down, all of my paring devices will go down with it,
since i would need gnome up to get them working. How can i get this agent
working?

I'm just confused. Since the bluez-gnome is a new release, what did people
do before it arrived to get pairing devices working?

Thank you for the help so far. I appreciate your time.

Bearcat

> Hi Bearcat,
>
>> I've looked through the blues-utils 3.2 source code directories and not
>> seen such a script. Can you point it out to me, or is it code that need
>> to
>> be compiled, or a pice of code that needs to be extracted/followed.
>
> it is hcid/passkey-agent.c and it is a C program. You can of course do
> the same in Python or any other language with D-Bus bindings.
>
> Regards
>
> Marcel
>
>
>

2006-08-29 23:00:59

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> I've looked through the blues-utils 3.2 source code directories and not
> seen such a script. Can you point it out to me, or is it code that need to
> be compiled, or a pice of code that needs to be extracted/followed.

it is hcid/passkey-agent.c and it is a C program. You can of course do
the same in Python or any other language with D-Bus bindings.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-29 20:52:32

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Marcel,

I've looked through the blues-utils 3.2 source code directories and not
seen such a script. Can you point it out to me, or is it code that need to
be compiled, or a pice of code that needs to be extracted/followed.

Thanks a lot for your help,

Bearcat M. Sandor

> Hi Bearcat,
>
>> Magic huh? So if i put an empty hat next to me and start it up will get
>> a
>> rabbit out of nowhere?
>>
>> So, i have to install Gnome, to get a working headset? I don't suppose
>> there is anyway to get this working with out it? What would someone with
>> a
>> console only or a non-desktop user do?
>>
>> I'll install Gnome if it's the only way.
>
> the bluez-utils source contains passkey agent example that runs from the
> command line. We used it for testing purpose.
>
> Regards
>
> Marcel
>
>
>

2006-08-29 22:35:00

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> Magic huh? So if i put an empty hat next to me and start it up will get a
> rabbit out of nowhere?
>
> So, i have to install Gnome, to get a working headset? I don't suppose
> there is anyway to get this working with out it? What would someone with a
> console only or a non-desktop user do?
>
> I'll install Gnome if it's the only way.

the bluez-utils source contains passkey agent example that runs from the
command line. We used it for testing purpose.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-29 20:34:46

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Magic huh? So if i put an empty hat next to me and start it up will get a
rabbit out of nowhere?

So, i have to install Gnome, to get a working headset? I don't suppose
there is anyway to get this working with out it? What would someone with a
console only or a non-desktop user do?

I'll install Gnome if it's the only way.

Thanks,

Bearcat

> Hi Bearcat,
>
>> What do i put in my hcid.conf file to make sure the passkey agent is
>> used?
>
> nothing. You simply start the passkey agent in your desktop session. I
> will register itself into hcid and then work. It is like magic ;)
>
> Regards
>
> Marcel
>
>
>

2006-08-29 17:03:54

by jonny Linux

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Excellent, I've finally got it working - I realised I had installed
the 2.xbinaries from Fedora RPMs, so I couldn't get the bt-applet
working. I've now
upgraded to 3.4, and its working!

Thanks to everyone for helping!

Jonny


Attachments:
(No filename) (226.00 B)
(No filename) (244.00 B)
(No filename) (373.00 B)
(No filename) (164.00 B)
Download all attachments

2006-08-29 10:47:12

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> What do i put in my hcid.conf file to make sure the passkey agent is used?

nothing. You simply start the passkey agent in your desktop session. I
will register itself into hcid and then work. It is like magic ;)

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-28 22:24:52

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Marcel,

What do i put in my hcid.conf file to make sure the passkey agent is used?

Bearcat

> Hi Bearcat,
>
>> Thank you!! I've been stressing over this for a month now. Does the
>> configuration file changed in order to accomodate this?
>
> yes, all the useless config options are gone. The passkey agent is the
> way to go with the 3.x releases.
>
> Regards
>
> Marcel
>
>
>

2006-08-28 23:54:59

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> Thank you!! I've been stressing over this for a month now. Does the
> configuration file changed in order to accomodate this?

yes, all the useless config options are gone. The passkey agent is the
way to go with the 3.x releases.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-28 19:39:50

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Marcel,

Thank you!! I've been stressing over this for a month now. Does the
configuration file changed in order to accomodate this?

Bearcat M. Sandor

> Hi Bearcat,
>
>> I get that message too. However, i have "pin_helper
>> /usr/lib/kdebluetooth/kbluepin;" in my config file. I can run this
>> kbluepin from the cli and it starts fine and returns "PIN:000" if i
>> enter
>> 0000. Why isn't this firing up for me when i try to connect?
>>
>> I'll try the bluez-gnome agent, but i try to avoid gnome stuff so i
>> don't
>> have all those libs installed.
>
> the PIN helper stuff have been removed from the 3.x releases. You need
> to use a passkey agent. However the KDE-Bluetooth guys might simply
> extend their kbluepin with a passkey agent and then it will work without
> any GNOME program. However that is up to the KDE guys and not to me.
>
> Regards
>
> Marcel
>
>
>

2006-08-28 21:15:18

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> I get that message too. However, i have "pin_helper
> /usr/lib/kdebluetooth/kbluepin;" in my config file. I can run this
> kbluepin from the cli and it starts fine and returns "PIN:000" if i enter
> 0000. Why isn't this firing up for me when i try to connect?
>
> I'll try the bluez-gnome agent, but i try to avoid gnome stuff so i don't
> have all those libs installed.

the PIN helper stuff have been removed from the 3.x releases. You need
to use a passkey agent. However the KDE-Bluetooth guys might simply
extend their kbluepin with a passkey agent and then it will work without
any GNOME program. However that is up to the KDE guys and not to me.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-28 18:45:15

by Bearcat M. Sandor

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

>> On 8/28/06, Claudio Takahasi <[email protected]> wrote:
>> PIN Code Request Negative Reply (0x01|0x000e) ncmd 1
>> status 0x00 bdaddr 00:16:53:03:1D:31
> [Claudio Takahasi]
> This "Negative Reply" means that you don't have a passkey agent running.
> Try the bluez-gnome passkey agent:
> http://www.bluez.org/download.html
>
> BR,
> Claudio.
I get that message too. However, i have "pin_helper
/usr/lib/kdebluetooth/kbluepin;" in my config file. I can run this
kbluepin from the cli and it starts fine and returns "PIN:000" if i enter
0000. Why isn't this firing up for me when i try to connect?

I'll try the bluez-gnome agent, but i try to avoid gnome stuff so i don't
have all those libs installed.

Thanks for the help,

Bearcat M. Sandor


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-28 18:14:46

by Claudio Takahasi

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

On 8/28/06, jonny Linux <[email protected]> wrote:
>
>
>
> On 8/28/06, Claudio Takahasi <[email protected]> wrote:
> > Hi Jonny,
> >
> > You can use the D-Bus services to do remove the link key:
> > $dbus-send --system --type=method_call --print-reply
> --dest=org.bluez/org/bluez/hci0 org.bluez.Adapter.RemoveBonding
> > string:XX:XX:XX:XX:XX:XX
> >
> >
> > or remove the entry in the file:
> > /var/lib/bluetooth/local_bt_address/linkkeys
>
>
>
> Thanks Claudio, I couldn't get that command to work, I got an error:
> Must use org.mydomain.Interface.Method notation, no dot in
> "string:00:16:53:03:1D:31"
> So I removed the entry in the linkkeys file.
>
> The NXT device asks me for a PIN, but the computer doesn't ask for a pin, I
> then get a connection error in the perl script I'm using which says "Invalid
> Exchange".
>
> Below is the results of hcidump -X -a -V:
>
> Any ideas?
>
> Thanks,
>
> Jonny
>
> HCI sniffer - Bluetooth packet analyzer ver 1.30
> device: hci0 snap_len: 1028 filter: 0xffffffff
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> bdaddr 00:16:53:03:1D:31 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > HCI Event: Command Status (0x0f) plen 4
> Create Connection (0x01|0x0005) status 0x00 ncmd 1
> > HCI Event: Link Key Request (0x17) plen 6
> bdaddr 00:16:53:03:1D:31
> < HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
> bdaddr 00:16:53:03:1D:31
> > HCI Event: Command Complete (0x0e) plen 10
> Link Key Request Negative Reply (0x01|0x000c) ncmd 1
> status 0x00 bdaddr 00:16:53:03:1D:31
> > HCI Event: PIN Code Request (0x16) plen 6
> bdaddr 00:16:53:03:1D:31
> < HCI Command: PIN Code Request Negative Reply (0x01|0x000e) plen 6
> bdaddr 00:16:53:03:1D:31
> > HCI Event: Command Complete (0x0e) plen 10
> PIN Code Request Negative Reply (0x01|0x000e) ncmd 1
> status 0x00 bdaddr 00:16:53:03:1D:31
[Claudio Takahasi]
This "Negative Reply" means that you don't have a passkey agent running.
Try the bluez-gnome passkey agent:
http://www.bluez.org/download.html

BR,
Claudio.


> > HCI Event: Connect Complete (0x03) plen 11
> status 0x06 handle 11 bdaddr 00:16:53:03:1D:31 type ACL encrypt 0x00
> Error: PIN or Key Missing
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> bdaddr 00:16:53:03:1D:31 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > HCI Event: Command Status (0x0f) plen 4
> Create Connection (0x01|0x0005) status 0x00 ncmd 1
> > HCI Event: Link Key Request (0x17) plen 6
> bdaddr 00:16:53:03:1D:31
> < HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
> bdaddr 00:16:53:03:1D:31
> > HCI Event: Command Complete (0x0e) plen 10
> Link Key Request Negative Reply (0x01|0x000c) ncmd 1
> status 0x00 bdaddr 00:16:53:03:1D:31
>
>
>
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>
>


--
---------------------------------------------------------
Claudio Takahasi
Instituto Nokia de Tecnologia - INdT

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-28 16:30:55

by jonny Linux

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

On 8/28/06, Claudio Takahasi <[email protected]> wrote:
>
> Hi Jonny,
>
> You can use the D-Bus services to do remove the link key:
> $dbus-send --system --type=method_call --print-reply --dest=org.bluez/org/bluez/hci0
> org.bluez.Adapter.RemoveBonding
> string:XX:XX:XX:XX:XX:XX
>
>
> or remove the entry in the file:
> /var/lib/bluetooth/local_bt_address/linkkeys



Thanks Claudio, I couldn't get that command to work, I got an error:
Must use org.mydomain.Interface.Method notation, no dot in
"string:00:16:53:03:1D:31"
So I removed the entry in the linkkeys file.

The NXT device asks me for a PIN, but the computer doesn't ask for a pin, I
then get a connection error in the perl script I'm using which says "Invalid
Exchange".

Below is the results of hcidump -X -a -V:

Any ideas?

Thanks,

Jonny

HCI sniffer - Bluetooth packet analyzer ver 1.30
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:16:53:03:1D:31 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 00:16:53:03:1D:31
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
bdaddr 00:16:53:03:1D:31
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Negative Reply (0x01|0x000c) ncmd 1
status 0x00 bdaddr 00:16:53:03:1D:31
> HCI Event: PIN Code Request (0x16) plen 6
bdaddr 00:16:53:03:1D:31
< HCI Command: PIN Code Request Negative Reply (0x01|0x000e) plen 6
bdaddr 00:16:53:03:1D:31
> HCI Event: Command Complete (0x0e) plen 10
PIN Code Request Negative Reply (0x01|0x000e) ncmd 1
status 0x00 bdaddr 00:16:53:03:1D:31
> HCI Event: Connect Complete (0x03) plen 11
status 0x06 handle 11 bdaddr 00:16:53:03:1D:31 type ACL encrypt 0x00
Error: PIN or Key Missing
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:16:53:03:1D:31 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 00:16:53:03:1D:31
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
bdaddr 00:16:53:03:1D:31
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Negative Reply (0x01|0x000c) ncmd 1
status 0x00 bdaddr 00:16:53:03:1D:31


Attachments:
(No filename) (2.46 kB)
(No filename) (3.28 kB)
(No filename) (373.00 B)
(No filename) (164.00 B)
Download all attachments

2006-08-28 12:17:36

by Claudio Takahasi

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Jonny,

You can use the D-Bus services to do remove the link key:
$dbus-send --system --type=method_call --print-reply --dest=org.bluez
/org/bluez/hci0 org.bluez.Adapter.RemoveBonding
string:XX:XX:XX:XX:XX:XX


or remove the entry in the file:
/var/lib/bluetooth/local_bt_address/linkkeys


Send us the hcidump(hcidump -X -a -V) if you still having problems.

BR,
Claudio.


On 8/27/06, jonny Linux <[email protected]> wrote:
>
>
> >
> > If I try to connect from the laptop I get no problems connecting. But if I
> try to connect from the desktop I get a "Permission denied error", or if I
> try "hcitool cc <ba>" I get "Can't create connection: Input/output error".
> >
> > I don't get asked for a pin when I connect from the desktop, but I think I
> was once asked for a pin. So I think somehow the pairing between the devices
> has been broken. Is there anyway I can reset the pairing between the desktop
> and the NXT?
>
>
>
> Hi,
>
> Sorry to reply to my own post, but I'm still having problems with this and
> I'd really like to get it working. I've tried using hciconfig delkey, but
> nothing seems to happen. Is delkey the command I should be trying to use?
> Which address should I give as a parameter to delkey, should it be the
> address of the bluetooth device I'm trying to connect to (the NXT) or the
> local bluetooth device (the USB dongle plugged into the computer)?
>
> Whenever I try to use "hciconfig delkey" there is no output, and it always
> exits with exit code 0. Is there any way to make it ask me which pin I want
> to use with the device?
>
> Thanks,
>
> Jonny
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>
>


--
---------------------------------------------------------
Claudio Takahasi
Instituto Nokia de Tecnologia - INdT

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-27 12:18:29

by jonny Linux

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

> If I try to connect from the laptop I get no problems connecting. But if I
> try to connect from the desktop I get a "Permission denied error", or if I
> try "hcitool cc <ba>" I get "Can't create connection: Input/output error".
>
> I don't get asked for a pin when I connect from the desktop, but I think I
> was once asked for a pin. So I think somehow the pairing between the devices
> has been broken. Is there anyway I can reset the pairing between the desktop
> and the NXT?
>


Hi,

Sorry to reply to my own post, but I'm still having problems with this and
I'd really like to get it working. I've tried using hciconfig delkey, but
nothing seems to happen. Is delkey the command I should be trying to use?
Which address should I give as a parameter to delkey, should it be the
address of the bluetooth device I'm trying to connect to (the NXT) or the
local bluetooth device (the USB dongle plugged into the computer)?

Whenever I try to use "hciconfig delkey" there is no output, and it always
exits with exit code 0. Is there any way to make it ask me which pin I want
to use with the device?

Thanks,

Jonny


Attachments:
(No filename) (1.09 kB)
(No filename) (1.35 kB)
(No filename) (373.00 B)
(No filename) (164.00 B)
Download all attachments

2006-09-01 11:04:45

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> I killed kdebluetooth and made sure no traces of it were running. I get the
> same errors.
>
> Here is the hcidump -X -V with kdebluetooth off:
> 18:23:48 root@linux:/home/bearcat# hcidump -X -V
> HCI sniffer - Bluetooth packet analyzer ver 1.31
> device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > HCI Event: Command Status (0x0f) plen 4
> Create Connection (0x01|0x0005) status 0x00 ncmd 1
> > HCI Event: Connect Complete (0x03) plen 11
> status 0x04 handle 0 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
> Error: Page Timeout
> < HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> > HCI Event: Command Complete (0x0e) plen 6
> Read Voice Setting (0x03|0x0025) ncmd 1
> status 0x00 voice setting 0x0060
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > HCI Event: Command Status (0x0f) plen 4
> Create Connection (0x01|0x0005) status 0x00 ncmd 1
> > HCI Event: Connect Complete (0x03) plen 11
> status 0x04 handle 0 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
> Error: Page Timeout

both are a page timeout. Which means that the device is not on or not in
page scan mode. Please turn the device on and put it into pairing mode.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-31 22:08:33

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] How do I reset a pairing?

Hi Bearcat,

> Thank you. Here is the output from hcidump -X -V:
>
> 11:46:21 root@linux:/home/bearcat# hcidump -X -V
> HCI sniffer - Bluetooth packet analyzer ver 1.31
> device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > HCI Event: Command Status (0x0f) plen 4
> Create Connection (0x01|0x0005) status 0x00 ncmd 1
> > HCI Event: PIN Code Request (0x16) plen 6
> bdaddr 00:0D:44:4F:37:72
> > HCI Event: Mode Change (0x14) plen 6
> status 0x00 handle 41 mode 0x00 interval 0
> Mode: Active
> > HCI Event: Mode Change (0x14) plen 6
> status 0x00 handle 41 mode 0x02 interval 126
> Mode: Sniff
> > HCI Event: Connect Complete (0x03) plen 11
> status 0x22 handle 44 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
> Error: LMP Response Timeout
> < HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> > HCI Event: Command Complete (0x0e) plen 6
> Read Voice Setting (0x03|0x0025) ncmd 1
> status 0x00 voice setting 0x0060
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> bdaddr 00:0D:44:4F:37:72 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > HCI Event: Command Status (0x0f) plen 4
> Create Connection (0x01|0x0005) status 0x00 ncmd 1
> > HCI Event: PIN Code Request (0x16) plen 6
> bdaddr 00:0D:44:4F:37:72
> < HCI Command: Inquiry (0x01|0x0001) plen 5
> lap 0x9e8b33 len 6 num 0
> > HCI Event: Command Status (0x0f) plen 4
> Inquiry (0x01|0x0001) status 0x00 ncmd 1
> > HCI Event: Inquiry Result (0x02) plen 15
> bdaddr 00:0D:44:4F:37:72 mode 1 clkoffset 0x50a7 class 0x200404
> > HCI Event: Inquiry Complete (0x01) plen 1
> status 0x00
> > HCI Event: Connect Complete (0x03) plen 11
> status 0x22 handle 45 bdaddr 00:0D:44:4F:37:72 type ACL encrypt 0x00
> Error: LMP Response Timeout

this looks like you have the KDE Bluetooth thingy running and it
interferes when trying to connect. They always did this scanning thing
without actually checking if the HCI controller is in use. I would
advise you to not use KDE Bluetooth unless they switched to using the
new D-Bus driven API.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users