summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bluetooth/bthidd
Commit message (Collapse)AuthorAgeFilesLines
* MFC r291145:hselasky2015-11-241-2/+2
| | | | | | Fix scancodes for Kana and Eisu keys. PR: 204709
* MFC r281146.rakuco2015-04-151-6/+0
| | | | | | | | | | bthidd: Remove unused macros from hid.c. ASIZE() was never used, and min() stopped being used in r207812. Differential Revision: https://reviews.freebsd.org/D2230 Reviewed by: emax Approved by: emax
* MFC r281116.rakuco2015-04-151-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bthidd: Consider usage ranges when dealing with array inputs. So far, we were always using HID_USAGE() to determine the Usage ID of a certain HID report input item. This does not work as intended if a field is an array and the allowed usages are specified with a usage range, as HID_USAGE() will return 0. We need to use the field value as an index in the usage range list in this case instead. This makes the volume keys in a Microsoft Bluetooth Mobile Keyboard 5000 be properly recognized. The relevant part of the HID report looks like this: 0xA1, 0x01, // Collection (Application) 0x85, 0x07, // Report ID (7) 0x05, 0x0C, // Usage Page (Consumer) 0x19, 0x00, // Usage Minimum (Unassigned) 0x2A, 0xFF, 0x03, // Usage Maximum (0x03FF) 0x95, 0x01, // Report Count (1) 0x75, 0x10, // Report Size (16) 0x15, 0x00, // Logical Minimum (0) 0x27, 0xFF, 0x03, 0x00, 0x00, // Logical Maximum (1023) 0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred // State,No Null Position) When a key such as "volume down" is pressed, the following data is transferred through Interrupt In: 0x07 0xEA 0x00 Differential Revision: https://reviews.freebsd.org/D2229
* MFC r275709emax2015-01-071-2/+2
| | | | | | | handle "Kana" and "Eisu" keys on Apple Wireless Keyboard (JIS) PR: 187470 Submitted by: naito.yuichiro
* MFC r258779,r258780,r258787,r258822:eadler2014-02-041-1/+1
| | | | | | | | | | | | | Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result. Similar to the (1 << 31) case it is not defined to do (2 << 30). This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD.
* Work around build breakages with GCC 4.2.jkim2013-05-231-0/+2
| | | | Reported by: tinderbox
* Add the Clang specific -Wmissing-variable-declarations to WARNS=6.ed2013-04-191-0/+2
| | | | | | | | | | | | | This compiler flag enforces that that people either mark variables static or use an external declarations for the variable, similar to how -Wmissing-prototypes works for functions. Due to the fact that Yacc/Lex generate code that cannot trivially be changed to not warn because of this (lots of yy* variables), add a NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this specific compiler warning. Announced on: toolchain@
* Fix world after byacc import:bapt2012-05-221-1/+1
| | | | | | | | - old yacc(1) use to magicially append stdlib.h, while new one don't - new yacc(1) do declare yyparse by itself, fix redundant declaration of 'yyparse' Approved by: des (mentor)
* Encode horizontal scroll events (AC Pan) as button presses (bit 5 and 6)emax2011-05-041-0/+11
| | | | | Submitted by: David Demelier demelier dot david at gmail dot com MFC after: 1 week
* Don't generate input() since it's not used.brucec2010-11-221-1/+1
|
* Make sure to only pickup hid_input items when parsing input reports.emax2010-09-081-1/+2
| | | | | | | | As it turns out, libusbhid(3) also picks up hic_collection items even though we explicitly requested hid_input items only. Tested by: Buganini < buganini at gmail dot com > MFC after: 1 week
* mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to theuqs2010-05-131-17/+17
| | | | | | | | | | | bottom of the manpages and order them consistently. GNU groff doesn't care about the ordering, and doesn't even mention CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put them. Found by: mdocml lint run Reviewed by: ru
* Catch up with libusbhid merge (rev 205728).kaiw2010-05-091-11/+5
| | | | | | | | | | | | | | hid_get_data() now expects that the hid data passed in always contains the report ID byte. Thus we should not skip the the report ID byte in hid_interrupt(). Also, if HUP_KEYBOARD usage is an array, do not try to modify the 'data' pointer, instead, increase the hid_item_t field 'pos' by 'report_size' before calling hid_get_data() during each iteration. PR: usb/146367 Reported and tested by: Alex Deiter Pointy hat to: kaiw Reviewed by: emax
* Remove redundant WARNS?=6 overrides and inherit the WARNS setting fromuqs2010-03-021-1/+0
| | | | | | | | the toplevel directory. This does not change any WARNS level and survives a make universe. Approved by: ed (co-mentor)
* Fixed "make checkdpadd" (missing library dependencies).ru2007-10-011-1/+1
| | | | Approved by: re (kensmith)
* Do not mark Bluetooth HID device as a "potential keyboard" if its descriptoremax2006-11-271-1/+1
| | | | | | | | | has items with CONSUMER page. For now only check for items with KEYBOARD page. This should prevent bthidd(8) from allocating vkbd(4) keyboard for Microsoft Bluetooth Explorer mouse. Reported by: Eric Anderson MFC after: 3 days
* Properly htole16() PSM in sockaddr_l2capemax2006-11-021-3/+3
| | | | MFC after: 3 days
* - Grammar and typo fixesmarkus2006-10-101-12/+11
| | | | | | | | - Rewording of some sentences Reviewed by: brueffer Approved by: emax (mentor) MFC after: 3 days
* Fix a typo introduced in the last commit: WWW Refresh is 0x227, not 0227markus2006-10-091-1/+1
| | | | | Approved by: emax (mentor) MFC after: 1 day
* Pacify new GCC4 warnings.emax2006-09-211-1/+1
| | | | | Submitted by: kan MFC after: 1 week
* Use socklen_t instead of int32_t where appropriate to pacify new GCC4emax2006-09-212-2/+4
| | | | | | | warnings. Submitted by: kan MFC after: 1 week
* Temporarily put ugly workaround in place to make sparc64 build happy.emax2006-09-081-12/+12
| | | | panther is down at the moment, so better fix will follow later.
* Update bthidd(8) code and hook it up to the build.emax2006-09-0713-462/+640
| | | | | | | | | | bthidd(8) now was integrated with vkbd(4) and supports multiple keyboards via vkbd(4)/kbdmux(4). The code was tested with Apple Bluetooth keyboard and SE k700i cell phone (remote control feature). MFC after: 1 month
* Properly map mouse buttonsemax2006-03-211-1/+4
| | | | | | PR: bin/94577 Submitted by: Krzysztof Jedruczyk < beaker at hot dot pl > MFC after: 3 days
* Properly convert L2CAP PSM values in sockaddr_l2cap to LE16 byte order.emax2006-03-162-3/+3
| | | | | Noticed by: Iain Hibbert < plunky at rya-online dot net > MFC after: 3 days
* Style: NO_MAN doesn't need any value.ru2006-03-151-1/+1
|
* Teach bthidd(8) to reload its config when SIGHUP is received.emax2006-03-141-3/+27
| | | | | Submitted by: Iain Hibbert < plunky at rya-online dot net > MFC after: 3 days
* Fix typoemax2006-03-131-1/+1
| | | | | Submitted by: Iain Hibbert < plunky at rya-online dot net > MFC after: 3 days
* Fix scancode translation tablemarkus2006-02-201-2/+3
| | | | | Approved by: emax MFC after: 3 days
* Fix problem with session termination. bthidd(8) maintains two L2CAPemax2005-05-182-3/+4
| | | | | | | | | | | | | | | | connections to Bluetooth HID device. As soon as Bluetooth HID device is powered off (or goes out of RF range) the stack will terminate both connections. File descriptors for both connections will become active on next select(2) call. Because bthidd(8) processes file descriptors in order, it will detect descriptor for one of the closed connections first and kill the session. However, there is still a second (active) descriptor that used to point to the same session. bthidd(8) used to assert() if it cant find session by file descriptor, which was wrong. While I'm here fix a couple of typos in parser.y Reported by: Eric Anderson anderson AT centtech DOT com MFC after: 3 days
* Fix typo %d -> %xemax2005-01-121-1/+1
| | | | | | | | | That should fix the problem with invalid PSM returned from bthidcontrol. Pointy hat goes to me. PR: misc/76107 Submitted by: Hiroyuki Aizu < aizu at navi dot org > MFC after: 1 day
* Start the dreaded NOFOO -> NO_FOO conversion.ru2004-12-211-1/+1
| | | | OK'ed by: core
* Check in updated bthidd(8). This is still work in progress.emax2004-11-189-48/+874
|
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* - One can use both BD_ADDR or name to specify address of the Bluetooth device.emax2004-08-051-1/+1
| | | | | | | | Update man pages to document this fact. - Update usage messages - Change u_intXXX to uintXXX
* Start committing Bluetooth HID (Human Interface Device) support.emax2004-04-1011-0/+2002
Note: bthidd(8) is still not complete. Need to commit kernel support (a-la Linux /dev/input) to feed HID events into kernel. Also need to write bthidd(8) and bthidd.conf(5) man pages.
OpenPOWER on IntegriCloud