Sponsored Content
Top Forums Shell Programming and Scripting hcitool scan via shell script Post 302215184 by rahulkhn on Tuesday 15th of July 2008 07:56:23 PM
Old 07-15-2008
hcitool scan via shell script

Hello,

Im new to shell scripting , and i have the following question .

The hcitool scan command returns the bluetooth address of the phone . When it is run the output is something like

Code:
Scanning....
             00:A1:5D:AB:B2:E9  Nokia 6600

Can i get the output in a varaiable in a shell script ?

I tried redirecting the output to a file, as follows

Code:
hcitool scan > addr

But the file only recorded "Scanning....". The remaining part was not saved.

Please help.

Thanks.

Last edited by rahulkhn; 07-15-2008 at 09:02 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

port scan shell script

Hi, Can any one please suggest me commands for making port scan shell script. (3 Replies)
Discussion started by: nrbhole
3 Replies

2. Shell Programming and Scripting

Perl script to scan through files

Dear perl gurus, I plan to create a script that will scan through a logfile line by line. And if ever a certain line meets the below conditions, it will alert me via email. --> a) Position 10 to 13 = "ABCD" b) And also if the amount specified in position 620-640 is less than the amount in... (1 Reply)
Discussion started by: gholdbhurg
1 Replies

3. Shell Programming and Scripting

Perl script to scan back lines

Hi Perl gurus, I have this file to scan through. Sample lines below: 2008031A, USERNAME, 12345, give ABC, take XYZ, transaction submitted 2008031B, USERNAME, 12346, waiting for processing 2008031C, USERNAME, 12347, Retrieving response 2008031D, USERNAME, 12348, This is not a valid dealing... (3 Replies)
Discussion started by: gholdbhurg
3 Replies

4. Shell Programming and Scripting

Script to Scan proclog files

i need to create a shell script, which will go into a directory , and scan the files in it for defined errors, there will be around 10 files in the directory. (3 Replies)
Discussion started by: deeprajn95
3 Replies

5. Shell Programming and Scripting

How to scan data directly from Table using a script

Hi, I have a new task where i have two tables Acct_ open and lookup table In the Acct_open table there is all the information about an account including account number and lookup table is having a country code and corresponding country name where that account has been opened. both... (2 Replies)
Discussion started by: manmeet
2 Replies

6. Shell Programming and Scripting

Shell Script to continuously scan a log file

Hello members, I have some doubts on how to write a script that can reports success / failure of a batch job ? 1. Run a batch job: 2. Wait and search for a particular string in the Log file: tail -f log01*.txt | egrep -v "^SUCCESSFUL" echo "continue with the other tasks" ... (1 Reply)
Discussion started by: novice82
1 Replies

7. Shell Programming and Scripting

A script to scan a directory for XML files,

Hi, I am fairly new to unix/linux scripting (about 1 week) and have written a script to scan a directory for xml files, if found call and oracle procedure passing in the file name and then move the file once processed to an archive area. Now everything seems to be working except when there... (3 Replies)
Discussion started by: apacheuk
3 Replies

8. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

9. Shell Programming and Scripting

How to write script to scan ip list through Nessus?

Scripting language: Shell script I want to Scan IP's from IPlist.txt through Nessus using shell scripting language. Give the Input (IPlist) to nessus and generate Nessus report in xml or PDF form which is saved automatically on computer . Please help if any one has idea about how to write... (2 Replies)
Discussion started by: sk151993
2 Replies

10. Shell Programming and Scripting

Script to scan the disks and make file system

Hi What I'm trying to do(manually) is logging into the server and running the below mentioned commands ls /sys/class/scsi_device/ | while read i; do echo "- - -" > /sys/class/scsi_device/$i/device/rescan;done lsblk echo -e "o\nn\np\n1\n\n\nw" | fdisk /dev/sdd partx -a /dev/sdd1... (7 Replies)
Discussion started by: James0806
7 Replies
HCITOOL(1)						    Linux System Administration 						HCITOOL(1)

NAME
hcitool - configure Bluetooth connections SYNOPSIS
hcitool [-h] hcitool [-i <hciX>] [command [command parameters]] DESCRIPTION
hcitool is used to configure Bluetooth connections and send some special command to Bluetooth devices. If no command is given, or if the option -h is used, hcitool prints some usage information and exits. OPTIONS
-h Gives a list of possible commands -i <hciX> The command is applied to device hciX , which must be the name of an installed Bluetooth device. If not specified, the command will be sent to the first available Bluetooth device. COMMANDS
dev Display local devices inq Inquire remote devices. For each discovered device, Bluetooth device address, clock offset and class are printed. scan Inquire remote devices. For each discovered device, device name are printed. name <bdaddr> Print device name of remote device with Bluetooth address bdaddr. info <bdaddr> Print device name, version and supported features of remote device with Bluetooth address bdaddr. spinq Start periodic inquiry process. No inquiry results are printed. epinq Exit periodic inquiry process. cmd <ogf> <ocf> [parameters] Submit an arbitrary HCI command to local device. ogf, ocf and parameters are hexadecimal bytes. con Display active baseband connections cc [--role=m|s] [--pkt-type=<ptype>] <bdaddr> Create baseband connection to remote device with Bluetooth address bdaddr. Option --pkt-type specifies a list of allowed packet types. <ptype> is a comma-separated list of packet types, where the possible packet types are DM1, DM3, DM5, DH1, DH3, DH5, HV1, HV2, HV3. Default is to allow all packet types. Option --role can have value m (do not allow role switch, stay master) or s (allow role switch, become slave if the peer asks to become master). Default is m. dc <bdaddr> [reason] Delete baseband connection from remote device with Bluetooth address bdaddr. The reason can be one of the Bluetooth HCI error codes. Default is 19 for user ended connections. The value must be given in decimal. sr <bdaddr> <role> Switch role for the baseband connection from the remote device to master or slave. cpt <bdaddr> <packet types> Change packet types for baseband connection to device with Bluetooth address bdaddr. packet types is a comma-separated list of packet types, where the possible packet types are DM1, DM3, DM5, DH1, DH3, DH5, HV1, HV2, HV3. rssi <bdaddr> Display received signal strength information for the connection to the device with Bluetooth address bdaddr. lq <bdaddr> Display link quality for the connection to the device with Bluetooth address bdaddr. tpl <bdaddr> [type] Display transmit power level for the connection to the device with Bluetooth address bdaddr. The type can be 0 for the current transmit power level (which is default) or 1 for the maximum transmit power level. afh <bdaddr> Display AFH channel map for the connection to the device with Bluetooth address bdaddr. lp <bdaddr> [value] With no value, displays link policy settings for the connection to the device with Bluetooth address bdaddr. If value is given, sets the link policy settings for that connection to value. Possible values are RSWITCH, HOLD, SNIFF and PARK. lst <bdaddr> [value] With no value, displays link supervision timeout for the connection to the device with Bluetooth address bdaddr. If value is given, sets the link supervision timeout for that connection to value slots, or to infinite if value is 0. auth <bdaddr> Request authentication for the device with Bluetooth address bdaddr. enc <bdaddr> [encrypt enable] Enable or disable the encryption for the device with Bluetooth address bdaddr. key <bdaddr> Change the connection link key for the device with Bluetooth address bdaddr. clkoff <bdaddr> Read the clock offset for the device with Bluetooth address bdaddr. clock [bdaddr] [which clock] Read the clock for the device with Bluetooth address bdaddr. The clock can be 0 for the local clock or 1 for the piconet clock (which is default). AUTHORS
Written by Maxim Krasnyansky <maxk@qualcomm.com> and Marcel Holtmann <marcel@holtmann.org> man page by Fabrizio Gennari <fabrizio.gennari@philips.com> BlueZ Nov 12 2002 HCITOOL(1)
All times are GMT -4. The time now is 04:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy