LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-14-2009, 09:27 AM   #1
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 318

Rep: Reputation: 40
Using USB bluetooth with slackware 12.0


Greetings,

i'm trying to use bluetooth on slackware 12.0. I manage to do some search on google and find the steps to activate the blue tooth by setting the /etc/rc.d/rc.bluetooth
Code:
chmod o+x /etc/rc.d/rc.bluetooth
When i execute the file, my bluetooth usb manage to light up.
Code:
 hciconfig -a
produce these results:

Code:
hci0:   Type: USB
        BD Address: 00:10:60:A8:D0:A2 ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:689 acl:0 sco:0 events:22 errors:0
        TX bytes:335 acl:0 sco:0 commands:21 errors:0
        Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'BlueZ (0)'
        Class: 0x000100
        Service Classes: Unspecified
        Device Class: Computer, Uncategorized
        HCI Ver: 1.1 (0x1) HCI Rev: 0x460 LMP Ver: 1.1 (0x1) LMP Subver: 0x460
        Manufacturer: Cambridge Silicon Radio (10)
My questions are:
1) how to i scan for other blue tooth network around my area?
2) If i manage to find other blue tooth network, how do i connect to them?
3) If i want to stop using the bluetooth, how do i safely remove it or i can just pull out the bluetooth usb without any adverse effects?


Thanks

Last edited by vitalstrike82; 06-14-2009 at 09:33 AM.
 
Old 06-15-2009, 09:50 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
You would scan for other discoverable Bluetooth devices with the command:

Code:
hcitool scan
Actually connecting to something is slightly more complicated, and the method depends on what exactly you are trying to connect to and do. If you are trying to do file transfers with a phone for instance, as soon as you try the first transfer the phone will prompt you for the Slackware machine's PIN (default is 1234, this can be changed in /etc/bluetooth/hci.conf), at which point the devices will pair. But if you were trying to hook up to a headset, or use RFCOMM, the method would be slightly different.

As for removing the adapter, you can pull it out at any time. It isn't like a flash drive with a mounted filesystem, when you pull the adapter BlueZ will simply shut down that interface and wait for a new adapter to be connected. Although, obviously, you should wait for any file transfer or similar operation to complete before pulling it out...
 
Old 06-15-2009, 10:58 AM   #3
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 318

Original Poster
Rep: Reputation: 40
Hi,
thanks.

Currently i'm trying to connect to my handphone.

Using hcitool scan enables me to search for my handphone bluetooth.
00:1E:E2:05:9F:C9 is the address of my handphone.

I try using:
Code:
hidd --connect 00:1E:E2:05:9F:C9
Code:
passkey-agent 0000 00:1E:E2:05:9F:C9
Code:
hcitool cc --role=m 00:1E:E2:05:9F:C9
All cannot connect to my blue tooth in my handphone. How am i able to connect?

Thanks for the advice..
 
Old 06-15-2009, 04:32 PM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
None of those would connect to the phone, you would pair by attempting to use a service on the phone.

As I said before, if you wanted to transfer files, you would run a command like:

Code:
 obexftp -b 00:1E:E2:05:9F:C9 -l
Which would prompt your phone for the Slackware machine's PIN. It would then allow you to view the files on the phone from the computer.
 
Old 06-17-2009, 08:45 AM   #5
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 318

Original Poster
Rep: Reputation: 40
Hi,

Thanks for the advise. I manage to connect to my handphone. However my handphone request for the passkey and when i enter, the connection failed which i think its due to that i'm not able to enter the passkey on my laptop.

From my understanding, the passkey input has to been input with matching passkey in my laptop and handphone.

However my handphone requests for the passkey, but i cannot input the passkey in my laptop, therefore i'm not able to connect.

I try to google online(the site address is display below) on how to use obexftp to connect to the handset with a passkey, but it seems that obexftp does not have the command to input the passkey.

http://www.irongeek.com/i.php?page=b...-3-man/obexftp

I have try to look at the man obexftp to see if i can enter a passkey while connecting to the bluetooth device but no info of how to enter the passkey on my laptop

How do i connect to my device?

thanks
 
Old 06-17-2009, 09:56 AM   #6
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
You can change the PIN code in /etc/bluetooth/hcid.conf, then restart BlueZ. When prompted on the phone, enter in the new PIN code. You don't need to interactively enter it on the laptop.

Last edited by MS3FGX; 06-17-2009 at 10:05 AM.
 
Old 06-18-2009, 11:19 AM   #7
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 318

Original Poster
Rep: Reputation: 40
Hi i have edit the file as you have suggest. This is the section i edit. I set the passkey to '1111'

Code:
# Default PIN code for incoming connections
	passkey "1111";
Then i restart it:
Code:
/etc/rc.d/rc.bluetooth restart
WHen i connect to my phone, i type 1111 on my phone but still cannot connect.

Am i on the right track?

thanks
 
Old 06-18-2009, 11:23 AM   #8
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 318

Original Poster
Rep: Reputation: 40
Oh i know why i cannot connect.

I need to set the passkey in /etc/bluetooth/passkeys/default

Thanks for the advice for the previous post. Without it, i not able to get this far
 
Old 06-18-2009, 11:27 AM   #9
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 318

Original Poster
Rep: Reputation: 40
Hi, i got another problem again.

I manage to connect, but it list the folder in my phone and then disconnects instantly.

How do i choose a folder in my phone and send it to my pc? This is the output when i connect successfully, but it disconnects after listing the folders.

Code:
Connecting...done
Receiving "(null)"... <?xml version="1.0"?>
<!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd">
<folder-listing version="1.0">
 <folder name="Images"/>
 <folder name="Other files"/>
 <folder name="Sounds"/>
 <folder name="Videos"/>
</folder-listing>done
Disconnecting...done
 
  


Reply



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
Mounting USB external drive with multiple partitions, USB bluetooth mouse xmeson Slackware 7 12-17-2006 09:00 AM
USB Bluetooth device and USB Wireless Card subaruwrx Debian 5 01-04-2005 09:06 AM
USB bluetooth w/ bluez on 2.6.8.1 (slackware 10) mo0 Slackware 0 10-03-2004 03:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:09 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration