summaryrefslogtreecommitdiff
path: root/tools/hcitool.c
Commit message (Collapse)AuthorAgeFilesLines
* hcitool: Fix memory leak in cmd_infoAndre Guedes2014-02-171-0/+3
| | | | Free memory pointed by cr variable after it is used.
* tools: Use full include path for header filesMarcel Holtmann2014-01-251-2/+2
|
* tools: Fix strncat() usage in hciconfig/hcitoolAnderson Lizardo2014-01-061-8/+15
| | | | | | | | | | | | | | | | | | | According to strncat() manpage: "If src contains n or more characters, strncat() writes n+1 characters to dest (n from src plus the terminating null byte). Therefore, the size of dest must be at least strlen(dest)+n+1" While the current usage of strncat() cannot cause an overflow, if a bigger string is added to the switch()'s without increasing the static buffer, it would overflow by one byte due to the incorrect size calculation. Fixes clang errors like: tools/hciconfig.c:827:33: error: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Werror,-Wstrncat-size]
* tools: Use batocomp function instead of ouitocompMarcel Holtmann2012-12-091-6/+8
|
* Revert "Ensure config.h is included by using CPPFLAGS"Johan Hedberg2012-12-071-0/+4
| | | | | | | | | | | | | | This reverts commit 8a03376544b046a84301847d1594f6c3674983ff. 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
* Ensure config.h is included by using CPPFLAGSLucas De Marchi2012-12-051-4/+0
| | | | | | | | | | 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.
* hcitool: Retrieve names from cache directoryFrédéric Danis2012-10-311-5/+26
|
* hcitool: Add LE scan based on White ListClaudio Takahasi2012-09-061-1/+7
| | | | | | 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.
* tools: Fix using old-style initializersVinicius Costa Gomes2012-02-141-1/+1
|
* hcitool: Fix errno handling conventionAnderson Lizardo2011-11-171-8/+8
| | | | | | 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.
* hcitool: Fix EIR parsingJohan Hedberg2011-10-141-19/+27
| | | | | | 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).
* Add support for parsing the remote name during LE ScanVinicius Costa Gomes2011-10-141-1/+53
|
* Add support for cancelling a LE Scan with Control-CVinicius Costa Gomes2011-10-071-4/+21
|
* Filter duplicates by default with hcitool lescanJohan Hedberg2011-10-031-3/+9
|
* Fix unused variable warnings reported by GCC 4.6Johan Hedberg2011-05-151-2/+0
|
* Adjust LE command timeout and APIMarco Sinigaglia2011-03-101-3/+3
| | | | | | | 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.
* hcitool: add "whitelist" option to create LE connectionsClaudio Takahasi2011-03-041-4/+11
| | | | | | 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.
* hcitool: add random address type to LE Add to White ListClaudio Takahasi2011-03-041-2/+7
|
* hcitool: use defined constants for address typeClaudio Takahasi2011-03-041-2/+2
|
* hcitool: Add command to clear LE White ListArun Kumar Singh2011-03-011-0/+44
|
* hcitool: Add command to read size of LE White ListArun Kumar Singh2011-03-011-0/+47
|
* hcitool: Add command to remove a device from LE white listArun Kumar Singh2011-03-011-0/+47
|
* hcitool: Change commands struct formatingClaudio Takahasi2011-03-011-29/+29
|
* hcitool: Add command to add a device to LE White ListArun Kumar Singh2011-03-011-0/+47
|
* hcitool: fix interval and window parametersAndre Guedes2011-02-241-2/+7
| | | | | | | | | | | | | | | | | | 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.
* hcitool: add discovery procedure to lescan commandAndre Guedes2011-02-241-5/+77
| | | | | | | 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.
* Add hcitool command to change the parameters of a given LE connectionClaudio Takahasi2011-02-231-0/+86
| | | | | | 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.
* Remove unneeded comma in the hcitool commands declarationClaudio Takahasi2011-02-231-2/+2
|
* hcitool: Add bdaddr type option to leccAndrei Emeltchenko2011-02-111-2/+7
|
* Bluetooth: hcitool: add option for LE_Scan_Type parameterAndrei Emeltchenko2011-02-111-2/+8
| | | | The LE_Scan_Type parameter controls the type of scan to perform.
* Add option to enable privacy during scanning to hcitoolClaudio Takahasi2011-01-311-4/+9
| | | | | When privacy is enabled, random address is used during active scanning. The non-resolvable private address shall be set using hciconfig.
* Coding style fixes for lib and toolsMichal Labedzki2010-12-211-10/+10
|
* Fix tools UI to avoid program launch mistakes.Michal Labedzki2010-12-201-139/+62
| | | | | | | 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
* Make LE_LINK define private to hcitool.c for nowJohan Hedberg2010-11-211-0/+3
| | | | | | | 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.
* Print LE link type on hcitoolSheldon Demario2010-11-111-0/+2
|
* Use default adapter for LE commandsVille Tervo2010-07-161-0/+9
| | | | Choose default adapter if device was not specified on the command line.
* Add ledc command to hcitoolVinicius Costa Gomes2010-07-131-0/+51
| | | | | This command allows for low-level LE connections to be disconnected by handle.
* Add handle and timeout parameters to hci_le_create_connVinicius Costa Gomes2010-07-121-2/+4
| | | | | Now hci_le_create_conn is more consistent with hci_create_conn, both have a handle out parameter and a timeout.
* Add lecc command to hcitoolVinicius Costa Gomes2010-07-081-0/+66
| | | | | | | 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.
* Fix not respecting the user's endianism for LE ScanVinicius Costa Gomes2010-07-081-1/+1
| | | | | When setting LE Scan parameters we were assuming that the user was using a Little Endian machine.
* Add lescan command to hcitoolVinicius Costa Gomes2010-07-061-0/+118
| | | | This is a sample implementation of the LE Scan procedure.
* Update copyright informationMarcel Holtmann2010-01-011-1/+1
|
* Fix another variable initializationJohan Hedberg2009-10-021-1/+2
|
* Fix memory leaksSteve Grubb2009-10-021-1/+5
| | | | | I was doing some code reviews of the 4.54 release and found a few memory leaks. These are mostly in error paths.
* Fix memory leaks in hciconfig and hcitoolGustavo F. Padovan2009-02-101-2/+4
| | | | | Some printfs were using functions that return dynamic allocated memory as parameters.
* Add delay to have 2.1 setup settle before requesting features againMarcel Holtmann2009-02-031-0/+1
|
* Fix mostly every warning caused by -Wsign-compareMarcel Holtmann2009-01-291-1/+1
|
* Update copyright informationMarcel Holtmann2009-01-011-1/+1
|
* Get rid of format string warnings with recent gcc versionsJohan Hedberg2008-10-201-42/+42
| | | | | | 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.
* Improve reading of local and remote extended featuresMarcel Holtmann2008-09-291-16/+28
|