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

- 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

- 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

- 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

No comments:

Post a Comment


Related Posts with Thumbnails