Commit Graph

229 Commits

Author SHA1 Message Date
Brian Campbell
9affcf438b bluetooth/hccontrol: Fix unterminated command list
Signed-off-by: Brian Campbell <Brian.Campbell@ed.ac.uk>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/730
2023-05-04 16:01:36 -06:00
Simon J. Gerraty
d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Elyes Haouas
beb2af45bd bluetooth/hccontrol: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 07:59:10 -07:00
Gordon Bergling
40bb52c89b iwmbtfw(8): Fix a typo in a kernel message
- s/succesful/successful/

MFC after:	5 days
2023-01-11 12:22:18 +01:00
Maxim Konovalov
b620928d54 hccontrol.8: missed underscore fixed.
PR:	267343
2022-10-25 16:29:44 +00:00
Jens Schweikhardt
9356efa8c8 Indicate that X(7) cross refs are satisfied by ports/x11/xorg-docs. 2022-08-14 12:01:30 +02:00
Gordon Bergling
e24fd6d664 bluetooth(3): Fix a typo in a source code comment
- s/intrrupt/interrupt/

MFC after:	3 days
2022-07-31 12:13:13 +02:00
Warner Losh
66d6299848 bluetooth: remove hcseriald
Without ng_h4 gone, there's no need for hcseriald.

Sponsored by:		Netflix
2021-09-29 21:18:17 -06:00
Jung-uk Kim
4fa690be2c bluetooth: Fix build after ng_h4 removal
It was caused by 79a100e28e.
2021-09-29 23:10:56 -04:00
Vladimir Kondratyev
da93a73f83 iwmbtfw(8): Improve Intel 7260/7265 adaptors handling
- Allow firmware downloading for hw_variant #8;
- Enter manufacturer mode for setting of event mask;
- Handle multi-event response on HCI commands for 7260;
  This allows to remove kludge with skipping of 0xfc2f opcode.
- Disable patch and exit manufacturer mode on downloading failure;
- Use default firmware if correct firmware file is not found;

Reviewed by:	Philippe Michaud-Boudreault <pitwuu_AT_gmail_DOT_com>
MFC after:	1 week
Tested by:	arrowd
Differential revision:	https://reviews.freebsd.org/D30543
2021-05-31 22:32:08 +03:00
Philippe Michaud-Boudreault
fe70d7b26d iwmbtfw(8): Add support for Intel 7260/7265 bluetooth adapter firmwares
To use it comms/iwmbt-firmware port should be updated to 20210315 version.

Submitted by:	Philippe Michaud-Boudreault <pitwuu@gmail.com>
Tested by:	Helge Oldach <freebsd@oldach.net>
Reviewed by:	wulf
PR:		228787
MFC after:	2 weeks
2021-05-05 02:50:32 +03:00
Warner Losh
23e124c78b pccard: Remove bt3c(4) driver
pccard is being removed, so remove bt3c driver since it only has PC
Card attachment. Also remove bt3cfw(8) since it's the firmware for this
driver.

Relnotes: Yes
2021-01-07 20:40:41 -07:00
Gordon Bergling
60ee05db4b bluetooth: Fix a mandoc related issues
- new sentence, new line
- sections out of conventional order: Sh FILES
- unusual Xr order: bthost(1) after bthidd(8)
- no blank before trailing delimiter
- whitespace at end of input line
- sections out of conventional order: Sh EXIT STATUS

MFC after:	1 week
2020-12-19 13:36:59 +00:00
Takanori Watanabe
2105611236 Add le_rand command.
PR: 247808
Submitted by: Marc Veldman
2020-07-08 03:57:47 +00:00
Takanori Watanabe
2b2c6d6919 Add le_read_channel_map and le_read_remote_features command
PR: 247051
Submitted by:	  Marc Veldman marc at bumblingdork.com
2020-06-10 05:01:00 +00:00
Takanori Watanabe
f8143ed773 Fix connection event message string (n->\n)
PR: 246664
Submitted by: Marc Veldman (marc@bumblngdork.com)
Reported by:	Jose Luis Duran (jlduran@gmail.com)
2020-05-28 13:48:33 +00:00
Takanori Watanabe
3ac41cce63 Add le_connect command to connect to an LE device.
PR:246664
Submitted by:MarcVeldman
2020-05-26 15:46:18 +00:00
Takanori Watanabe
11fb4bdb4d Add LE Whitelist commands to hccontrol
PR: 214555
Submitted by Marc Veldman
2020-05-19 13:44:32 +00:00
Takanori Watanabe
9287f06d08 Add le_scan subcommand to hccontrol.
PR: 246141
Submitted by:	Marc Veldman
2020-05-11 15:32:32 +00:00
Takanori Watanabe
e961db83e5 Document le_enable subcommand 2020-05-08 01:19:29 +00:00
Takanori Watanabe
1f5d883dd7 Add le_read_buffer_size command and manpage.
It supports both v1 and v2 command.

PR:245964
Submitted by:	Marc Veldman <marc@bumblingdork.com>
2020-04-28 16:00:34 +00:00
Takanori Watanabe
eb2aebeafd Improve error handling
Check return values from hci_request()
Check rp.status
Print error messages with hci_status2str()

PR:	245769
Submitted by:	Marc Veldman
2020-04-28 13:28:58 +00:00
Takanori Watanabe
6ececd21a6 Resolve vendor id to string. 2020-04-27 09:13:22 +00:00
Takanori Watanabe
84662d68e5 Fix advertise packet parsing.
Differential Revision:	https://reviews.freebsd.org/D21779
2020-04-27 02:48:49 +00:00
Hans Petter Selasky
32f32669c3 Properly update AD field length in hccontrol(8).
While at it use strtol() instead of atoi() to support hexadecimal
numbers aswell as 10-base numbers.

Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245899
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-26 08:31:08 +00:00
Hans Petter Selasky
7b2f84db82 Put advertising data in correct place.
Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245848
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-25 00:57:48 +00:00
Hans Petter Selasky
f75d5ee735 Rename two commands to match the Bluetooth specification in hccontrol(8).
Fix some bad spelling while at it.

Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245868
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-24 14:53:55 +00:00
Hans Petter Selasky
c3f60abc30 Add support for LE advertising to hccontrol(8).
Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245848
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-24 08:07:59 +00:00
Hans Petter Selasky
1719371ae5 Add support for Read_Local_Supported_Commands command to hccontrol(8).
Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245811
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-22 14:38:39 +00:00
Hans Petter Selasky
872d83be7b Update string tables in hccontrol(8).
Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245796
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-21 17:51:54 +00:00
Hans Petter Selasky
21eefd310a Substitute le_read_supported_status with le_read_supported_states.
Refer to bluetooth core v5.2 specifications Vol4. Part E. 7.8.27.

PR:		245763
Submitted by:	Marc Veldman <marc@bumblingdork.com>
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-20 13:44:14 +00:00
Hans Petter Selasky
6cf6c1510d Fix cut and paste off-by-one error in hccontrol(8).
Make sure strncpy() doesn't write beyond its given buffer.

PR:		245739
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-19 14:25:56 +00:00
Hans Petter Selasky
ea01149104 Improve printing of le features in hccontrol(8).
Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245739
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-19 14:22:21 +00:00
Hans Petter Selasky
3bc36313e4 Bring HCI error messages up-to-date.
See Bluetooth v5.6 core specification Vol.1 Part F: Controller error codes.

Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245737
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-19 10:24:15 +00:00
Hans Petter Selasky
6f80a2c88e Add missing feature descriptions to hci_features2str().
The list of possible features in hccontrol/features2str() is incomplete.
Refer to "Bluetooth Core Specification 5.2 Vol. 2 Part C. 3.3 Feature Mask Definition".

Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245354
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-18 08:29:16 +00:00
Ed Maste
b4b880cb6d correct 'disble' typo in hccontrol
PR:		245125
Submitted by:	Marc Veldman
MFC after:	1 week
2020-03-30 17:38:13 +00:00
Vladimir Kondratyev
6565f65ce1 iwmbtfw(8): Fix compilation on platforms using gcc.
X-MFC with:	r351197
2019-08-18 23:10:07 +00:00
Vladimir Kondratyev
7f32f0e227 iwmbtfw: Firmware loader for Intel Wireless 8260 based Bluetooth USB devices
Currently supported models are: 8260, 8265, 9560, 9260 and 22161.
Firmware files can be installed with comms/iwmbt-firmware port.

PR:			237083
Reviewed by:		hps, emax
X-MFC with:		r351196
Differential Revision:	https://reviews.freebsd.org/D21071
2019-08-18 22:20:28 +00:00
Emmanuel Vadot
9553ea80a8 pkgbase: Add a FreeBSD-bluetooth package
Move the bluetooth related files from FreeBSD-runtime to a new package named
FreeBSD-bluetooth
The FreeBSD runtime is only intended to have everything for a working
FreeBSD installation and bluetooth isn't needed for that.

Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D20959
2019-07-19 15:10:03 +00:00
Hans Petter Selasky
2d3a84f5b0 Improve Bluetooth device discovery support for Android and Microsoft devices.
Tested using the virtual_bt_speaker(8) tool from the virtual_oss(8)
project at github.com.

PR:			210089
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-02-08 13:10:45 +00:00
Hans Petter Selasky
21be80ae80 Add support for Audio Sink and Audio Source profiles to sdpd(8).
This allows user-space programs like virtual_oss(8) to act
as a Bluetooth speaker device.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-01-30 09:44:54 +00:00
Lars Engels
e1bd727904 This new version of bluetooth-config.sh tries to follow the style of other
shell scripts in base, removes the bogus "copyleft", adds the BeerWare license
header and uses rc.subr(8) new 'enable' keyword for adding entries in
rc.conf(5).

Submitted by:	erdgeist <erdgeist@erdgeist.org>
Approved by:	bapt
MFC after:	2 weeks
2019-01-14 08:23:47 +00:00
Baptiste Daroussin
baf46d717b Fix duplication.
The patch adding the manpage was probably applied twice, so it resulted
in duplication of the manpage
2019-01-11 16:18:23 +00:00
Lars Engels
0fc0faf846 Add bluetooth-config script to simplify setting up bluetooth connections to
devices like mice, keyboards, bt-audio, ...

This script currently allows scanning for nearby devices, adds one to
/etc/bluetooth/hosts, adds an entry to hcsecd's conf and if it is a HID, add an
entry to bthidd's configs, as well.

Submitted by:	erdgeist <erdgeist@erdgeist.org>
Approved by:	bapt
MFC after:	2 weeks
Differential Revision:	D3778
Reviewers:	bapt, emax
2019-01-11 15:52:09 +00:00
Brad Davis
00d5b07760 Fix the install location of hcsecd.conf
Submitted by:	vangyzen
Approved by:	re (marius)
2018-08-26 02:09:20 +00:00
Brad Davis
c8e7055577 Move all bluetooth related config files out of etc
This helps with pkgbase by switching to CONFS so they are properly tagged as
config files.

Approved by:	will (mentor)
Differential Revision:	https://reviews.freebsd.org/D16833
2018-08-21 19:28:53 +00:00
Vladimir Kondratyev
44af5666d9 bthidd(8): Add evdev protocol support for bluetooth keyboards and mouses
User-visible changes:

"-u" is added to to list of command line options supported by bthidd.
Use it to enable evdev support. uinput and evdev modules should be
kld-loaded or compiled into the kernel in that case.

bthidd_evdev_support rc.conf variable is added to control enabling of
evdev support in bthidd startup script. Possible values are: "YES", "NO",
"AUTO"(default). Setting bthidd_evdev_support to "AUTO" inserts "-u" option
if kernel is compiled with EVDEV_SUPPORT option enabled.

Support for consumer HID usage page keyboard events is implemented. Most of
them are available only through evdev protocol.

kern.evdev.rcpt_mask sysctl is checked, so "sysctl kern.evdev.rcpt_mask=12"
should be executed if EVDEV_SUPPORT is compiled into kernel.

It is recommended to regenerate bthidd.conf entries with bthidcontrol(8)
"Query" command to set user-friendly names of bluetooth devices.

Reviewed by:	emax, gonzo, wblock (docs), bcr (docs, early version)
Differential Revision:	https://reviews.freebsd.org/D13456
2018-04-30 12:16:54 +00:00
Vladimir Kondratyev
e650806966 bthidd(8): Add internal support for user-friendly name of remote devices.
Extend bthidd.conf format to store name of remote Bluetooth HID devices and
implement querying of this information with bthidcontrol(8) "Query" command.

Reviewed by:		emax
Differential Revision:	https://reviews.freebsd.org/D13456
2018-04-30 10:49:29 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00