2009年12月22日 星期二

Linux bluetooth for console-only devices

File transfer without X

I was using a NB with Ubuntu, and a development board, with ARM CPU, ARM Debian installed, which currently only have serial console.

bluetooth
bluez
bluez-gnome
obexftp
obexd-server

DUT to other device

  1. insert required module
  2. if DBus/Bluetoothd is not up yet, bring it up.
    /etc/init.d/dbus restart;
    /etc/init.d/bluetooth restart;
  3. hcitool dev
  4. l2test
    (For unknown reason, I cannot find l2test in any package of Ubuntu, so I download a new bluez-4.58, running configure with --enable-test to get l2test. It works just fine.)
    l2test -I 2000 -r&
    l2test -s 00:11:67:8A:A9:26
    ./l2test -s 0:11:67:8A:A9:27
  5. start authorization agent
    bluetooth-agent 0000 &
  6. do file transfer

    bluetooth-sendto --dest=0E:70:24:91:66:01 video.mp4
    (require X)

    obexftp -b 0E:70:24:91:66:01 -p 2008-10-09-211.jpg
    (doesn't require X)
other device to DUT
  1. enable inquiry scan
    hciconfig hci0 piscan
  2. enable file transfer server
    obexftpd -b /
    (doesn't require X)

    obex-data-server
    (require X)


BlueZ
http://www.bluez.org/

Linux BlueZ Howto
http://jeremythompson.uklinux.net/RH8-0/bluezhowto.pdf

The Penguin with the BlueZ
http://fedoraproject.org/w/uploads/4/40/FUDCon_FUDCon2_FUDCon2MarcelHoltmann.pdf

BlueZ aware applications
http://wiki.bluez.org/wiki/UsingBluez

BlueZ: HOWTO/Authorization
http://wiki.bluez.org/wiki/HOWTO/Authorization

BlueZ: Bluetooth Services
http://wiki.bluez.org/wiki/Services

pastebin - collaborative debugging tool
http://pastebin.com

沒有留言: