LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-27-2007, 10:02 AM   #1
newholborn
LQ Newbie
 
Registered: Jul 2006
Distribution: Slackware
Posts: 6

Rep: Reputation: 0
Lightbulb Yet another bluetooth problem


I know that you must be sick of bluetooth questions by now, but I've read a ton of stuff and nothing helps. My problem is the passkey. I simply can't connect to a bluetooth device! I will post the full procedure I follow so you can correct me if I am wrong, and also for others with the same problem to reference to.

Here we go.

Code:
newholborn@darkstar:~$ hciconfig
hci0:   Type: USB
        BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
        DOWN
        RX bytes:0 acl:0 sco:0 events:0 errors:0
        TX bytes:0 acl:0 sco:0 commands:0 errors:0
Nice.

Code:
newholborn@darkstar:~$ sudo hciconfig hci0 up
newholborn@darkstar:~$ hciconfig
hci0:   Type: USB
        BD Address: 00:02:72:C1:19:E3 ACL MTU: 377:10 SCO MTU: 64:8
        UP RUNNING
        RX bytes:85 acl:0 sco:0 events:9 errors:0
        TX bytes:33 acl:0 sco:0 commands:9 errors:0
All is well up to now. Let's try to find my cellphone.

Code:
newholborn@darkstar:~$ hcitool scan
Scanning ...
        00:0E:6D:95:45:67       Proud like a god

newholborn@darkstar:~$ sudo l2ping 00:0E:6D:95:45:67
Ping: 00:0E:6D:95:45:67 from 00:02:72:C1:19:E3 (data size 44) ...
0 bytes from 00:0E:6D:95:45:67 id 0 time 95.92ms
0 bytes from 00:0E:6D:95:45:67 id 1 time 17.92ms
0 bytes from 00:0E:6D:95:45:67 id 2 time 12.96ms
0 bytes from 00:0E:6D:95:45:67 id 3 time 16.95ms
0 bytes from 00:0E:6D:95:45:67 id 4 time 16.96ms
5 sent, 5 received, 0% loss
Here's my old trusty Nokia 6600! As you can see I can ping it.

Code:
newholborn@darkstar:~$ sdptool browse 00:0E:6D:95:45:67
Browsing 00:0E:6D:95:45:67 ...
Service Name: Fax
Service RecHandle: 0x10000
Service Class ID List:
  "Fax" (0x1111)
  "Generic Telephony" (0x1204)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Fax" (0x1111)
    Version: 0x0100

Service Name: Dial-up Networking
Service RecHandle: 0x10001
Service Class ID List:
  "Dialup Networking" (0x1103)
  "Generic Networking" (0x1201)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Dialup Networking" (0x1103)
    Version: 0x0100

Service Name: Bluetooth Serial Port
Service Description: Bluetooth Serial Port
Service Provider: Symbian Ltd.
Service RecHandle: 0x10002
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 2
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100

Service Name: OBEX Object Push
Service RecHandle: 0x10003
Service Class ID List:
  "OBEX Object Push" (0x1105)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 9
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "OBEX Object Push" (0x1105)
    Version: 0x0100

Service Name: OBEX File Transfer
Service RecHandle: 0x10004
Service Class ID List:
  "OBEX File Transfer" (0x1106)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 10
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "OBEX File Transfer" (0x1106)
    Version: 0x0100

Service Name: Handsfree Audio Gateway
Service RecHandle: 0x10005
Service Class ID List:
  "Handfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 3
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0101

newholborn@darkstar:~$ sudo mkdir -p /dev/bluetooth/rfcomm
newholborn@darkstar:~$ sudo mknod -m 666 /dev/bluetooth/rfcomm/0 c 216 0
newholborn@darkstar:~$
Here's the channels for each service. I also took the liberty of creating the directory and device node I need
Now lets try to bluesnarf.

Code:
newholborn@darkstar:~$ sudo bluesnarfer -b 00:0E:6D:95:45:67 -C 2 -r 1-100
device name: Proud like a god
bluesnarfer: tcgetattr failed, Input/output error
bluesnarfer: bt_rfcomm_config failed
bluesnarfer: unable to create rfcomm connection
bluesnarfer: release rfcomm ok
newholborn@darkstar:~$
After it finds the device name, my phone asks me for the passkey. I enter "1234" but still, bluesnarfer gives me the error messages.

Here's my hcid.conf and /etc/bluetooth/passkeys/default files:

Code:
newholborn@darkstar:~$ sudo cat /etc/bluetooth/hcid.conf
#
# HCI daemon configuration file.
#

# HCId options
options {
        # Automatically initialize new devices
        autoinit yes;

        # Security Manager mode
        #   none - Security manager disabled
        #   auto - Use local PIN for incoming connections
        #   user - Always ask user for a PIN
        #
        security user;

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts
        pairing multi;

        # Default PIN code for incoming connections
        passkey "1234";
}

# Default settings for HCI devices
device {
        # Local device name
        #   %d - device id
        #   %h - host name
        name "BlueZ (%d)";

        # Local device class
        class 0x3e0100;

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;

        # Default link policy
        #   none    - no specific policy
        #   rswitch - allow role switch
        #   hold    - allow hold mode
        #   sniff   - allow sniff mode
        #   park    - allow park mode
        lp rswitch,hold,sniff,park;
}
newholborn@darkstar:~$sudo cat /etc/bluetooth/passkeys/default
1234newholborn@darkstar:~$
Why doesn't it work? Maybe something's wrong with the hcid.conf file?

Looking forward to your replies

And, yes, I LOVE SLACKWARE!

Last edited by newholborn; 11-27-2007 at 10:06 AM. Reason: oooooooh pretty colors man! :D
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bluetooth not working on FC6 with Targus USB bluetooth adapter mikevicious Linux - Software 1 12-11-2009 09:03 AM
Bluetooth Problem... TanSahara Linux - Networking 2 08-27-2007 07:43 PM
Bluetooth problem depam Linux - Software 1 11-02-2006 02:39 PM
bluetooth problem nirmaltom Linux - Newbie 1 08-30-2006 07:44 PM
Bluetooth Problem Bicco Linux - Networking 0 08-11-2003 07:50 AM


All times are GMT -5. The time now is 06:53 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration