Bluetooth HOWTO

Instal·lar Bluetooth a Debian Lenny

# sudo aptitude install bluez-gnome bluez-utils gnome-bluetooth gnome-vfs-obexftp libbluetooth2 libbtctl4 libgnomebt0 nautilus-sendto obexfs obexftp python-bluez python-libbtctl

Sincronitzar des d'un mòbil

$ hcitool scan
Scanning...
00:12:D2:B3:B7:17       MobilGros

$ sdptool browse 00:12:D2:B3:B7:17
Browsing 00:12:D2:B3:B7:17 ...

Service Name: SyncMLClient
Service RecHandle: 0x1000e
Service Class ID List:
  UUID 128: 00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 10
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "" (0x00000002-0000-1000-8000-0002ee000002)
    Version: 0x0100

$ cd
$ mkdir sync
$ msynctool --addgroup nokia
$ msynctool --addmember nokia file-sync
$ msynctool --addmember nokia syncml-obex-client
$ msynctool --configure nokia 1

La darrera comanda obre un editor on hi hem de posar:

<config>
<path>/home/USERNAME/sync</path>
<recursive>FALSE</recursive>
</config>

Ara ens queda configurar syncml-client:

$ msynctool --configure nokia 2

Torna a obrir un editor on ara hem de posar:

<config>
<bluetooth_address>00:12:D2:B3:B7:17</bluetooth_address>
<bluetooth_channel>12</bluetooth_channel>
<identifier>PC Suite</identifier>
<version>1</version>
<wbxml>1</wbxml>
<username></username>
<password></password>
<type>2</type>
<usestringtable>1</usestringtable>
<onlyreplace>0</onlyreplace>
<recvLimit>10000</recvLimit>
<maxObjSize>0</maxObjSize>
<contact_db>Contacts</contact_db>
<calendar_db>Calendar</calendar_db>
<note_db>Notes</note_db>
</config>

Fixem-nos que hem de canviar l'adreça i el canal pel que ens interessin.

Això és tot, per sincronitzar fem:

$ msynctool --sync nokia

PPP amb Nokia

TIMEOUT 35
ECHO    ON
ABORT   '\nBUSY\r'
ABORT   '\nERROR\r'
ABORT   '\nNO ANSWER\r'
ABORT   '\nNO CARRIER\r'
ABORT   '\nNO DIALTONE\r'
ABORT   '\nRINGING\r\n\r\nRINGING\r'
''      \rAT
OK      'ATE0V1&D2&C1S0=0+IFC=2,2'
OK      'AT+CGDCONT=1,"IP","ac.vodafone.es"'
OK      'ATDT*99***1#'
CONNECT ""

connect "/usr/sbin/chat -v -f /etc/chatscripts/chat-nokia"
/dev/rfcomm0 115200
noipdefault
usepeerdns
defaultroute
persist
noauth
crtscts
lcp-echo-failure 0

Bluetooth (last edited 2008-07-31 19:23:58 by AlbertManyà)