Permalink
Browse files

Add license notices, a COPYING file and a README file.

If the LICENSE note isn't clear, the code to date isn't complicated or
novel enough for me to care much about credit for -- these changes are
just to explicitly grant permissions for others to take and use the code.
  • Loading branch information...
1 parent fd42e4f commit 562331fe0e6e34ffb80e7a9a41442c02db1f5c61 @entrope committed Jan 21, 2010
Showing with 121 additions and 0 deletions.
  1. +31 −0 COPYING
  2. +21 −0 README
  3. +23 −0 hid-parse.c
  4. +23 −0 mtalk.c
  5. +23 −0 usb-bt-dump.c
View
31 COPYING
@@ -0,0 +1,31 @@
+Copyright 2010 Michael Poole.
+
+Formal license statement:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+Further permissions:
+
+If you use this code as the basis for writing your own parsers or
+drivers for the mouse, great! If it is a significant help, I would
+appreciate if you mention me or this code as a source, but I don't
+require that. I also don't imagine I would ever care about
+distributors including a copyright or permission notice when
+distributing compiled code -- the code is pretty simple given the
+knowledge of the message formats.
View
21 README
@@ -0,0 +1,21 @@
+This code consists of three standalone programs:
+
+hid-parse reads one or more input files (specified on the command
+line) that contain hexadecimal-formatted HID report descriptors, and
+prints out human-readable text forms of the descriptors. It should be
+considered fairly complete and stable.
+
+mtalk talks to an Apple Magic Mouse (using L2CAP with the HID control
+and interrupt Protocol and Service Multiplexors [PSMs]) and prints
+human-readable forms of the messages that it receives. Typically the
+only command-line parameters you would pass are -r <BluetoothAddr>.
+It should be considered 70% complete.
+
+usb-bt-dump reads a text dump in the format generated by Linux's
+usbmon (e.g. /sys/kernel/debug/usb/usbmon/0u) to parse Bluetooth
+messages at various layers (HCI, L2CAP, etc) and print annotations
+with the parsed form. It is woefully incomplete and buggy and will
+probably not be maintained.
+
+I wrote usb-bt-dump first, followed by mtalk, followed by hid-parse.
+mtalk is the only one that I expect to modify going forward.
View
@@ -1,3 +1,26 @@
+/* Copyright 2010 Michael Poole.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
#include <ctype.h> /* isspace() */
#include <errno.h> /* errno, EINPROGRESS */
#include <inttypes.h> /* sized integer types *and formatting* */
View
23 mtalk.c
@@ -1,3 +1,26 @@
+/* Copyright 2010 Michael Poole.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
#include <byteswap.h> /* bswap_16() */
#include <errno.h> /* errno */
#include <locale.h> /* setlocale() */
View
@@ -1,3 +1,26 @@
+/* Copyright 2010 Michael Poole.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
#define _LARGEFILE64_SOURCE 1
#include <ctype.h> /* isspace() */

0 comments on commit 562331f

Please sign in to comment.