diff -Nru razercfg-0.39+ds/debian/80-razer.rules razercfg-0.39/debian/80-razer.rules --- razercfg-0.39+ds/debian/80-razer.rules 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/debian/80-razer.rules 2016-07-11 12:40:55.000000000 +0000 @@ -0,0 +1,7 @@ +# UDEV rules for razer devices +# +# We just send a rescan command to razerd. +# It will pick up new devices and forward information to the applications. + +ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1532", RUN+="/usr/bin/razercfg -B -S1 -s" +ACTION=="remove", SUBSYSTEM=="usb", RUN+="/usr/bin/razercfg -B -S1 -s" diff -Nru razercfg-0.39+ds/debian/changelog razercfg-0.39/debian/changelog --- razercfg-0.39+ds/debian/changelog 2017-10-25 20:29:08.000000000 +0000 +++ razercfg-0.39/debian/changelog 2018-07-16 10:35:38.000000000 +0000 @@ -1,5 +1,113 @@ -razercfg (0.39+ds-1) unstable; urgency=medium +razercfg (0.39-1~webupd8~bionic1) bionic; urgency=medium - * Initial packaging. (Closes: #587987) + * Upload for Bionic - -- Luca Boccassi Wed, 25 Oct 2017 21:29:08 +0100 + -- Alin Andrei Mon, 16 Jul 2018 12:58:42 +0200 + +razercfg (0.39-1~webupd8~zesty1) zesty; urgency=medium + + * New upstream release + * Refreshed ouroboros-support.patch + * Continued: + - Install 80-razer.rules manually on Xenial, Yakkety and + Zesty (fails for some reason) + - Don't use systemd on Trusty (rules, control, install) + + -- Alin Andrei Wed, 29 Mar 2017 13:04:29 +0200 + +razercfg (0.38-1~webupd8~zesty0) zesty; urgency=medium + + * Upload for Zesty + + -- Alin Andrei Mon, 20 Mar 2017 16:10:44 +0200 + +razercfg (0.38-1~webupd8~yakkety0) yakkety; urgency=medium + + * New upstream release + * Refreshed desktop-file-icon.patch + * Continued: + - Install 80-razer.rules manually on Xenial AND Yakkety (fails for + some reason) + - Don't use systemd on Trusty (rules, control, install) + + -- Alin Andrei Tue, 01 Nov 2016 13:22:44 +0100 + +razercfg (0.37-1~webupd8~yakkety2) yakkety; urgency=medium + + * Upload for Yakkety + * Continued: + - Install 80-razer.rules manually on Xenial AND Yakkety (fails for + some reason) + - Don't use systemd on Trusty (rules, control, install) + + -- Alin Andrei Mon, 17 Oct 2016 13:43:19 +0100 + +razercfg (0.37-1~webupd8~xenial1) xenial; urgency=medium + + * ouroboros-support.patch: try to detect the correct version when + the mouse is in wireless mode, based on: + https://github.com/mbuesch/razer/issues/4#issuecomment-53205129 + * Continued: + - Install 80-razer.rules manually on Xenial (fails for + some reason) + - Don't use systemd on Trusty (rules, control, install) + + -- Alin Andrei Thu, 18 Aug 2016 16:22:32 +0200 + +razercfg (0.37-1~webupd8~trusty0) trusty; urgency=medium + + * New upstream release + * Continued: + - Install 80-razer.rules manually on Xenial (fails for + some reason) + - Don't use systemd on Trusty (rules, control, install) + + -- Alin Andrei Wed, 10 Aug 2016 13:38:20 +0200 + +razercfg (0.36-1~webupd8~xenial0) xenial; urgency=medium + + * Refreshed ouroboros-support.patch + * Continued: + - Install 80-razer.rules manually on Xenial (fails for + some reason) + - Don't use systemd on Trusty (rules, control, install) + + -- Alin Andrei Thu, 04 Aug 2016 18:03:21 +0200 + +razercfg (0.35-1~webupd8~trusty2) trusty; urgency=medium + + * Icons are not installed by CMakeLists.txt, so install them + normally in qrazercfg.install + * Update desktop-file-icon.patch icon name to "razercfg" + * Continued: + - Install 80-razer.rules manually on Xenial (fails for + some reason) + - Don't use systemd on Trusty (rules, control, install) + + -- Alin Andrei Mon, 18 Jul 2016 12:32:16 +0200 + +razercfg (0.34-2~webupd8~xenial3) xenial; urgency=medium + + * New upstream release + * Added standards-version (original package misses this) + * Use debian/format quilt instead of native + * The package is now split between razercfg, qrazercfg and the + applet (so added a "replaces" for this) + * Install 80-razer.rules manually on Xenial (fails for + some reason) + * Don't use systemd on Trusty (rules, control, install) + * Add desktop-file-icon.patch + + -- Alin Andrei Mon, 11 Jul 2016 12:33:41 +0200 + +razercfg (0.33-1~webupd8~trusty0) trusty; urgency=medium + + * Initial PPA upload + + -- Alin Andrei Wed, 01 Jun 2016 13:01:29 +0200 + +razercfg (0.33) UNRELEASED; urgency=medium + + * 0.33 + + -- Michael Büsch Tue, 15 Jul 2014 11:25:47 +0200 diff -Nru razercfg-0.39+ds/debian/compat razercfg-0.39/debian/compat --- razercfg-0.39+ds/debian/compat 2017-10-25 20:26:13.000000000 +0000 +++ razercfg-0.39/debian/compat 2017-03-28 17:05:28.000000000 +0000 @@ -1 +1 @@ -10 +9 diff -Nru razercfg-0.39+ds/debian/control razercfg-0.39/debian/control --- razercfg-0.39+ds/debian/control 2017-10-25 20:26:13.000000000 +0000 +++ razercfg-0.39/debian/control 2017-03-29 10:17:14.000000000 +0000 @@ -1,8 +1,8 @@ Source: razercfg -Maintainer: Luca Boccassi +Maintainer: Michael Büsch Section: misc Priority: optional -Build-Depends: debhelper (>= 10), +Build-Depends: debhelper (>= 9), cmake, dh-systemd, libusb-1.0-0-dev, @@ -12,8 +12,8 @@ systemd, udev, Standards-Version: 3.9.8 -Vcs-Git: https://github.com/bluca/razercfg-debian -Vcs-Browser: https://github.com/bluca/razercfg-debian +Vcs-Git: https://git.bues.ch/git/razer.git +Vcs-Browser: https://git.bues.ch/git/razer.git Homepage: https://bues.ch/h/razercfg Package: razercfg @@ -25,14 +25,14 @@ devices on Linux systems. Package: qrazercfg -Architecture: all +Architecture: any Depends: ${python3:Depends}, ${misc:Depends}, python3-pyside, razercfg Description: Graphical Razer device configuration tool Python- and QT-powered configuration utility for the configuration of Razer devices on Linux systems. Package: qrazercfg-applet -Architecture: all +Architecture: any Depends: ${python3:Depends}, ${misc:Depends}, python3-pyside, razercfg, qrazercfg Description: Graphical Razer device configuration tool - applet Python- and QT-powered configuration utility for the configuration of Razer diff -Nru razercfg-0.39+ds/debian/copyright razercfg-0.39/debian/copyright --- razercfg-0.39+ds/debian/copyright 2017-10-25 20:29:08.000000000 +0000 +++ razercfg-0.39/debian/copyright 2017-03-28 17:05:28.000000000 +0000 @@ -1,30 +1,9 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: razercfg Source: https://bues.ch/h/razercfg -Files-Excluded: debian -Comment: repack to remove upstream's debian/ directory Files: * -Copyright: 2008-2017 Michael Buesch - 2012 Guillermo Ramos <0xwille@gmail.com> - 2013 Tibor Peluch - 2014 Benoit Pierre - 2014 Christian Inci - 2014 perfect7gentleman - 2014 polyzen - 2014 Ryan Mulcahy - 2014 Tony Crisci - 2014 Torstein Husebø - 2015 Corentin Jabot - 2015 Greg Larmore - 2015 Konrad Zemek - 2016 Jan Stümmel - 2016 Luca Weiss - 2016 Markus Törnqvist - 2016 Vicc - 2017 Barthelemy Delemotte - 2017 Marcus Weinhold - 2017 Luca Boccassi +Copyright: 2008-2016 Michael Buesch License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru razercfg-0.39+ds/debian/patches/desktop-file-icon.patch razercfg-0.39/debian/patches/desktop-file-icon.patch --- razercfg-0.39+ds/debian/patches/desktop-file-icon.patch 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/debian/patches/desktop-file-icon.patch 2016-11-01 11:35:26.000000000 +0000 @@ -0,0 +1,8 @@ +--- a/razercfg.desktop.template ++++ b/razercfg.desktop.template +@@ -3,4 +3,4 @@ + Categories=Application;System; + Name=Razer Configuration + Exec=@CMAKE_INSTALL_PREFIX@/bin/qrazercfg +-Icon=@CMAKE_INSTALL_PREFIX@/share/icons/hicolor/scalable/apps/razercfg.svg ++Icon=razercfg diff -Nru razercfg-0.39+ds/debian/patches/ouroboros-support.patch razercfg-0.39/debian/patches/ouroboros-support.patch --- razercfg-0.39+ds/debian/patches/ouroboros-support.patch 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/debian/patches/ouroboros-support.patch 2017-03-29 10:10:41.000000000 +0000 @@ -0,0 +1,631 @@ +--- a/librazer/CMakeLists.txt ++++ b/librazer/CMakeLists.txt +@@ -27,6 +27,7 @@ + hw_imperator.c + hw_taipan.c + hw_mamba_tournament_edition.c ++ hw_ouroboros.c + hw_diamondback_chroma.c) + + set_target_properties(razer PROPERTIES COMPILE_FLAGS ${GENERIC_COMPILE_FLAGS} + SOVERSION 1) +--- /dev/null ++++ b/librazer/hw_ouroboros.c +@@ -0,0 +1,523 @@ ++/* ++ * Lowlevel hardware access for the ++ * Razer Ouroboros mouse ++ * ++ * Important notice: ++ * This hardware driver is based on reverse engineering, only. ++ * ++ * Copyright (C) 2007-2010 Michael Buesch ++ * Driver modified for Ouroboros by Tibor Peluch ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#include "hw_ouroboros.h" ++#include "synapse.h" ++#include "razer_private.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++enum { ++ OUROBOROS_LED_SCROLL = 0, ++ OUROBOROS_NR_LEDS, ++}; ++ ++enum { /* Misc constants */ ++ OUROBOROS_NR_DPIMAPPINGS = 82, ++ OUROBOROS_NR_AXES = 3, ++}; ++ ++struct ouroboros_command { ++ uint8_t status; ++ uint8_t padding0[4]; ++ be16_t command; ++ be16_t request; ++ be16_t value0; ++ be16_t value1; ++ uint8_t padding1[75]; ++ uint8_t checksum; ++ uint8_t padding2; ++} _packed; ++ ++struct ouroboros_private { ++ struct razer_mouse *m; ++ ++ /* Firmware version number. */ ++ uint16_t fw_version; ++ /* The currently set LED states. */ ++ bool led_states[OUROBOROS_NR_LEDS]; ++ /* The currently set frequency. */ ++ enum razer_mouse_freq frequency; ++ /* The currently set resolution. */ ++ struct razer_mouse_dpimapping *cur_dpimapping_X; ++ struct razer_mouse_dpimapping *cur_dpimapping_Y; ++ ++ struct razer_mouse_profile profile; ++ struct razer_mouse_dpimapping dpimapping[OUROBOROS_NR_DPIMAPPINGS]; ++ struct razer_axis axes[OUROBOROS_NR_AXES]; ++ ++ bool commit_pending; ++}; ++ ++ ++static void ouroboros_command_init(struct ouroboros_command *cmd) ++{ ++ memset(cmd, 0, sizeof(*cmd)); ++} ++ ++static int ouroboros_usb_write(struct ouroboros_private *priv, ++ int request, int command, ++ void *buf, size_t size) ++{ ++ int err; ++ ++ err = libusb_control_transfer( ++ priv->m->usb_ctx->h, ++ LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_CLASS | ++ LIBUSB_RECIPIENT_INTERFACE, ++ request, command, 0, ++ (unsigned char *)buf, size, ++ RAZER_USB_TIMEOUT); ++ if (err < 0 || (size_t)err != size) { ++ razer_error("razer-ouroboros: " ++ "USB write 0x%02X 0x%02X failed: %d\n", ++ request, command, err); ++ return err; ++ } ++ return 0; ++} ++ ++static int ouroboros_usb_read(struct ouroboros_private *priv, ++ int request, int command, ++ void *buf, size_t size) ++{ ++ int err; ++ ++ err = libusb_control_transfer( ++ priv->m->usb_ctx->h, ++ LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_CLASS | ++ LIBUSB_RECIPIENT_INTERFACE, ++ request, command, 0, ++ buf, size, ++ RAZER_USB_TIMEOUT); ++ if (err < 0 || (size_t)err != size) { ++ razer_error("razer-ouroboros: " ++ "USB read 0x%02X 0x%02X failed: %d\n", ++ request, command, err); ++ return err; ++ } ++ return 0; ++} ++ ++static int ouroboros_send_command(struct ouroboros_private *priv, ++ struct ouroboros_command *cmd) ++{ ++ int err; ++ ++ cmd->checksum = razer_xor8_checksum((uint8_t *)cmd + 2, sizeof(*cmd) - 4); ++ err = ouroboros_usb_write(priv, LIBUSB_REQUEST_SET_CONFIGURATION, 0x300, ++ cmd, sizeof(*cmd)); ++ if (err) ++ return err; ++ err = ouroboros_usb_read(priv, LIBUSB_REQUEST_CLEAR_FEATURE, 0x300, ++ cmd, sizeof(*cmd)); ++ if (err) ++ return err; ++ if (cmd->status != 2 && ++ cmd->status != 1 && ++ cmd->status != 0) { ++ razer_error("razer-ouroboros: Command %04X/%04X failed with %02X\n", ++ be16_to_cpu(cmd->command), ++ be16_to_cpu(cmd->request), ++ cmd->status); ++ } ++ ++ return 0; ++} ++ ++static int ouroboros_read_fw_ver(struct ouroboros_private *priv) ++{ ++ struct ouroboros_command cmd; ++ uint16_t ver = 1; ++ int err; ++ unsigned int i; ++ ++ /* Poke the device several times until it responds with a ++ * valid version number */ ++ for (i = 0; i < 5; i++) { ++ ouroboros_command_init(&cmd); ++ cmd.command = cpu_to_be16(0x0200); ++ cmd.request = cpu_to_be16(0x8100); ++ cmd.request = cpu_to_be16(0x8300); ++ err = ouroboros_send_command(priv, &cmd); ++ ver = be16_to_cpu(cmd.value0); ++ if (!err && (ver & 0xFF00) != 0) ++ return ver; ++ razer_msleep(100); ++ } ++ razer_error("razer-ouroboros: Failed to read firmware version\n"); ++ ++ /* FIXME: Ignore the error and return 0 until we find out ++ * why some mice fail to return a valid version number. ++ */ ++ return 0; ++} ++ ++static int ouroboros_do_commit(struct ouroboros_private *priv) ++{ ++ struct ouroboros_command cmd; ++ unsigned int xres, yres; ++ uint16_t freq; ++ int err; ++ ++ /* Set the resolution. */ ++ ouroboros_command_init(&cmd); ++ cmd.command = cpu_to_be16(0x0704); ++ cmd.request = cpu_to_be16(0x0500); ++ xres = (unsigned int)priv->cur_dpimapping_X->res[RAZER_DIM_0]; ++ yres = (unsigned int)priv->cur_dpimapping_Y->res[RAZER_DIM_0]; ++ cmd.value0 = cpu_to_be16(xres); ++ cmd.value1 = cpu_to_be16(yres); ++ err = ouroboros_send_command(priv, &cmd); ++ if (err) ++ return err; ++ ++ /* Set the scroll wheel and buttons LEDs. */ ++ ouroboros_command_init(&cmd); ++ cmd.command = cpu_to_be16(0x0303); ++ cmd.request = cpu_to_be16(0x0001); ++ cmd.value0 = cpu_to_be16(0x0100); ++ if (priv->led_states[OUROBOROS_LED_SCROLL]) ++ cmd.value0 |= cpu_to_be16(0x0001); ++ err = ouroboros_send_command(priv, &cmd); ++ if (err) ++ return err; ++ ++ /* Set scan frequency. */ ++ switch (priv->frequency) { ++ case RAZER_MOUSE_FREQ_125HZ: ++ freq = 0x0008; ++ break; ++ case RAZER_MOUSE_FREQ_500HZ: ++ freq = 0x0002; ++ break; ++ case RAZER_MOUSE_FREQ_1000HZ: ++ case RAZER_MOUSE_FREQ_UNKNOWN: ++ freq = 0x0001; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ouroboros_command_init(&cmd); ++ cmd.command = cpu_to_be16(0x0100); ++ cmd.request = cpu_to_be16(0x0500); ++ cmd.request |= cpu_to_be16(freq); ++ err = ouroboros_send_command(priv, &cmd); ++ if (err) ++ return err; ++ ++ return 0; ++} ++ ++static int ouroboros_get_fw_version(struct razer_mouse *m) ++{ ++ struct ouroboros_private *priv = m->drv_data; ++ ++ return priv->fw_version; ++} ++ ++static int ouroboros_commit(struct razer_mouse *m, int force) ++{ ++ struct ouroboros_private *priv = m->drv_data; ++ int err = 0; ++ ++ if (!m->claim_count) ++ return -EBUSY; ++ if (priv->commit_pending || force) { ++ err = ouroboros_do_commit(priv); ++ if (!err) ++ priv->commit_pending = 0; ++ } ++ ++ return err; ++} ++ ++static int ouroboros_led_toggle(struct razer_led *led, ++ enum razer_led_state new_state) ++{ ++ struct razer_mouse *m = led->u.mouse; ++ struct ouroboros_private *priv = m->drv_data; ++ ++ if (led->id >= OUROBOROS_NR_LEDS) ++ return -EINVAL; ++ if ((new_state != RAZER_LED_OFF) && ++ (new_state != RAZER_LED_ON)) ++ return -EINVAL; ++ ++ if (!priv->m->claim_count) ++ return -EBUSY; ++ ++ priv->led_states[led->id] = new_state; ++ priv->commit_pending = 1; ++ ++ return 0; ++} ++ ++static int ouroboros_get_leds(struct razer_mouse *m, ++ struct razer_led **leds_list) ++{ ++ struct ouroboros_private *priv = m->drv_data; ++ struct razer_led *scroll; ++ ++ scroll = zalloc(sizeof(struct razer_led)); ++ if (!scroll) ++ return -ENOMEM; ++ ++ scroll->name = "Scrollwheel"; ++ scroll->id = OUROBOROS_LED_SCROLL; ++ scroll->state = priv->led_states[OUROBOROS_LED_SCROLL]; ++ scroll->toggle_state = ouroboros_led_toggle; ++ scroll->u.mouse = m; ++ ++ /* Link the list */ ++ *leds_list = scroll; ++ scroll->next = NULL; ++ ++ return OUROBOROS_NR_LEDS; ++} ++ ++static int ouroboros_supported_freqs(struct razer_mouse *m, ++ enum razer_mouse_freq **freq_list) ++{ ++ enum razer_mouse_freq *list; ++ const int count = 3; ++ ++ list = zalloc(sizeof(*list) * count); ++ if (!list) ++ return -ENOMEM; ++ ++ list[0] = RAZER_MOUSE_FREQ_125HZ; ++ list[1] = RAZER_MOUSE_FREQ_500HZ; ++ list[2] = RAZER_MOUSE_FREQ_1000HZ; ++ ++ *freq_list = list; ++ ++ return count; ++} ++ ++static enum razer_mouse_freq ouroboros_get_freq(struct razer_mouse_profile *p) ++{ ++ struct ouroboros_private *priv = p->mouse->drv_data; ++ ++ return priv->frequency; ++} ++ ++static int ouroboros_set_freq(struct razer_mouse_profile *p, ++ enum razer_mouse_freq freq) ++{ ++ struct ouroboros_private *priv = p->mouse->drv_data; ++ ++ if (!priv->m->claim_count) ++ return -EBUSY; ++ ++ priv->frequency = freq; ++ priv->commit_pending = 1; ++ ++ return 0; ++} ++ ++static int ouroboros_supported_axes(struct razer_mouse *m, ++ struct razer_axis **axes_list) ++{ ++ struct ouroboros_private *priv = m->drv_data; ++ ++ *axes_list = priv->axes; ++ ++ return ARRAY_SIZE(priv->axes); ++} ++ ++static int ouroboros_supported_resolutions(struct razer_mouse *m, ++ enum razer_mouse_res **res_list) ++{ ++ enum razer_mouse_res *list; ++ unsigned int i; ++ const unsigned int count = OUROBOROS_NR_DPIMAPPINGS; ++ ++ list = zalloc(sizeof(*list) * count); ++ if (!list) ++ return -ENOMEM; ++ for (i = 0; i < count; i++) ++ list[i] = (i + 1) * 100; ++ *res_list = list; ++ ++ return count; ++} ++ ++static struct razer_mouse_profile * ouroboros_get_profiles(struct razer_mouse *m) ++{ ++ struct ouroboros_private *priv = m->drv_data; ++ ++ return &priv->profile; ++} ++ ++static int ouroboros_supported_dpimappings(struct razer_mouse *m, ++ struct razer_mouse_dpimapping **res_ptr) ++{ ++ struct ouroboros_private *priv = m->drv_data; ++ ++ *res_ptr = &priv->dpimapping[0]; ++ ++ return ARRAY_SIZE(priv->dpimapping); ++} ++ ++static struct razer_mouse_dpimapping * ouroboros_get_dpimapping(struct razer_mouse_profile *p, ++ struct razer_axis *axis) ++{ ++ struct ouroboros_private *priv = p->mouse->drv_data; ++ ++ if (!axis) ++ axis = &priv->axes[0]; ++ if (axis->id == 0) ++ return priv->cur_dpimapping_X; ++ if (axis->id == 1) ++ return priv->cur_dpimapping_Y; ++ ++ return NULL; ++} ++ ++static int ouroboros_set_dpimapping(struct razer_mouse_profile *p, ++ struct razer_axis *axis, ++ struct razer_mouse_dpimapping *d) ++{ ++ struct ouroboros_private *priv = p->mouse->drv_data; ++ ++ if (!priv->m->claim_count) ++ return -EBUSY; ++ if (axis && axis->id >= ARRAY_SIZE(priv->axes)) ++ return -EINVAL; ++ ++ if (axis) { ++ if (axis->id == 0) ++ priv->cur_dpimapping_X = d; ++ else if (axis->id == 1) ++ priv->cur_dpimapping_Y = d; ++ else ++ return -EINVAL; ++ } else { ++ priv->cur_dpimapping_X = d; ++ priv->cur_dpimapping_Y = d; ++ } ++ priv->commit_pending = 1; ++ ++ return 0; ++} ++ ++int razer_ouroboros_init(struct razer_mouse *m, ++ struct libusb_device *usbdev) ++{ ++ struct ouroboros_private *priv; ++ unsigned int i; ++ int fwver, err; ++ ++ BUILD_BUG_ON(sizeof(struct ouroboros_command) != 90); ++ ++ priv = zalloc(sizeof(struct ouroboros_private)); ++ if (!priv) ++ return -ENOMEM; ++ priv->m = m; ++ m->drv_data = priv; ++ ++ err = razer_usb_add_used_interface(m->usb_ctx, 0, 0); ++ if (err) ++ goto err_free; ++ ++ err = m->claim(m); ++ if (err) { ++ razer_error("hw_ouroboros: Failed to claim device\n"); ++ goto err_free; ++ } ++ ++ /* Fetch firmware version */ ++ fwver = ouroboros_read_fw_ver(priv); ++ if (fwver < 0) { ++ err = fwver; ++ goto err_release; ++ } ++ priv->fw_version = fwver; ++ ++ priv->frequency = RAZER_MOUSE_FREQ_1000HZ; ++ for (i = 0; i < OUROBOROS_NR_LEDS; i++) ++ priv->led_states[i] = RAZER_LED_ON; ++ ++ priv->profile.nr = 0; ++ priv->profile.get_freq = ouroboros_get_freq; ++ priv->profile.set_freq = ouroboros_set_freq; ++ priv->profile.get_dpimapping = ouroboros_get_dpimapping; ++ priv->profile.set_dpimapping = ouroboros_set_dpimapping; ++ priv->profile.mouse = m; ++ ++ for (i = 0; i < OUROBOROS_NR_DPIMAPPINGS; i++) { ++ priv->dpimapping[i].nr = i; ++ priv->dpimapping[i].res[RAZER_DIM_0] = (i + 1) * 100; ++ if (priv->dpimapping[i].res[RAZER_DIM_0] == 1000) { ++ priv->cur_dpimapping_X = &priv->dpimapping[i]; ++ priv->cur_dpimapping_Y = &priv->dpimapping[i]; ++ } ++ priv->dpimapping[i].dimension_mask = (1 << RAZER_DIM_0); ++ priv->dpimapping[i].change = NULL; ++ priv->dpimapping[i].mouse = m; ++ } ++ razer_init_axes(&priv->axes[0], ++ "X", RAZER_AXIS_INDEPENDENT_DPIMAPPING, ++ "Y", RAZER_AXIS_INDEPENDENT_DPIMAPPING, ++ "Scroll", 0); ++ ++ m->type = RAZER_MOUSETYPE_OUROBOROS; ++ razer_generic_usb_gen_idstr(usbdev, m->usb_ctx->h, "Ouroboros", 1, ++ NULL, m->idstr); ++ ++ m->get_fw_version = ouroboros_get_fw_version; ++ m->commit = ouroboros_commit; ++ m->global_get_leds = ouroboros_get_leds; ++ m->get_profiles = ouroboros_get_profiles; ++ m->supported_axes = ouroboros_supported_axes; ++ m->supported_resolutions = ouroboros_supported_resolutions; ++ m->supported_freqs = ouroboros_supported_freqs; ++ m->supported_dpimappings = ouroboros_supported_dpimappings; ++ ++ err = ouroboros_do_commit(priv); ++ if (err) { ++ razer_error("hw_ouroboros: Failed to commit initial settings\n"); ++ goto err_release; ++ } ++ ++ m->release(m); ++ ++ return 0; ++ ++err_release: ++ m->release(m); ++err_free: ++ free(priv); ++ return err; ++} ++ ++void razer_ouroboros_release(struct razer_mouse *m) ++{ ++ struct ouroboros_private *priv = m->drv_data; ++ ++ free(priv); ++} + +--- /dev/null ++++ b/librazer/hw_ouroboros.h +@@ -0,0 +1,11 @@ ++#ifndef RAZER_HW_OUROBOROS_H_ ++#define RAZER_HW_OUROBOROS_H_ ++ ++#include "razer_private.h" ++ ++ ++int razer_ouroboros_init(struct razer_mouse *m, ++ struct libusb_device *udev); ++void razer_ouroboros_release(struct razer_mouse *m); ++ ++#endif /* RAZER_HW_OUROBOROS_H_ */ +--- a/librazer/librazer.c ++++ b/librazer/librazer.c +@@ -31,6 +31,7 @@ + #include "hw_imperator.h" + #include "hw_taipan.h" + #include "hw_mamba_tournament_edition.h" ++#include "hw_ouroboros.h" + #include "hw_diamondback_chroma.h" + + #include +@@ -139,6 +140,18 @@ + .type = RAZER_MOUSETYPE_MAMBA_TE, + .init = razer_mamba_te_init, + .release = razer_mamba_te_release, ++}; ++ ++static const struct razer_mouse_base_ops razer_ouroboros_base_ops_wired = { ++ .type = RAZER_MOUSETYPE_OUROBOROS, ++ .init = razer_ouroboros_init, ++ .release = razer_ouroboros_release, ++}; ++ ++static const struct razer_mouse_base_ops razer_ouroboros_base_ops_wireless = { ++ .type = RAZER_MOUSETYPE_OUROBOROS, ++ .init = razer_ouroboros_init, ++ .release = razer_ouroboros_release, + }; + + static const struct razer_mouse_base_ops razer_diamondback_chroma_base_ops = { +@@ -177,6 +190,8 @@ + USB_MOUSE(0x1532, 0x0017, &razer_imperator_base_ops), + USB_MOUSE(0x1532, 0x0034, &razer_taipan_base_ops), + USB_MOUSE(0x1532, 0x0046, &razer_mamba_te_base_ops), /*mamba tournament edition*/ ++ USB_MOUSE(0x1532, 0x0032, &razer_ouroboros_base_ops_wired), /* ouroboros wired */ ++ USB_MOUSE(0x1532, 0x0033, &razer_ouroboros_base_ops_wireless), /* ouroboros wireless */ + USB_MOUSE(0x1532, 0x004C, &razer_diamondback_chroma_base_ops), + { 0, }, /* List end */ + }; +--- a/librazer/librazer.h ++++ b/librazer/librazer.h +@@ -206,6 +206,7 @@ + * @RAZER_MOUSETYPE_IMPERATOR: An "Imperator" mouse + * @RAZER_MOUSETYPE_TAIPAN: A "Taipan" mouse + * @RAZER_MOUSETYPE_MAMBA_TE: A "Mamba Tournament Edition" mouse ++ * @RAZER_MOUSETYPE_OUROBOROS: A "Ouroboros" mouse + * @RAZER_MOUSETYPE_DIAMONDBACK_CHROMA: A "Diamondback Chroma" mouse + */ + +@@ -219,6 +220,7 @@ + RAZER_MOUSETYPE_IMPERATOR, + RAZER_MOUSETYPE_TAIPAN, + RAZER_MOUSETYPE_MAMBA_TE, ++ RAZER_MOUSETYPE_OUROBOROS, + RAZER_MOUSETYPE_DIAMONDBACK_CHROMA, + }; + +--- a/razer.conf ++++ b/razer.conf +@@ -27,6 +27,20 @@ + led=1:Scrollwheel:on + mode=1:Scrollwheel:static + color=1:Scrollwheel:0000FF ++ ++# Razer Ouroboros mouse ++[Mouse:Ouroboros*:*:*] ++ # Config section disabled? ++ disabled=false ++ ++ # Configure first profile ++ # Resolution: 800, 1800, 3500, 5600 ++ res=1:1800 ++ # Frequency: 125, 500, 1000 ++ freq=1:1000 ++ ++ # Initial profile selection ++ profile=1 + + # Razer DeathAdder mouse + [Mouse:DeathAdder*:*:*] diff -Nru razercfg-0.39+ds/debian/patches/series razercfg-0.39/debian/patches/series --- razercfg-0.39+ds/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/debian/patches/series 2016-07-12 09:21:09.000000000 +0000 @@ -0,0 +1,2 @@ +ouroboros-support.patch +desktop-file-icon.patch diff -Nru razercfg-0.39+ds/debian/razercfg.install razercfg-0.39/debian/razercfg.install --- razercfg-0.39+ds/debian/razercfg.install 2017-10-25 20:12:24.000000000 +0000 +++ razercfg-0.39/debian/razercfg.install 2017-03-29 10:17:19.000000000 +0000 @@ -1,6 +1,7 @@ razer.conf /etc etc/pm/sleep.d/50-razer /etc/pm/sleep.d lib/systemd/system/razerd.service lib/systemd/system +#debian/80-razer.rules lib/udev/rules.d lib/udev/rules.d/80-razer.rules lib/udev/rules.d usr/lib/python3*/site-packages/* usr/lib/python3/dist-packages usr/bin/razerd /usr/bin diff -Nru razercfg-0.39+ds/debian/rules razercfg-0.39/debian/rules --- razercfg-0.39+ds/debian/rules 2017-10-25 20:12:24.000000000 +0000 +++ razercfg-0.39/debian/rules 2017-03-29 10:17:21.000000000 +0000 @@ -18,4 +18,5 @@ dh_installinit --name=razerd %: +# dh $@ --with python3 --buildsystem=cmake # build without systemd for Trusty dh $@ --with systemd --with python3 --buildsystem=cmake diff -Nru razercfg-0.39+ds/debian/upstream/signing-key.asc razercfg-0.39/debian/upstream/signing-key.asc --- razercfg-0.39+ds/debian/upstream/signing-key.asc 2017-10-25 20:26:13.000000000 +0000 +++ razercfg-0.39/debian/upstream/signing-key.asc 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -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 -=TF3I ------END PGP PUBLIC KEY BLOCK----- diff -Nru razercfg-0.39+ds/debian/watch razercfg-0.39/debian/watch --- razercfg-0.39+ds/debian/watch 2017-10-25 20:26:13.000000000 +0000 +++ razercfg-0.39/debian/watch 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -version=3 -opts=dversionmangle=s/\+ds\d+$//,repacksuffix=+ds,pgpmode=auto \ -https://bues.ch/razercfg/razercfg-(\d\S+)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) Binary files /tmp/tmp502mqV/KU0MAOxV7q/razercfg-0.39+ds/firmware/issp/m8cutils-22.tar.gz and /tmp/tmp502mqV/8gElGZDYGT/razercfg-0.39/firmware/issp/m8cutils-22.tar.gz differ diff -Nru razercfg-0.39+ds/firmware/issp/patches/001-m8cutils-fix-compilation.patch razercfg-0.39/firmware/issp/patches/001-m8cutils-fix-compilation.patch --- razercfg-0.39+ds/firmware/issp/patches/001-m8cutils-fix-compilation.patch 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/firmware/issp/patches/001-m8cutils-fix-compilation.patch 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1,37 @@ +GCC warns about unused functions. +As m8cutils is compiled with -Werror, compilation fails in jrb.c + +--- + libfdr/jrb.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- m8cutils-22.orig/libfdr/jrb.c ++++ m8cutils-22/libfdr/jrb.c +@@ -50,8 +50,10 @@ static JRB lprev(JRB n); + static JRB rprev(JRB n); + static void recolor(JRB n); + static void single_rotate(JRB y, int l); ++#if 0 + static void jrb_print_tree(JRB t, int level); + static void jrb_iprint_tree(JRB t, int level); ++#endif + + #define isred(n) (n->red) + #define isblack(n) (!isred(n)) +@@ -549,7 +551,7 @@ void jrb_delete_node(JRB n) + } + } + +- ++#if 0 + void jrb_print_tree(JRB t, int level) + { + int i; +@@ -601,6 +603,7 @@ void jrb_iprint_tree(JRB t, int level) + } + } + } ++#endif + + int jrb_nblack(JRB n) + { diff -Nru razercfg-0.39+ds/firmware/issp/patches/002-m8cutils-remove-pp-timeout.patch razercfg-0.39/firmware/issp/patches/002-m8cutils-remove-pp-timeout.patch --- razercfg-0.39+ds/firmware/issp/patches/002-m8cutils-remove-pp-timeout.patch 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/firmware/issp/patches/002-m8cutils-remove-pp-timeout.patch 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1,31 @@ +PPSETTIME fails with EINVAL on PowerPC (at least). +Let's remove it, as a temporary workaround. + +--- + prog/pp.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- m8cutils-22.orig/prog/pp.c ++++ m8cutils-22/prog/pp.c +@@ -75,7 +75,7 @@ static void set_input(int new_input) + + int pp_open(const char *path,int need_epp) + { +- struct timeval timeout = { .tv_sec = PP_TIMEOUT_S, .tv_usec = 0 }; ++/* struct timeval timeout = { .tv_sec = PP_TIMEOUT_S, .tv_usec = 0 };*/ + + if (!path) + path = DEFAULT_PARPORT; +@@ -95,10 +95,12 @@ int pp_open(const char *path,int need_ep + perror("ioctl(PPCLAIM)"); + exit(1); + } ++#if 0 + if (ioctl(fd,PPSETTIME,&timeout) < 0) { + perror("ioctl(SETTIME)"); + exit(1); + } ++#endif + return fd; + } + diff -Nru razercfg-0.39+ds/firmware/issp/patches/003-m8cutils-parport-por-issp.patch razercfg-0.39/firmware/issp/patches/003-m8cutils-parport-por-issp.patch --- razercfg-0.39+ds/firmware/issp/patches/003-m8cutils-parport-por-issp.patch 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/firmware/issp/patches/003-m8cutils-parport-por-issp.patch 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1,164 @@ +Add a driver for the Parallel Port based PowerOnReset In System Serial Programmer. + +--- + prog/Makefile | 2 + prog/drv/ppporissp.c | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 144 insertions(+), 1 deletion(-) + +--- m8cutils-22.orig/prog/Makefile ++++ m8cutils-22/prog/Makefile +@@ -8,7 +8,7 @@ + include ../Common.make + + +-DRIVERS=waspic watsp watpp wadsp ecb_at91 dummy ++DRIVERS=waspic watsp watpp wadsp ecb_at91 dummy ppporissp + TESTS=rd errd ercmok ercmf wrrd wrcmok wrcmf wrlkcmok wrlkcmf wrlkrdf wrlkrdz \ + secu secf secr secw secfsrw secfsur secfsfw \ + secfspu secfspf secfspr secfspw secmir inrom inhex outrom outhex \ +--- /dev/null ++++ m8cutils-22/prog/drv/ppporissp.c +@@ -0,0 +1,143 @@ ++/* ++ * ppporissp.c - Parallel Port based PowerOnReset In System Serial Programmer ++ * ++ * Copyright (c) 2009 Michael Buesch ++ * Derived from wadsp.c Copyright 2006 Werner Almesberger ++ * Derived from watpp.c Copyright 2006 Werner Almesberger ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "prog.h" ++#include "pp.h" ++ ++/* ++ * Programmer connections: ++ * ++ * Logical ++ * 1 0 ++ * Data 0 (pin 2) SDATA to device SDATA !SDATA ++ * Data 1 (pin 3) SCLK to device SCLK !SCLK ++ * Data 2 (pin 4) Device power PWR !PWR ++ * Status 3 (pin 15) SDATA from device SDATA !SDATA ++ */ ++ ++#define PWR_TARGET(on) ((on) ? (data |= (1 << 2)) : (data &= ~(1 << 2))) ++#define SCLK(on) ((on) ? (data |= (1 << 1)) : (data &= ~(1 << 1))) ++#define SDATA_OUT(on) ((on) ? (data |= (1 << 0)) : (data &= ~(1 << 0))) ++#define SDATA_IN() (!!(pp_read_status() & (1 << 3))) ++#define COMMIT() pp_write_data(data) ++ ++static int fd; ++static int inverted; ++static uint8_t data; ++ ++ ++void delay_hook(int rising); ++void __attribute__((weak)) delay_hook(int rising) ++{ ++} ++ ++static void ppporissp_send_bit(int bit) ++{ ++ SDATA_OUT(bit); ++ SCLK(1); ++ COMMIT(); ++ delay_hook(1); ++ SCLK(0); ++ COMMIT(); ++ delay_hook(0); ++} ++ ++static void ppporissp_send_z(void) ++{ ++ SDATA_OUT(0); ++ SCLK(!inverted); ++ COMMIT(); ++ delay_hook(1); ++ SCLK(inverted); ++ COMMIT(); ++ delay_hook(0); ++} ++ ++static int ppporissp_read_bit(void) ++{ ++ return SDATA_IN(); ++} ++ ++static void ppporissp_invert_phase(void) ++{ ++ inverted = !inverted; ++ if (inverted) { ++ SCLK(1); ++ COMMIT(); ++ } ++} ++ ++static struct prog_bit ppporissp_bit = { ++ .send_bit = ppporissp_send_bit, ++ .send_z = ppporissp_send_z, ++ .read_bit = ppporissp_read_bit, ++ .invert_phase = ppporissp_invert_phase, ++}; ++ ++static void ppporissp_initialize(int power_on) ++{ ++ struct timeval t0; ++ ++ printf("Performing power-on-reset...\n"); ++ PWR_TARGET(1); ++ COMMIT(); ++ start_time(&t0); ++ /* This is much safer than usleep. */ ++ while (delta_time_us(&t0) < T_VDDWAIT); ++} ++ ++static int ppporissp_open(const char *dev, int voltage, int power_on, ++ const char *args[]) ++{ ++ prog_init(NULL, NULL, NULL, &ppporissp_bit); ++ ++ if (!power_on) { ++ fprintf(stderr, "ppporissp does not support XRES\n"); ++ return -1; ++ } ++ if (voltage != 5) ++ printf("Warning: Not operating on 5V. Trying anyway...\n"); ++ ++ fd = pp_open(dev, 0); ++ ++ inverted = 0; ++ PWR_TARGET(0); ++ SCLK(0); ++ SDATA_OUT(0); ++ COMMIT(); ++ /* ++ * With the power off, we now wait for capacitors on the board to ++ * discharge. Using v(t) = v(0)*exp(-t/RC) and ++ * v(0) = 5V, R = 4.7kOhm, t = 100ms, we can discharge up to ++ * C = 10uF down to a diode drop of 0.6V. ++ */ ++ printf("Waiting for device to power down...\n"); ++ sleep(2); /* 2000 ms */ ++ ++ return voltage; ++} ++ ++static void ppporissp_close(void) ++{ ++ SCLK(0); ++ PWR_TARGET(0); ++ COMMIT(); ++ pp_close(); ++} ++ ++struct prog_common ppporissp = { ++ .name = "ppporissp", ++ .open = ppporissp_open, ++ .close = ppporissp_close, ++ .initialize = ppporissp_initialize, ++}; diff -Nru razercfg-0.39+ds/firmware/issp/patches/series razercfg-0.39/firmware/issp/patches/series --- razercfg-0.39+ds/firmware/issp/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/firmware/issp/patches/series 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1,3 @@ +001-m8cutils-fix-compilation.patch +002-m8cutils-remove-pp-timeout.patch +003-m8cutils-parport-por-issp.patch diff -Nru razercfg-0.39+ds/firmware/issp/schematics/ppporissp.pro razercfg-0.39/firmware/issp/schematics/ppporissp.pro --- razercfg-0.39+ds/firmware/issp/schematics/ppporissp.pro 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/firmware/issp/schematics/ppporissp.pro 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1,6 @@ +update=24/5/2009-10:04:04 +last_client=kicad +[general] +version=1 +RootSch=ppporissp.sch +BoardNm=ppporissp.brd diff -Nru razercfg-0.39+ds/firmware/issp/schematics/ppporissp.sch razercfg-0.39/firmware/issp/schematics/ppporissp.sch --- razercfg-0.39+ds/firmware/issp/schematics/ppporissp.sch 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/firmware/issp/schematics/ppporissp.sch 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1,359 @@ +EESchema Schematic File Version 1 +LIBS:power,device,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,dsp,microchip,analog_switches,motorola,texas,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib,valves,./ppporissp.cache +EELAYER 23 0 +EELAYER END +$Descr A4 11700 8267 +Sheet 1 1 +Title "Parallel port based M8C PowerOnReset-ISSP adapter" +Date "20 jun 2009" +Rev "1" +Comp "(c) 2009 Michael Buesch " +Comment1 "" +Comment2 "" +Comment3 "" +Comment4 "" +$EndDescr +Wire Wire Line + 7900 4300 7050 4300 +Wire Wire Line + 7050 4750 7050 4300 +Wire Wire Line + 6400 4750 7050 4750 +Wire Wire Line + 6400 4200 7900 4200 +Wire Wire Line + 5600 4100 5600 4000 +Wire Wire Line + 5300 3800 5200 3800 +Wire Wire Line + 5200 3800 5200 3900 +Wire Wire Line + 5550 2700 5650 2700 +Connection ~ 6200 2950 +Wire Wire Line + 6200 2400 6200 3450 +Wire Wire Line + 6200 2400 5950 2400 +Wire Wire Line + 5950 2400 5950 2500 +Wire Wire Line + 6200 2950 6650 2950 +Wire Wire Line + 6200 3450 6300 3450 +Wire Wire Line + 6950 2750 7050 2750 +Wire Wire Line + 7050 2750 7050 4000 +Wire Wire Line + 7050 4000 7900 4000 +Connection ~ 5600 4750 +Wire Wire Line + 4200 3200 5600 3200 +Wire Wire Line + 5350 4750 5900 4750 +Connection ~ 6750 4750 +Wire Wire Line + 6750 4750 6750 4900 +Wire Wire Line + 4400 5200 4200 5200 +Wire Wire Line + 4400 4800 4200 4800 +Wire Wire Line + 4400 4400 4200 4400 +Wire Wire Line + 4200 4000 4400 4000 +Wire Wire Line + 4200 3800 4400 3800 +Wire Wire Line + 4200 4200 4400 4200 +Wire Wire Line + 4200 4600 4400 4600 +Wire Wire Line + 4200 5000 4400 5000 +Wire Wire Line + 6750 5400 6750 5500 +Wire Wire Line + 6950 4100 7900 4100 +Wire Wire Line + 4950 4750 4750 4750 +Wire Wire Line + 4200 3100 4750 3100 +Wire Wire Line + 4200 3300 5800 3300 +Wire Wire Line + 7900 3900 6950 3900 +Wire Wire Line + 6950 3900 6950 3150 +Wire Wire Line + 6800 3450 6950 3450 +Connection ~ 6950 3450 +Wire Wire Line + 5950 3000 5950 2900 +Wire Wire Line + 5050 2700 4950 2700 +Wire Wire Line + 4950 2700 4950 3500 +Wire Wire Line + 4950 3500 4200 3500 +Wire Wire Line + 4750 3100 4750 4750 +Wire Wire Line + 5600 3200 5600 3600 +Wire Wire Line + 5200 4400 5200 4500 +Wire Wire Line + 5200 4500 5600 4500 +Wire Wire Line + 5600 4500 5600 4750 +Wire Wire Line + 5800 3300 5800 4200 +Wire Wire Line + 5800 4200 5900 4200 +$Comp +L GND #PWR9 +U 1 1 4A3CE40F +P 5600 4100 +F 0 "#PWR9" H 5600 4100 30 0001 C C +F 1 "GND" H 5600 4030 30 0001 C C + 1 5600 4100 + 1 0 0 -1 +$EndComp +$Comp +L R R1 +U 1 1 4A3CE3BC +P 5200 4150 +F 0 "R1" V 5280 4150 50 0000 C C +F 1 "150" V 5200 4150 50 0000 C C + 1 5200 4150 + 1 0 0 -1 +$EndComp +$Comp +L NPN Q1 +U 1 1 4A3CE39F +P 5500 3800 +F 0 "Q1" H 5650 3800 50 0000 C C +F 1 "BC547C" H 5402 3950 50 0000 C C + 1 5500 3800 + 1 0 0 -1 +$EndComp +$Comp +L R R2 +U 1 1 4A23E4A1 +P 5300 2700 +F 0 "R2" V 5380 2700 50 0000 C C +F 1 "150" V 5300 2700 50 0000 C C + 1 5300 2700 + 0 1 1 0 +$EndComp +$Comp +L GND #PWR10 +U 1 1 4A23E488 +P 5950 3000 +F 0 "#PWR10" H 5950 3000 30 0001 C C +F 1 "GND" H 5950 2930 30 0001 C C + 1 5950 3000 + 1 0 0 -1 +$EndComp +$Comp +L NPN Q2 +U 1 1 4A23E465 +P 5850 2700 +F 0 "Q2" H 6000 2700 50 0000 C C +F 1 "BC547C" H 5752 2850 50 0000 C C + 1 5850 2700 + 1 0 0 -1 +$EndComp +$Comp +L R R5 +U 1 1 4A23E3FD +P 6550 3450 +F 0 "R5" V 6630 3450 50 0000 C C +F 1 "47k" V 6550 3450 50 0000 C C + 1 6550 3450 + 0 1 1 0 +$EndComp +$Comp +L MOSFET_P Q3 +U 1 1 4A23DDD8 +P 6850 2950 +F 0 "Q3" H 6850 3140 60 0000 R C +F 1 "IRF5305" H 6850 2770 60 0000 R C + 1 6850 2950 + 1 0 0 -1 +$EndComp +Text Label 4300 3300 0 40 ~ +SCLK +Text Label 4300 3200 0 40 ~ +SDATA <- +Text Label 4300 3100 0 40 ~ +SDATA -> +Text Label 4300 3500 0 40 ~ +POR +NoConn ~ 4200 5300 +NoConn ~ 4200 5100 +NoConn ~ 4200 4900 +NoConn ~ 4200 4700 +NoConn ~ 4200 4500 +NoConn ~ 4200 4300 +NoConn ~ 4200 4100 +NoConn ~ 4200 3900 +NoConn ~ 4200 3700 +NoConn ~ 4200 3600 +NoConn ~ 4200 3400 +NoConn ~ 4200 3000 +NoConn ~ 4200 2900 +$Comp +L GND #PWR12 +U 1 1 4A1921BA +P 6950 4100 +F 0 "#PWR12" H 6950 4100 30 0001 C C +F 1 "GND" H 6950 4030 30 0001 C C + 1 6950 4100 + 0 1 1 0 +$EndComp +$Comp +L GND #PWR11 +U 1 1 4A19218B +P 6750 5500 +F 0 "#PWR11" H 6750 5500 30 0001 C C +F 1 "GND" H 6750 5430 30 0001 C C + 1 6750 5500 + 1 0 0 -1 +$EndComp +$Comp +L GND #PWR8 +U 1 1 4A191DAF +P 4400 5200 +F 0 "#PWR8" H 4400 5200 30 0001 C C +F 1 "GND" H 4400 5130 30 0001 C C + 1 4400 5200 + 0 -1 -1 0 +$EndComp +$Comp +L GND #PWR7 +U 1 1 4A191DA8 +P 4400 5000 +F 0 "#PWR7" H 4400 5000 30 0001 C C +F 1 "GND" H 4400 4930 30 0001 C C + 1 4400 5000 + 0 -1 -1 0 +$EndComp +$Comp +L GND #PWR6 +U 1 1 4A191DA5 +P 4400 4800 +F 0 "#PWR6" H 4400 4800 30 0001 C C +F 1 "GND" H 4400 4730 30 0001 C C + 1 4400 4800 + 0 -1 -1 0 +$EndComp +$Comp +L GND #PWR5 +U 1 1 4A191DA1 +P 4400 4600 +F 0 "#PWR5" H 4400 4600 30 0001 C C +F 1 "GND" H 4400 4530 30 0001 C C + 1 4400 4600 + 0 -1 -1 0 +$EndComp +$Comp +L GND #PWR4 +U 1 1 4A191D9B +P 4400 4400 +F 0 "#PWR4" H 4400 4400 30 0001 C C +F 1 "GND" H 4400 4330 30 0001 C C + 1 4400 4400 + 0 -1 -1 0 +$EndComp +$Comp +L GND #PWR3 +U 1 1 4A191D96 +P 4400 4200 +F 0 "#PWR3" H 4400 4200 30 0001 C C +F 1 "GND" H 4400 4130 30 0001 C C + 1 4400 4200 + 0 -1 -1 0 +$EndComp +$Comp +L GND #PWR2 +U 1 1 4A191D92 +P 4400 4000 +F 0 "#PWR2" H 4400 4000 30 0001 C C +F 1 "GND" H 4400 3930 30 0001 C C + 1 4400 4000 + 0 -1 -1 0 +$EndComp +$Comp +L GND #PWR1 +U 1 1 4A191D8C +P 4400 3800 +F 0 "#PWR1" H 4400 3800 30 0001 C C +F 1 "GND" H 4400 3730 30 0001 C C + 1 4400 3800 + 0 -1 -1 0 +$EndComp +Text Label 7150 4000 0 40 ~ +Vdd to device +Text Label 7150 3900 0 40 ~ +Vdd from supply +Text Label 7150 4100 0 40 ~ +GND +Text Label 7150 4200 0 40 ~ +SCLK +Text Label 7150 4300 0 40 ~ +SDATA +$Comp +L CONN_5 P1 +U 1 1 4A191C5C +P 8300 4100 +F 0 "P1" V 8250 4100 50 0000 C C +F 1 "ISSP" V 8350 4100 50 0000 C C + 1 8300 4100 + 1 0 0 -1 +$EndComp +$Comp +L DIODE D1 +U 1 1 4A191C2F +P 5150 4750 +F 0 "D1" H 5150 4850 40 0000 C C +F 1 "1N4148" H 5150 4650 40 0000 C C + 1 5150 4750 + 1 0 0 -1 +$EndComp +$Comp +L R R6 +U 1 1 4A191C1E +P 6750 5150 +F 0 "R6" V 6830 5150 50 0000 C C +F 1 "1k" V 6750 5150 50 0000 C C + 1 6750 5150 + 1 0 0 -1 +$EndComp +$Comp +L R R4 +U 1 1 4A191C1A +P 6150 4750 +F 0 "R4" V 6230 4750 50 0000 C C +F 1 "1k" V 6150 4750 50 0000 C C + 1 6150 4750 + 0 1 1 0 +$EndComp +$Comp +L R R3 +U 1 1 4A191C15 +P 6150 4200 +F 0 "R3" V 6230 4200 50 0000 C C +F 1 "1k" V 6150 4200 50 0000 C C + 1 6150 4200 + 0 1 1 0 +$EndComp +$Comp +L DB25 J1 +U 1 1 4A191BE0 +P 3750 4100 +F 0 "J1" H 3800 5450 70 0000 C C +F 1 "PC parallel port" H 3700 2750 70 0000 C C + 1 3750 4100 + -1 0 0 1 +$EndComp +$EndSCHEMATC diff -Nru razercfg-0.39+ds/.gitignore razercfg-0.39/.gitignore --- razercfg-0.39+ds/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/.gitignore 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1,15 @@ +Makefile +CMakeCache.txt +CMakeFiles +cmake_install.cmake +install_manifest.txt +udev.rules +pm-hook.sh +razerd.service +razercfg.desktop +*.swp +*.o +*.pyc +*.pyo +*.bak +*.cache.* diff -Nru razercfg-0.39+ds/HACKING.html razercfg-0.39/HACKING.html --- razercfg-0.39+ds/HACKING.html 2017-03-28 17:12:06.000000000 +0000 +++ razercfg-0.39/HACKING.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ - -

Razercfg - Sniffing the USB protocol

- -

When adding support for a new mouse, or when debugging issues, it can be usefull to capture the original protocol with Razer official configuration software.

- -

Requirements

- -

No matter the method, the basic requirements are:

- -
    -
  • a Windows machine with Razer Synapse installed (note: you'll need to register)
  • -
  • another mouse: to reduce protocol chatter by avoiding moving the mouse spied on
  • -
- -

Using USBPcap or Wireshark

- -

You can sniff the USB protocol on Windows using USBPcap. Take a look at the illustrated tour for more information. -Altenatively you can use Wireshark.

- -

Using a guest VirtualBox VM and usbmon or QEMU and usbmon

- -
    -
  1. Install Windows: you can get an evaluation copy (usable for 90 days) of Windows 8/8.1/10 (note: you'll need to register)

  2. -
  3. Find your mouse USB bus and device numbers:

  4. -
- -
-$ lsusb | grep 'ID 1532'
-Bus 005 Device 010: ID 1532:0040 Razer USA, Ltd
-$ bus=5 dev=10
-
- -
    -
  1. configure VM access to the host USB: see the relevant USB support section in the VirtualBox manual

  2. -
  3. load the usbmon module:

  4. -
- -
-sudo modprobe usbmon
-
- -
    -
  1. monitor the bus, filtering for device specific messages:
  2. -
- -
-sudo cat /sys/kernel/debug/usb/usbmon/${bus}u | awk "{ if (\$4 ~ /:0*${bus}:0*${dev}:[0-9]+$/) print \$0 }"
-
- -

See the usbmon documentation for the details of the output format.

- -

Alternatively to VirtualBox VM, you may use QEMU.

- Binary files /tmp/tmp502mqV/KU0MAOxV7q/razercfg-0.39+ds/HACKING.pdf and /tmp/tmp502mqV/8gElGZDYGT/razercfg-0.39/HACKING.pdf differ diff -Nru razercfg-0.39+ds/librazer/.gitignore razercfg-0.39/librazer/.gitignore --- razercfg-0.39+ds/librazer/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/librazer/.gitignore 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1 @@ +librazer.so diff -Nru razercfg-0.39+ds/razerd/.gitignore razercfg-0.39/razerd/.gitignore --- razercfg-0.39+ds/razerd/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/razerd/.gitignore 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1 @@ +razerd diff -Nru razercfg-0.39+ds/README.html razercfg-0.39/README.html --- razercfg-0.39+ds/README.html 2017-03-28 17:12:05.000000000 +0000 +++ razercfg-0.39/README.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,216 +0,0 @@ - -

Razer device configuration tool

- -

https://bues.ch/h/razercfg

- -

This is a configuration utility for Razer devices on Linux systems.

- -

Supported devices

- -

Device support table at https://bues.ch/h/razercfg#device_support

- -

Dependencies

- - - -

Note that almost all distributions ship prebuilt packages of the -above dependencies.

- -

If you installed a dependency after you already ran cmake . and/or make, it -might happen that the dependency is still not found. Just delete the cmake -status files or unpack a clean razercfg tarball to workaround this issue.

- -

Building

- -

First invoke cmake to build the makefiles. -Then invoke make to build the binaries:

- -
-cmake .
-make
-
- -

(Note the required space and dot after the cmake command)

- -

Installing

- -

First you need to install the tool libraries and binaries. Do this by executing -the following command as root:

- -
-make install
-
- -

Be aware that make install installs the shared library librazer.so to $PREFIX/lib. -The default $PREFIX is /usr/local/, but the install prefix can also be changed via -DCMAKE_INSTALL_PREFIX='<somewhere>'. -You have to make sure that librazer.so in $PREFIX/lib/ can be found by the dynamic linker ld.so. -Your operating system most likely already has support for libraries in /usr/local/lib. So on most systems you don't have to do anything. -If this is not the case, or you installed razercfg somewhere else, a new library search path can be added via /etc/ld.so.conf or /etc/ld.so.conf.d/. -See your operating system manual for further information.

- -

If you use systemd:

- -

The make install step installed the razerd.service file. Reboot or run the -following command as root to start the razerd daemon:

- -
-systemctl start razerd
-
- -

If you do not use systemd:

- -

To automatically start the required system daemon razerd at bootup time, you -need to install the init-script. This software package includes a generic -example script, that should work out-of-the-box on many Linux distributions. To -install it, invoke the following commands as root:

- -
-cp ./razerd.initscript /etc/init.d/razerd
-ln -s /etc/init.d/razerd /etc/rc2.d/S99razerd
-ln -s /etc/init.d/razerd /etc/rc5.d/S99razerd
-ln -s /etc/init.d/razerd /etc/rc0.d/K01razerd
-ln -s /etc/init.d/razerd /etc/rc6.d/K01razerd
-
- -

If you use udev:

- -

The make install step installed the udev script to

- -
-$(pkg-config --variable=udevdir udev)/rules.d/80-razer.rules
-
- -

This should work on most distributions.

- -

If udev notification does not work, try to reboot the system.

- -

RazerD Configuration

- -

The user may create a razerd configuration file in /etc/razer.conf which can be -used to specify various razerd options and initial hardware configuration -settings. -An example config file is included as razer.conf in this package. -If no configuration file is available, razerd will work with default settings.

- -

X Window System (X.ORG) Configuration

- -

If you don't have an xorg.conf, you don't have to do anything and it should work -out-of-the-box.

- -

X must not be configured to a specific mouse device like /dev/input/mouse0. On -configuration events, razerd may have to temporarily unregister the mouse from -the system. This will confuse X, if it's configured to a specific device. -Configure it to the generic /dev/input/mice device instead. This will enable X -to pick up the mouse again after a configuration event from razerd.

- -

Example xorg.conf snippet:

- -
-Section "InputDevice"
-    Identifier  "Mouse"
-    Driver  "mouse"
-    Option  "Device" "/dev/input/mice"
-EndSection
-
- -

Alternatively, do not specify a "Device" at all. X will autodetect the device -then:

- -
-Section "InputDevice"
-    Identifier  "Mouse"
-    Driver  "mouse"
-EndSection
-
- -

In any case, do NOT use: Option "Device" "/dev/input/mouseX"

- -

Using the tools

- -

To use the tools, the razerd daemon needs to be started as root, first. Without -the background daemon, nothing will work. The daemon is responsible for doing -the lowlevel hardware accesses and for tracking the current state of the device. -While the daemon is running, the user interfaces razercfg (commandline) and -qrazercfg (graphical user interface) can be used.

- -

Uninstalling

- -

If you installed razercfg with your distribution packaging system, use that to -uninstall razercfg.

- -

If you compiled razercfg from source and installed it with make install, you -can use the uninstall.sh script from the razercfg archive to uninstall -razercfg from the system. It must be called with the install prefix as its first -argument. That usually is /usr/local, unless specified otherwise in cmake. A -call to uninstall.sh might look like this:

- -
-./uninstall.sh /usr/local
-
- -

Architecture

- -

The architecture layout of the razer tools looks like this:

- -
- -------------------
-| hardware driver 0 |--v
- -------------------   |
-                       |    ----------
- -------------------   |   | lowlevel |     --------      ---------
-| hardware driver 1 |--x---| librazer |----| razerd |----| pyrazer |
- -------------------   |    ----------      --------      ---------
-                       |                        |           ^ ^ ^
- -------------------   |     ---------------------------    | | |
-| hardware driver n |--^    | (to be written) librazerd |   | | |
- -------------------         ---------------------------    | | |
-                                              ^ ^ ^         | | |
-                                              | | |         | | |
-                           ---------------    | | |         | | |
-                          | Application 0 |---^ | |         | | |
-                           ---------------      | |         | | |
-                                                | |         | | |
-                           ---------------      | |         | | |
-                          | Application 1 |-----^ |         | | |
-                           ---------------        |         | | |
-                                                  |         | | |
-                           ---------------        |         | | |
-                          | Application n |-------^         | | |
-                           ---------------                  | | |
-                                                            | | |
-                           ----------                       | | |
-                          | razercfg |----------------------^ | |
-                           ----------                         | |
-                                                              | |
-                           -----------                        | |
-                          | qrazercfg |-----------------------^ |
-                           -----------                          |
-                                                                |
-                            --------------------------          |
-                          | Other Python applications |---------^
-                           ---------------------------
-
- -

So in general, your application wants to access the razer devices through -pyrazer or (if it's not a python app) through librazerd. -(Note that librazerd is not written, yet. So currently the only way to access -the devices is through pyrazer). -Applications should never poke with lowlevel librazer directly, because there -will be no instance that keeps track of the device state and permissions and -concurrency.

- -

License

- -

Copyright (c) 2007-2016 Michael Büsch, et al.

- -

See the COPYING file for license information.

- Binary files /tmp/tmp502mqV/KU0MAOxV7q/razercfg-0.39+ds/README.pdf and /tmp/tmp502mqV/8gElGZDYGT/razercfg-0.39/README.pdf differ diff -Nru razercfg-0.39+ds/scripts/makerelease.sh razercfg-0.39/scripts/makerelease.sh --- razercfg-0.39+ds/scripts/makerelease.sh 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/scripts/makerelease.sh 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1,33 @@ +#!/bin/sh + +srcdir="$(dirname "$0")" +[ "$(echo "$srcdir" | cut -c1)" = '/' ] || srcdir="$PWD/$srcdir" + +srcdir="$srcdir/.." + +die() { echo "$*"; exit 1; } + +# Import the makerelease.lib +# http://bues.ch/gitweb?p=misc.git;a=blob_plain;f=makerelease.lib;hb=HEAD +for path in $(echo "$PATH" | tr ':' ' '); do + [ -f "$MAKERELEASE_LIB" ] && break + MAKERELEASE_LIB="$path/makerelease.lib" +done +[ -f "$MAKERELEASE_LIB" ] && . "$MAKERELEASE_LIB" || die "makerelease.lib not found." + +hook_get_version() +{ + local file="$1/ui/pyrazer/main.py" + version="$(cat "$file" | grep -e RAZER_VERSION | head -n1 | cut -d'"' -f2)" +} + +hook_post_checkout() +{ + default_hook_post_checkout "$@" + + # Remove firmware directory from release. + rm -r "$1/firmware" +} + +project=razercfg +makerelease "$@" diff -Nru razercfg-0.39+ds/ui/.gitignore razercfg-0.39/ui/.gitignore --- razercfg-0.39+ds/ui/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ razercfg-0.39/ui/.gitignore 2017-03-28 17:05:28.000000000 +0000 @@ -0,0 +1,2 @@ +build/ +setup.py