Commit Graph

640 Commits

Author SHA1 Message Date
Vinicius Costa Gomes
a7be2034ca hciconfig: Fix compiler warnings related to unaligned memory access 2012-02-14 14:39:15 +02:00
Vinicius Costa Gomes
4725ddffe2 hciconfig: Fix using old-style initializers 2012-02-14 14:39:05 +02:00
Vinicius Costa Gomes
42dc0063e4 tools: Fix using old-style initializers 2012-02-14 14:28:58 +02:00
Luiz Augusto von Dentz
21da0977bb sdptool: Add GoepL2capPsm decoding support 2012-02-07 12:34:12 +02:00
Andrei Emeltchenko
efe0957092 hciconfig: Print features for AMP devices
Check for HCI device type, the magic shift is due to dev type is packed
to dev_info type.
2011-12-08 11:39:40 +02:00
Anderson Lizardo
e40bc80bf5 csr_bcsp: Fix missing errno attribution
do_command() is supposed to set errno if returning -1.
2011-11-17 13:57:53 +02:00
Anderson Lizardo
7232da34fa bccmd: Fix overwriting errno value
On error, transport_read() returns -1 and sets errno.
2011-11-17 13:57:53 +02:00
Anderson Lizardo
382c867b09 hciconfig: Fix errno handling convention
Variables which are assigned to the errno variable (usually called
"err") should be negative, and "-err" should be used where a positive
value is needed.
2011-11-17 13:57:53 +02:00
Anderson Lizardo
100527bd5a hcitool: Fix errno handling convention
Variables which are assigned to the errno variable (usually called
"err") should be negative, and "-err" should be used where a positive
value is needed.
2011-11-17 13:57:53 +02:00
Johan Hedberg
6ecbffae1d hcitool: Fix EIR parsing
There were missing buffer size checks and wrong assumptions about the
EIR data length (core spec 4.0 defines it to be max 31 bytes, so the
name can be max 29 bytes).
2011-10-14 14:23:05 +03:00
Vinicius Costa Gomes
402398c7dc Add support for parsing the remote name during LE Scan 2011-10-14 10:48:07 +03:00
Vinicius Costa Gomes
6c85d28c8e Add support for cancelling a LE Scan with Control-C 2011-10-07 19:55:42 +03:00
Johan Hedberg
d9ae5bead2 Filter duplicates by default with hcitool lescan 2011-10-03 15:16:24 +03:00
Yegor Yefremov
2f440ad7b5 hciattach: fix serial speed setting for wl1271
override speed setting if firmware script issues serial settings command,
otherwise the value given in the firmware script will be overridden.

Example:

hciattach /dev/ttyO1 texas 115200

will fail, because /dev/ttyO1 will be opened with 115200 b/s, then
the firmware script will set the buadrate to 3000000 b/s, after UART init
hciattach.c will set the baudrate to 115200, so communication is broken.

The only correct way is to set both speeds:

hciattach -s 115200 /dev/ttyO1 texas 3000000

With this patch only initial speed must be specified. The former semantic
will be preserved in case the firmware script doesn't provide serial
settings action.

Tested with wl1271 and firmware TIInit_7.2.31.bts
2011-09-22 20:19:11 +09:00
Lucas De Marchi
fcb426c76a Fix common misspelled words
Accounting of misspelled words, as detected by codespell:

acording      2
ancilliary    1
appropiate    1
atribute      1
cant          1
comming       2
gracefull     1
lenght        1
mispelled     1
occured       1
occurences    1
ocurred       3
prefered      1
presense      1
reponse       1
seperate      1
succesful     1
successully   1
sucessfull    1
sucessfully   1
2011-07-03 14:36:14 +03:00
Slawomir Bochenski
f8e0916e2d Remove unnecessary jumps 2011-06-01 14:41:01 +03:00
Szymon Janc
8af5f43a69 Fix empty parameter list in functions declarations 2011-05-18 09:05:55 -07:00
Johan Hedberg
2076574365 Fix unused variable warnings reported by GCC 4.6 2011-05-15 01:57:12 +03:00
Szymon Janc
11e433f53e Fix redundant null check on calling free() 2011-05-15 01:47:06 +03:00
Johan Hedberg
4ae0fb61c2 Fix minor coding style issues in hid2hci 2011-04-28 12:57:56 -07:00
Kay Sievers
94b0a8f405 Update hid2hci tool from udev codebase 2011-04-28 12:54:31 -07:00
Bruna Moreira
cef8838500 Use HCI_MAX_EIR_LENGTH instead of hard-coded value 2011-04-27 16:25:02 -07:00
Johan Hedberg
3b9b749946 Fix LMP version string in hciconfig
Previously the HCI version was reported instead of the LMP one.

Reported-by: Arno Willig <akw@thinkwiki.org>
2011-03-28 15:42:23 +03:00
Marco Sinigaglia
39454251ef Adjust LE command timeout and API
The timeout value has been hardcoded on hci_send_req call and, instead,
it should be passed from above (for ex from hci_le_set_scan_enable).
This patch removes the hardcoded value from hci_send_req and it
increases the timeout to 1000ms.
2011-03-10 11:11:17 +02:00
Claudio Takahasi
dc920afdf5 hcitool: add "whitelist" option to create LE connections
If "whitelist" option is given, the peer address and type will be
ignored and the white list will be used to determine which advertiser
to connect to.
2011-03-04 16:45:50 -03:00
Claudio Takahasi
81a57bd00d hcitool: add random address type to LE Add to White List 2011-03-04 16:45:28 -03:00
Claudio Takahasi
3f6465163d hcitool: use defined constants for address type 2011-03-04 16:45:11 -03:00
Arun Kumar Singh
5292112420 hcitool: Add command to clear LE White List 2011-03-01 16:16:42 -03:00
Arun Kumar Singh
fc10b2c6f1 hcitool: Add command to read size of LE White List 2011-03-01 16:16:40 -03:00
Arun Kumar Singh
d68ff374da hcitool: Add command to remove a device from LE white list 2011-03-01 16:16:38 -03:00
Claudio Takahasi
7e018c6e02 hcitool: Change commands struct formating 2011-03-01 16:16:37 -03:00
Arun Kumar Singh
265059a149 hcitool: Add command to add a device to LE White List 2011-03-01 16:16:35 -03:00
Andre Guedes
47316f8c80 hcitool: fix interval and window parameters
Set interval and window parameters properly if --discovery option
is present in lescan command.

According to the Bluetooth spec, during a general or limited discovery
procedure the scan interval and the scan window should be set to
11.25 ms. If --discovery option isn't present, both parameters are set
to the default value (10 ms) defined in LE Set Scan Parameters Command.

According to that command description, the interval and window parameters
should be set as follows:

	Time = N * 0.625 msec

So, in order to set the time values to 11.25 and 10 ms, the parameters
should be equal to 18 (0x0012) and 16 (0x0010), respectively.
2011-02-24 17:40:22 -03:00
Andre Guedes
cf81589842 hcitool: add discovery procedure to lescan command
This patch adds the option [--discovery=g|l] to lescan command. Use
this option to enable the general or limited discovery procedure.
If discovery option is not given scanning will display all results
ignoring the AD flags.
2011-02-24 17:39:12 -03:00
Claudio Takahasi
9152acfbc7 Add hcitool command to change the parameters of a given LE connection
Allows the LE master to start the Connection Parameter Update Procedure.
Parameters values consistency are not verified on purpose allowing
invalid values to test fail scenarios.
2011-02-23 00:27:22 -03:00
Claudio Takahasi
8e7af67a19 Remove unneeded comma in the hcitool commands declaration 2011-02-23 00:27:15 -03:00
Andrei Emeltchenko
61b3ce7194 hcitool: Add bdaddr type option to lecc 2011-02-11 14:07:22 -08:00
Andrei Emeltchenko
2cc99a5ea6 Bluetooth: hcitool: add option for LE_Scan_Type parameter
The LE_Scan_Type parameter controls the type of scan to perform.
2011-02-11 13:41:28 -08:00
Gustavo F. Padovan
12eac6993b rename: tools/main.c to tools/rfcomm.c 2011-02-04 06:55:46 +02:00
Andre Dieb Martins
ea6c8a871f Fix hciconfig leadv returned response
Fixes hciconfig leadv returned response by treating both status of the
command execution and HCI error code.
2011-02-01 11:07:00 +02:00
Claudio Takahasi
a026163d2c Add option to enable privacy during scanning to hcitool
When privacy is enabled, random address is used during active scanning.
The non-resolvable private address shall be set using hciconfig.
2011-01-31 10:37:05 +02:00
Claudio Takahasi
150f7a26db Add option to set LE random address to hciconfig 2011-01-31 10:37:02 +02:00
Claudio Takahasi
f2861a8c79 Add LE read supported states for hciconfig
Displays the states and state combinations that the link layer
supports. Usage: hciconfig hcix lestates
2010-12-29 23:48:19 +02:00
Michal Labedzki
ed2c65ad9d Coding style fixes for lib and tools 2010-12-21 10:50:59 +02:00
Michal Labedzki
57aa201c25 Fix tools UI to avoid program launch mistakes.
hciconfig: warrning user on unknown commands
hcitool: return error on unknown command in hcitool
fix length size in comparision to avoid ambiguity commands
check if command number of arguments is correct
2010-12-20 17:39:06 +02:00
Suraj Sumangala
4e0e44626d hciattach: download configuration at user requested baud rate
This patch support downloading configuration for Atheros AR300x HCI UART
chip at user requested baud rate instead of the initial baud rate.
2010-11-23 12:09:20 +01:00
Suraj Sumangala
429877099f hciattach: make set_speed return error if any operation fails
This patch lets set_speed function changing UART baud rate to return an
error code if any one operation fails instead of returning only the last
operation's status.
2010-11-23 12:08:54 +01:00
Wade Brown
53095459ee Add a runtime option to set the BCSP communication rate 2010-11-23 10:01:58 +01:00
Johan Hedberg
29c494df12 Make LE_LINK define private to hcitool.c for now
The value 0x03 isn't something that exists in the core spec, so it
shouldn't be used in the same API as SCO/ACL link types. Since there are
some experimental kernel patches that use it this patch makes it private
to hcitool.c.
2010-11-21 20:01:20 +01:00
Suraj Sumangala
0e32ca24d1 hciattach: send hci commands after hci socket bring up
This patch makes The Atheros AR300x specific initialization code
to send power management command over HCI socket after bringing up
the device.
2010-11-19 17:24:17 +02:00