The Bluetooth, FreeBSD & Siemens S5x Blues
I finally got it to work... Thanks to Maksim Yevmenkin for his help.
He apparently is the one who wrote the obexapp CLI port for FreeBSD. Since the GUI tools that enable us to synchronize with Linux via Bluetooth haven't been ported to FreeBSD (I know Multisync is there, but I can't get it to work for me), I've been trying on and off to get stuff out of my phone and into my PC (in case I lose my phone, which happens about twice a year). Last week I decided to get it to work, so I asked for help on the freebsd-bluetooth mailing list.
So this is it:
(The bluetooth addresses have been changed...)
Define your device in /etc/hcsecd.conf:
device {
bdaddr aa:bb:cc:dd:ee:ff;
name "CLCWS56";
key nokey;
pin nopin;
}
And specify it in /etc/bluetooth/hosts like so:
aa:bb:cc:dd:ee:ff Phone #Whatever
(The following assumes hcsecd and sdpd are running, to enable them at startup, add the following lines to /etc/rc.conf: hcsecd_enable="YES"
sdpd_enable="YES"
To verify hcsecd is up, do:
#/etc/rc.d/hcsecd status
If it is not:
#/etc/rc.d/hcsecd start
Verify your BT is working:
#hccontrol -n ubt0hci inquiry
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:11:22:33:44:55
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 52:02:04
Clock offset: 0x78ef
Inquiry complete. Status: No error [00]
Now try and ping the phone:
# l2ping -a aa:bb:cc:dd:ee:ff
0 bytes from CLCWS56 seq_no=0 time=879.100 ms result=0
0 bytes from CLCWS56 seq_no=1 time=34.452 ms result=0
0 bytes from CLCWS56 seq_no=2 time=39.334 ms result=0
^C
Let's see what services it offers:
#sdpcontrol -a aa:bb:cc:dd:ee:ff browse
Record Handle: 0x00011101
Service Class ID List:
Serial Port (0x1101)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 1
Bluetooth Profile Descriptor List:
Serial Port (0x1101) ver. 1.0
Record Handle: 0x00011103
Service Class ID List:
Dial-Up Networking (0x1103)
Generic Networking (0x1201)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 1
Bluetooth Profile Descriptor List:
Dial-Up Networking (0x1103) ver. 1.0
Record Handle: 0x00011111
Service Class ID List:
Fax (0x1111)
Generic Telephony (0x1204)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 1
Bluetooth Profile Descriptor List:
Fax (0x1111) ver. 1.0
Record Handle: 0x00011105
Service Class ID List:
OBEX Object Push (0x1105)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 4
OBEX (0x0008)
Bluetooth Profile Descriptor List:
OBEX Object Push (0x1105) ver. 1.0
Record Handle: 0x00011104
Service Class ID List:
IrMC Sync (0x1104)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 5
OBEX (0x0008)
Bluetooth Profile Descriptor List:
IrMC Sync (0x1104) ver. 1.0
Record Handle: 0x00011112
Service Class ID List:
Headset Audio Gateway (0x1112)
Generic Audio (0x1203)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 2
Bluetooth Profile Descriptor List:
Headset (0x1108) ver. 1.0
Record Handle: 0x0001111f
Service Class ID List:
Handsfree Audio Gateway (0x111f)
Generic Audio (0x1203)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 3
Bluetooth Profile Descriptor List:
Handsfree (0x111e) ver. 1.0
This was as far as I got without help. The rest is not so tough now.
Sending an object:
#obexapp -c -a CLCWS56 -C opush -n put file_name
(If you're running as root, the following won't work, see below.)
(The /var/spool/obex directory needs to exist in order for this to work.)
The obex server:
#obexapp -s -S -C 1 -u user_name
If you're root:
(Not that I would recommend doing anything as root ;-) )
( /root is the object directory):
#obexapp -s -S -C 1 -r /root
If all of this works, sending the phone's contacts to the PC will work. They'll appear as .vcf files, which you can then import into Evolution or whatever you're using. Note that you can't bulk-import these files, you have to do it by hand, it took me about 2 hours.
He apparently is the one who wrote the obexapp CLI port for FreeBSD. Since the GUI tools that enable us to synchronize with Linux via Bluetooth haven't been ported to FreeBSD (I know Multisync is there, but I can't get it to work for me), I've been trying on and off to get stuff out of my phone and into my PC (in case I lose my phone, which happens about twice a year). Last week I decided to get it to work, so I asked for help on the freebsd-bluetooth mailing list.
So this is it:
(The bluetooth addresses have been changed...)
Define your device in /etc/hcsecd.conf:
device {
bdaddr aa:bb:cc:dd:ee:ff;
name "CLCWS56";
key nokey;
pin nopin;
}
And specify it in /etc/bluetooth/hosts like so:
aa:bb:cc:dd:ee:ff Phone #Whatever
(The following assumes hcsecd and sdpd are running, to enable them at startup, add the following lines to /etc/rc.conf: hcsecd_enable="YES"
sdpd_enable="YES"
To verify hcsecd is up, do:
#/etc/rc.d/hcsecd status
If it is not:
#/etc/rc.d/hcsecd start
Verify your BT is working:
#hccontrol -n ubt0hci inquiry
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:11:22:33:44:55
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 52:02:04
Clock offset: 0x78ef
Inquiry complete. Status: No error [00]
Now try and ping the phone:
# l2ping -a aa:bb:cc:dd:ee:ff
0 bytes from CLCWS56 seq_no=0 time=879.100 ms result=0
0 bytes from CLCWS56 seq_no=1 time=34.452 ms result=0
0 bytes from CLCWS56 seq_no=2 time=39.334 ms result=0
^C
Let's see what services it offers:
#sdpcontrol -a aa:bb:cc:dd:ee:ff browse
Record Handle: 0x00011101
Service Class ID List:
Serial Port (0x1101)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 1
Bluetooth Profile Descriptor List:
Serial Port (0x1101) ver. 1.0
Record Handle: 0x00011103
Service Class ID List:
Dial-Up Networking (0x1103)
Generic Networking (0x1201)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 1
Bluetooth Profile Descriptor List:
Dial-Up Networking (0x1103) ver. 1.0
Record Handle: 0x00011111
Service Class ID List:
Fax (0x1111)
Generic Telephony (0x1204)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 1
Bluetooth Profile Descriptor List:
Fax (0x1111) ver. 1.0
Record Handle: 0x00011105
Service Class ID List:
OBEX Object Push (0x1105)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 4
OBEX (0x0008)
Bluetooth Profile Descriptor List:
OBEX Object Push (0x1105) ver. 1.0
Record Handle: 0x00011104
Service Class ID List:
IrMC Sync (0x1104)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 5
OBEX (0x0008)
Bluetooth Profile Descriptor List:
IrMC Sync (0x1104) ver. 1.0
Record Handle: 0x00011112
Service Class ID List:
Headset Audio Gateway (0x1112)
Generic Audio (0x1203)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 2
Bluetooth Profile Descriptor List:
Headset (0x1108) ver. 1.0
Record Handle: 0x0001111f
Service Class ID List:
Handsfree Audio Gateway (0x111f)
Generic Audio (0x1203)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 3
Bluetooth Profile Descriptor List:
Handsfree (0x111e) ver. 1.0
This was as far as I got without help. The rest is not so tough now.
Sending an object:
#obexapp -c -a CLCWS56 -C opush -n put file_name
(If you're running as root, the following won't work, see below.)
(The /var/spool/obex directory needs to exist in order for this to work.)
The obex server:
#obexapp -s -S -C 1 -u user_name
If you're root:
(Not that I would recommend doing anything as root ;-) )
( /root is the object directory):
#obexapp -s -S -C 1 -r /root
If all of this works, sending the phone's contacts to the PC will work. They'll appear as .vcf files, which you can then import into Evolution or whatever you're using. Note that you can't bulk-import these files, you have to do it by hand, it took me about 2 hours.


0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home