Bluetooth

From Arnout Engelen

Jump to: navigation, search

I'd like to sync my nokia 6230i over bluetooth.

Links:

Contents

[edit] Installing an usb dongle

My PC doesn't have BT built-in, so I got a D-Link DBT-120:

# lsusb
Bus 001 Device 047: ID 0a12:1000 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HID proxy mode)

hcitool didn't seem to find it though:

# hcitool scan
Device is not available: No such device

The problem was that it should have been in 'HCI mode' instead of 'HID mode':

# hid2hci --tohci
# lsusb
Bus 001 Device 048: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
# hcitool scan
Scanning ...
        00:15:DE:24:A1:30       Raboof Nokia

[edit] Finding device

Found my device with 'hcitool scan', found out the OBEX port is 10 with 'sdptool browse' (both in bluez-utils on debian).

Created an rfcomm device in /etc/bluetooth/rfcomm.conf:

rfcomm0 {
        device 00:15:DE:24:A1:30;
        channel 10;
        comment "Topicus Nokia";
} (TODO more)

[edit] connecting

Connecting seemed to work:

rfcomm release 0
rfcomm connect 0
(now gives 'connection refused', see below)

[edit] sending files

For sending files from my phone, simply running 'gnome-obex-server' (without even connecting with rfcomm) seems to be sufficient. It simply waits for a connection, pops up a 'do you want to receive this file', receives the file and asks me how to open it. Nice.)

For sending files to my phone with gnome-obex-send (or most other applications), unfortunately, it gave me an incorrectly filled dialog where i could select my bluetooth device, and then crashed after a small while. Setting the bt device to use manually (with '-d') fixed this. Works like a charm now!

Update: from my Debian box, gnome-obex-send doesn't work, but obexftp does the job perfectly.

[edit] sending programs

Simple sending over the jar/jad for some reason isn't enough to install the application.

Instead, I installed 'gammu' and its frontend 'gammu'. 'wammu' had a nice wizard to configure the connection, and gammu had the powerful commandline to install the application:

gammu  nokiaaddfile  Application   trekbuddy

[edit] Current problems

[edit] sending files

..

[edit] Solved problems

[edit] Connecting

# rfcomm connect 0
(phone asks for PIN)
Can't connect RFCOMM socket: Connection refused

In syslog:

Nov  5 13:01:27 localhost hcid[4636]: pin_code_request (sba=00:16:41:4C:D0:FF, dba=00:12:37:3C:36:73)
Nov  5 13:01:27 localhost hcid[4636]: call_passkey_agent(): no agent registered

Started passkey-agent incorrectly:

passkey-agent --default 1234

log said:

Nov  5 13:08:56 localhost hcid[4636]: pin_code_request (sba=00:16:41:4C:D0:FF, dba=00:12:37:3C:36:73)
Nov  5 13:08:56 localhost hcid[4636]: Calling PasskeyAgent.Request: name=:1.11, path=/org/bluez/passkey_agent_7744
Nov  5 13:08:56 localhost hcid[4636]: Passkey agent replied with an error: org.freedesktop.DBus.Error.UnknownMethod, Method "Request" with signature "ss" on interface "org.bluez.PasskeyAgent" doesn't exist 

Started passkey-agent correctly:

passkey-agent --default /usr/bin/bluez-pin

Fixed!

[edit] Bluetooth headset

I also have a plantronics M2500 bluetooth headset (nice small and cheap). Found it by putting it in findable mode (holding 'up' and pressing the button) and running 'hcitool scan'.

Then (after making sure a passkey manager is started) 'sudo btsco -v 00:03:89:83:94:38' yielded a /dev/dsp2 and ALSA devices which were immediately usable in skype.

Link:

[edit] Calendaring

I've had luck with gnokii.

Personal tools