aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bluetooth
Commit message (Collapse)AuthorAgeFilesLines
* iwmbtfw(8): Fix compilation on platforms using gcc.Vladimir Kondratyev2019-08-181-1/+1
| | | | | | | X-MFC with: r351197 Notes: svn path=/head/; revision=351199
* iwmbtfw: Firmware loader for Intel Wireless 8260 based Bluetooth USB devicesVladimir Kondratyev2019-08-1810-0/+1330
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=351197
* pkgbase: Add a FreeBSD-bluetooth packageEmmanuel Vadot2019-07-1915-0/+15
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=350132
* Improve Bluetooth device discovery support for Android and Microsoft devices.Hans Petter Selasky2019-02-081-1/+127
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=343905
* Add support for Audio Sink and Audio Source profiles to sdpd(8).Hans Petter Selasky2019-01-304-1/+382
| | | | | | | | | | | This allows user-space programs like virtual_oss(8) to act as a Bluetooth speaker device. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=343572
* This new version of bluetooth-config.sh tries to follow the style of otherLars Engels2019-01-141-192/+228
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=343020
* Fix duplication.Baptiste Daroussin2019-01-111-111/+0
| | | | | | | | The patch adding the manpage was probably applied twice, so it resulted in duplication of the manpage Notes: svn path=/head/; revision=342947
* Add `bluetooth-config` script to simplify setting up bluetooth connections toLars Engels2019-01-114-0/+504
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=342945
* Fix the install location of hcsecd.confBrad Davis2018-08-261-0/+1
| | | | | | | | Submitted by: vangyzen Approved by: re (marius) Notes: svn path=/head/; revision=338320
* Move all bluetooth related config files out of etcBrad Davis2018-08-214-14/+121
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=338155
* bthidd(8): Add evdev protocol support for bluetooth keyboards and mousesVladimir Kondratyev2018-04-3013-45/+874
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=333113
* bthidd(8): Add internal support for user-friendly name of remote devices.Vladimir Kondratyev2018-04-306-8/+58
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=333112
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2782-52/+216
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-3114-14/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* bthidd(8): Generate button release event after virtual T-axis button pressVladimir Kondratyev2017-10-301-7/+17
| | | | | | | | | | | | | Apply PR/213957 (r308165, Make sure the virtual T-axis buttons generate button release event(s) for continuous tilting) to bluetooth mouse support. Reviewed by: emax, gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12672 Notes: svn path=/head/; revision=325165
* bthidd: Fix leds on multireport keyboards broken after r297217Vladimir Kondratyev2017-10-191-0/+5
| | | | | | | | | | Reviewed by: emax, gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12214 Notes: svn path=/head/; revision=324770
* bthidd(8): Add support for Apple's magic mouseVladimir Kondratyev2017-08-124-0/+138
| | | | | | | | | | | | | | Note: Mouse's bthidd.conf record should contain vendor and device IDs to make proper device detection. If it does not contain IDs, regenerate record with "Query" command of recent bthidcontrol(8). Submitted by: Dirk Engling <erdgeist@erdgeist.org> Reviewed by: emax Approved by: bapt (mentor), gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D3702 Notes: svn path=/head/; revision=322440
* bthidd(8): Add support for vendor_id, product_id and version.Vladimir Kondratyev2017-08-125-14/+123
| | | | | | | | | | | | | | | | Extend bthidd.conf format to store vendor and product IDs of remote Bluetooth HID devices to make possible implementation of device specific quirks inside bthidd(8). Add support for querying of this information from device's SDP records with bthidcontrol(8) "Query" command. Submitted by: Dirk Engling <erdgeist@erdgeist.org> Reviewed by: emax Approved by: bapt (mentor), gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D3702 Notes: svn path=/head/; revision=322439
* rfcomm_pppd.8: fix a typo (SPD -> SDP).Andriy Voskoboinyk2017-08-061-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=322124
* When the input parameter node is NULL, memory is allocated to it.Stephen J. Kiernan2017-06-061-1/+3
| | | | | | | | | | | | | | To later free the memory, introduce a new variable lnode to track when this happens. Submitted by: Thomas Rix <trix@juniper.net> Reviewed by: emax Approved by: sjg (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9878 Notes: svn path=/head/; revision=319639
* Make cached Bluetooth LE host advertise information visible from userland.Takanori Watanabe2017-04-271-1/+56
| | | | | | | Differential Revision: https://reviews.freebsd.org/D10362 Notes: svn path=/head/; revision=317506
* usr.sbin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-043-5/+4
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314659
* Avoid undefined behavior when calling va_start() in bnep_send_control(),Dimitry Andric2016-08-292-3/+3
| | | | | | | | | by making the 'type' parameter a plain unsigned. MFC after: 3 days Notes: svn path=/head/; revision=305023
* [ath3k] add a replacement ath3k firmware loading tool.Adrian Chadd2016-06-079-307/+1052
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is influenced by the ath3k driver from linux (circa 2013, this is how long I've been sitting on this.) It handles loading in firmware using the newer model, where it assembles the right set of firmware blobs and board configuration based on the device list and querying the device. The older utility could only load in a single image - which sometimes was ath3k-1.fw and sometimes was ath3k-2.fw. However, the ath3k maintainers didn't want to keep adding in binaries that were just derivatives with a separate board config, so they deleted ath3k-2.fw from the Linux firmware repository and instead, well, did this. Now, this has been tested against AR3011 and AR3012 NICs from the AR9285+BT combo up through to the QCA9565+BT combo. It doesn't yet work with the QCAFN222 NIC as that is some newer chip. The firmware can be grabbed from https://github.com/erikarn/ath3kfw/ in the share/firmware/ath3k directory. I'll update this utility over time to support the newer firmware drops (newer than mid-2013) which should pull in the QCNFA222 and subsequent chips. Tested: * AR9285 + BT * AR9287 + BT * AR9485 + BT * AR9462 + BT * QCA9565 + BT Notes: svn path=/head/; revision=301537
* For pointers use NULL instead of 0.Marcelo Araujo2016-06-061-1/+1
| | | | Notes: svn path=/head/; revision=301482
* Improve performance and functionality of the bitstring(3) apiAlan Somers2016-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two new functions are provided, bit_ffs_at() and bit_ffc_at(), which allow for efficient searching of set or cleared bits starting from any bit offset within the bit string. Performance is improved by operating on longs instead of bytes and using ffsl() for searches within a long. ffsl() is a compiler builtin in both clang and gcc for most architectures, converting what was a brute force while loop search into a couple of instructions. All of the bitstring(3) API continues to be contained in the header file. Some of the functions are large enough that perhaps they should be uninlined and moved to a library, but that is beyond the scope of this commit. sys/sys/bitstring.h: Convert the majority of the existing bit string implementation from macros to inline functions. Properly protect the implementation from inadvertant macro expansion when included in a user's program by prefixing all private macros/functions and local variables with '_'. Add bit_ffs_at() and bit_ffc_at(). Implement bit_ffs() and bit_ffc() in terms of their "at" counterparts. Provide a kernel implementation of bit_alloc(), making the full API usable in the kernel. Improve code documenation. share/man/man3/bitstring.3: Add pre-exisiting API bit_ffc() to the synopsis. Document new APIs. Document the initialization state of the bit strings allocated/declared by bit_alloc() and bit_decl(). Correct documentation for bitstr_size(). The original code comments indicate the size is in bytes, not "elements of bitstr_t". The new implementation follows this lead. Only hastd assumed "elements" rather than bytes and it has been corrected. etc/mtree/BSD.tests.dist: tests/sys/Makefile: tests/sys/sys/Makefile: tests/sys/sys/bitstring.c: Add tests for all existing and new functionality. include/bitstring.h Include all headers needed by sys/bitstring.h lib/libbluetooth/bluetooth.h: usr.sbin/bluetooth/hccontrol/le.c: Include bitstring.h instead of sys/bitstring.h. sbin/hastd/activemap.c: Correct usage of bitstr_size(). sys/dev/xen/blkback/blkback.c Use new bit_alloc. sys/kern/subr_unit.c: Remove hard-coded assumption that sizeof(bitstr_t) is 1. Get rid of unrb.busy, which caches the number of bits set in unrb.map. When INVARIANTS are disabled, nothing needs to know that information. callapse_unr can be adapted to use bit_ffs and bit_ffc instead. Eliminating unrb.busy saves memory, simplifies the code, and provides a slight speedup when INVARIANTS are disabled. sys/net/flowtable.c: Use the new kernel implementation of bit-alloc, instead of hacking the old libc-dependent macro. sys/sys/param.h Update __FreeBSD_version to indicate availability of new API Submitted by: gibbs, asomers Reviewed by: gibbs, ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6004 Notes: svn path=/head/; revision=299090
* bluetooth: minor spelling fixes.Pedro F. Giffuni2016-05-012-2/+2
| | | | | | | | | User-visible strings. MFC after: 2 weeks Notes: svn path=/head/; revision=298883
* fix incorrect usage of hid_set_data() which causes crashMaksim Yevmenkin2016-03-231-17/+13
| | | | | | | | | | | | in bthidd(8) on amd64 WITH_SSP builds Submitted by: rakuco Reviewed by: rakuco Tested by: rakuco MFC after: 1 week Notes: svn path=/head/; revision=297217
* DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-243-18/+0
| | | | | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
* Fix scancodes for Kana and Eisu keys.Hans Petter Selasky2015-11-211-2/+2
| | | | | | | | | PR: 204709 Submitted by: naito.yuichiro@gmail.com MFC after: 3 days Notes: svn path=/head/; revision=291145
* check boundaries while parsing SDP responsesMaksim Yevmenkin2015-10-201-9/+43
| | | | | | | | | Reported by: hps Reviewed by: hps MFC after: 1 week Notes: svn path=/head/; revision=289637
* fix compare argument for address type.Takanori Watanabe2015-09-091-1/+1
| | | | | | | Submitted by: issei10193 (via Twitter) Notes: svn path=/head/; revision=287597
* Add META_MODE support.Simon J. Gerraty2015-06-1314-0/+298
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-0814-28/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-2779-54/+575
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-1914-14/+14
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-1614-14/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-1014-0/+28
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge headSimon J. Gerraty2014-04-282-2/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | Updated dependenciesSimon J. Gerraty2013-10-131-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256419
| * | | Merge from headSimon J. Gerraty2013-09-053-1/+5
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ sync from headSimon J. Gerraty2013-04-122-5/+15
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | | Updated dependenciesSimon J. Gerraty2013-03-1114-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | | Updated dependenciesSimon J. Gerraty2013-02-1614-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | Sync with HEAD.David E. O'Brien2013-02-082-2/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ \ \ \ \ Sync from headSimon J. Gerraty2012-11-047-9/+53
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-2214-0/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | Remove stray DEBUG_FLAGS=-g that snuck in with r137868Warner Losh2015-05-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=283246
* | | | | | | | ath3kfw, bcmfw, bthidcontrol, bthidd all require usb(4); build themEnji Cooper2015-04-271-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conditionally if MK_USB != no MFC after: 1 week Notes: svn path=/head/; revision=282054
* | | | | | | | To ensure j formatting string valid, cast uint64_t values to uintmax_t.Takanori Watanabe2015-04-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=281697