Commit Graph

148 Commits

Author SHA1 Message Date
Marcel Holtmann
4ba84c72f1 tools: Use batocomp function instead of ouitocomp 2012-12-09 00:02:22 +01:00
Johan Hedberg
b8779d2202 Revert "Ensure config.h is included by using CPPFLAGS"
This reverts commit 8a03376544.

The patch needs to be split up and the gdbus/ changes were bogus
compared to the original commit message.

Conflicts:
	Makefile.am
	Makefile.obexd
	profiles/cyclingspeed/cyclingspeed.c
	profiles/heartrate/heartrate.c
	src/error.c
2012-12-07 12:46:04 +02:00
Lucas De Marchi
8a03376544 Ensure config.h is included by using CPPFLAGS
Instead of trying to include config.h in each file over the tree and
possibly forgetting to include it, give a "-include config.h" argument
to the compiler so it's guaranteed that a) it will be included for all
source files and b) it will be the first header included.

gdbus/ directory is left out, since it would break other projects using
it.
2012-12-05 17:18:07 +02:00
Frédéric Danis
566ef74749 hcitool: Retrieve names from cache directory 2012-10-31 11:05:30 +02:00
Claudio Takahasi
30529a58b0 hcitool: Add LE scan based on White List
This patch extends the LE scanning command allowing the user to inform
an option to enable LE scanning detecting advertises sent from devices
in the White List Only. This option can be used combined with others.
2012-09-06 17:32:34 +03:00
Vinicius Costa Gomes
42dc0063e4 tools: Fix using old-style initializers 2012-02-14 14:28:58 +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
Johan Hedberg
2076574365 Fix unused variable warnings reported by GCC 4.6 2011-05-15 01:57:12 +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
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
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
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
Sheldon Demario
bca4b3c88b Print LE link type on hcitool 2010-11-11 12:04:47 +02:00
Ville Tervo
e49d5d3738 Use default adapter for LE commands
Choose default adapter if device was not specified on the command line.
2010-07-16 13:51:57 -03:00
Vinicius Costa Gomes
65d1af240b Add ledc command to hcitool
This command allows for low-level LE connections to be disconnected
by handle.
2010-07-13 17:34:58 -03:00
Vinicius Costa Gomes
71716c2a00 Add handle and timeout parameters to hci_le_create_conn
Now hci_le_create_conn is more consistent with hci_create_conn, both
have a handle out parameter and a timeout.
2010-07-12 20:11:43 -03:00
Vinicius Costa Gomes
c8e88ab534 Add lecc command to hcitool
This command allows the creation of LE Connections to remote devices.
The command is useful for testing if the local device is able to start
connections and if the remote device is able to receive connection
requests.
2010-07-08 21:05:36 -03:00
Vinicius Costa Gomes
46d1c28faf Fix not respecting the user's endianism for LE Scan
When setting LE Scan parameters we were assuming that the user was using
a Little Endian machine.
2010-07-08 21:05:36 -03:00
Vinicius Costa Gomes
9438aa4682 Add lescan command to hcitool
This is a sample implementation of the LE Scan procedure.
2010-07-06 20:17:38 -03:00
Marcel Holtmann
9184e2eeb7 Update copyright information 2010-01-01 17:08:17 -08:00
Johan Hedberg
1d7afe8211 Fix another variable initialization 2009-10-02 11:19:05 +02:00
Steve Grubb
2e926fb016 Fix memory leaks
I was doing some code reviews of the 4.54 release and found a few memory
leaks. These are mostly in error paths.
2009-10-02 11:18:16 +02:00
Gustavo F. Padovan
28faab63be Fix memory leaks in hciconfig and hcitool
Some printfs were using functions that return dynamic allocated memory
as parameters.
2009-02-10 16:40:47 +01:00
Marcel Holtmann
8dcd4a1f5e Add delay to have 2.1 setup settle before requesting features again 2009-02-03 01:32:10 +01:00
Marcel Holtmann
9c0b5859e6 Fix mostly every warning caused by -Wsign-compare 2009-01-29 17:58:28 +01:00
Marcel Holtmann
fb333f1c88 Update copyright information 2009-01-01 19:33:20 +01:00
Johan Hedberg
efcfad7c00 Get rid of format string warnings with recent gcc versions
Recent gcc versions, like 4.3.2 from ubuntu intrepid, give warnings like
"format not a string literal and no format arguments" without this
patch.
2008-10-20 01:10:11 +03:00
Marcel Holtmann
4652763c85 Improve reading of local and remote extended features 2008-09-29 02:50:06 +02:00
Marcel Holtmann
ea3f9b2d64 Allow specifying of reason for the disconnect 2008-08-27 14:47:31 +02:00
Marcel Holtmann
1e23f60da1 Use const char for usage text 2008-08-15 00:17:29 +02:00
Marcel Holtmann
bbd957c4d9 Add support for reading/setting the link policy 2008-06-12 21:53:32 +00:00