On 8/28/06, Claudio Takahasi <cktakahasi@gmail.com> 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