1. Homepage
  2. Articoli
  3. Video
  4. Bash scripting
  5. Sistema
  6. Tips
  7. News


Linux bluetooth

» Author: Andrea Ganduglia Date: 2007-12-03 18:21:08 Copyright: (c)2007 Andrea Ganduglia

Please note this article is under editing!

  501  hciconfig hci0 up
  502  hciconfig 
  503  hcitool dev
  504  hcitool scan
  505  sdptool browse
  512  sdptool browse 00:15:B9:53:A9:32
  510  obexftp -b 00:15:B9:53:A9:32 -B 7 -p /home/alibi/image/sandwich.jpg 
root@wow:~# sdptool search --bdaddr 00:15:B9:53:A9:32 [--xml] FTP
Inquiring ...
Searching for FTP on 00:15:B9:53:A9:32 ...
Service Name: OBEX FileTransfer
Service RecHandle: 0x10006
Service Class ID List:
  "OBEX File Transfer" (0x1106)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 7
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX File Transfer" (0x1106)
    Version: 0x0100

Final and summary!

hcitool scan ottengo ID del telefono
sdptool search prende ID e restituisce channel
obexftp usa ID e channel per inviare filename
root@wow:~# hcitool scan
Scanning ...
        00:15:B9:53:A9:32       pandu

root@wow:~# sdptool search --bdaddr 00:15:B9:53:A9:32 OPUSH
Searching for OPUSH on 00:15:B9:53:A9:32 ...
Service Name: OPP
Service RecHandle: 0x10005
Service Class ID List:
  "OBEX Object Push" (0x1105)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 5
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX Object Push" (0x1105)
    Version: 0x0100

root@wow:~# obexftp -b 00:15:B9:53:A9:32 -B 5 -p /home/alibi/image/sandwich.jpg
Browsing 00:15:B9:53:A9:32 ...
Channel: 7
Connecting...done
Sending "/home/alibi/image/sandwich.jpg"...|done
Disconnecting...done