Asus EeePC and Bluetooth

Jeez, this took far longer to setup and get working than I expected. Some of the below code may now be superfluous, but I’m not changing anything, now that I’ve got it working!

Steps to setup OBEX for me, on a 701, with a Broadcom Bluetooth USB dongle (Broadcom Corp. BCM20350) and a Sony Ericsson k800i:

1. Plugin USB dongle
2. Run command ‘dmesg’ and check the last few lines of log, to see HCI device lines.
3. Run command ’sudo hciconfig’, to get a list of devices
4. Run command ’sudo hciconfig hci0 up’, to bring up device (up,down,status)
5. To install OBEX stuff
- Run commands ’sudo apt-get install ussp-push; sudo apt-get install obexpushd’
6. Run command ‘hcitool scan’ and make a note of hex string e.g: 00:AA:11:22:33:BB
7. Find OBEX channel number - run command ’sdptool search –bdaddr 00:AA:11:22:33:BB OPUSH
8. Edit /etc/bluetooth/rfcomm.conf (e.g sudo nano /etc/bluetooth/rfcomm.conf). Mine looks like this:

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

# Bluetooth address of the device
device 00:1B:59:15:3B:24;

# RFCOMM channel for the connection
channel 6;

# Description of the connection
comment "mobile";
}

9. Edit /etc/bluetooth/hcid.conf, mine looks like this:

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 auto;

# 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
pin_helper /etc/bluetooth/givepin;
# passkey "1234";
}

# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "%h-%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;
discovto 0;

# 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;

auth enable;
}


/etc/bluetooth/givepin is an executable script that looks like this:

#!/bin/sh
echo "PIN:1234"

10. Download a binary copy of passkey-agent (google it, or via here)

11. Not sure if needed but ’sudo /etc/init.d/dbus restart; sudo /etc/init.d/bluetooth restart’ seem to help sometimes.

12. Run command ’sudo ./passkey-agent –default 1234 &’

13. Run command ‘rfcomm connect 6 00:1B:59:15:3B:24′
- this should start the pairing up, entering the appropriate PIN on phone if requested.

14. That should be about it. To send a file to phone:

sudo ussp-push /dev/rfcomm0 ./picture.jpg picture.jpg

To receive files from phone:

obexpushd -n -B, then control-C to finish after the transfer.

Most of this was sourced from the EeePC forum site, but I could not find a complete list of instructions. Happy hunting!


Was this helpful?

View Results

Loading ... Loading ...

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment