1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.

Wednesday, July 22, 2009

Bluetooth command line operations in linux

Here are the commands one can use to work with bluetooth devices in a linux based pc

hciconfig
- Gives info about the bluetooth hci on your pc
- Ensure the device is up and running and has required scan modes
- hcitool dev should also give some of this info

hcitool inq and hcitool scan
- Gives info about or rather identifies nearby bluetooth devices

hcitool info
- BTAddr refferes bluetooth address.
- Get info about remote bluetooth device

l2ping
- One way to see if we can communicate with a remote bluetooth device

sdptool browse or sdptool records
- Gives info about the services provided by a remote bluetooth device

obexftp –nopath –noconn –uuid none –bluetooth –channel elNo> –put
- Allows one to send file without specifying the pin on the remote device side
- The OPush channel number for device is got from sdptool above

passkey-agent –default
- Pin specified here is what the remote BT device should provide
or its user enter on that device when requested.

obexftp -b -v -p
- Allows one to put a file onto the specified BT device
- obexftp could also be used to get or list the files on the BT device
- also allows one to identify a nearby BT device by just giving -b option

obexpushd
- Allows one to recieve files sent from a bluetooth device.
- Depending on who started it, the recieved files will be stored in the corresponding home directory

Note: The old style pin_handler doesn’t work with latest bluez(is a protocol stack for linux), you require adbus based passkey handler and there is one provided by default by bluez-utils
called passkey-agent

2 comments:

  1. If you're going to copy someone else's work, at least give them credit. The above article is taken verbatim from:

    http://hanishkvc.wordpress.com/2007/05/16/short-and-simple-commandline-bluetooth-in-any-new-linux-distros/

    ReplyDelete

Related Posts with Thumbnails