Skip to content

Commit

Permalink
Merge branch 'deXol-developLinuxHidraw'
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Mar 18, 2019
2 parents 8e1a1c6 + 2dcc869 commit 67ef5fc
Show file tree
Hide file tree
Showing 11 changed files with 257 additions and 491 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Other clients could also connect and talk to the daemon (it uses a websocket con
The official Mooltipass App only works with Chrome as it relies on USB HID library that is only implemented in Chrome.
A Firefox (or any other browser) extension could easily be written by using the Moolticute daemon.

It is completely cross platform, and runs on Linux (using libusb), OS X (native IOKit API), and Windows (native HID API).
It is completely cross platform, and runs on Linux (using native hidraw API), OS X (native IOKit API), and Windows (native HID API).

### Downloads
Packages are build and available here: https://github.com/mooltipass/moolticute/releases
Expand All @@ -33,25 +33,25 @@ Packages are build and available here: https://github.com/mooltipass/moolticute/

##### Linux
- Requires the qt-dbus module
- Requires libusb and a [udev rule](https://github.com/bobsaintcool/mooltipass-udev) for it
- Requires to install [udev rule](https://github.com/bobsaintcool/mooltipass-udev) for it

##### Ubuntu 16.04
```bash
sudo apt install libqt5websockets5-dev libusb-dev libusb-1.0-0-dev qt-sdk qt5-qmake qt5-default
sudo apt install libqt5websockets5-dev qt-sdk qt5-qmake qt5-default
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/50-mooltipass.rules
sudo udevadm control --reload-rules
```

##### Arch Linux
```bash
sudo pacman -S --needed qt5-websockets libusb qt5-base
sudo pacman -S --needed qt5-websockets qt5-base
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/50-mooltipass.rules
sudo udevadm control --reload-rules
```

##### Fedora Linux
```bash
sudo dnf install libusb libusb-devel gcc-c++ qt5 qt5-qtwebsockets qt5-qtwebsockets-devel qt5-qttools-devel
sudo dnf install gcc-c++ qt5 qt5-qtwebsockets qt5-qtwebsockets-devel qt5-qttools-devel
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/50-mooltipass.rules
sudo udevadm control --reload-rules
```
Expand Down
2 changes: 1 addition & 1 deletion daemon.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ win32 {
} else:linux {
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
PKGCONFIG += libusb-1.0
PKGCONFIG += libudev
QT -= widgets
} else:mac {
LIBS += -framework ApplicationServices -framework IOKit -framework CoreFoundation -framework Cocoa -framework Foundation
Expand Down
6 changes: 3 additions & 3 deletions data/moolticute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ function install_udev_rule()

tmpfile=$(mktemp /tmp/mc-udev.XXXXXX)
cat > "$tmpfile" <<- EOF
# udev rules for allowing console user(s) and libusb access to Mooltipass Mini devices
# udev rules for allowing console user(s) and hidraw access to Mooltipass Mini devices
ACTION!="add|change", GOTO="mooltipass_end"
# console user
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", MODE="0660", SYMLINK+="mooltipass_keyboard", TAG+="uaccess"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="4321", MODE="0660", SYMLINK+="mooltipass_keyboard", TAG+="uaccess"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", MODE="0660", SYMLINK+="mooltipass_keyboard", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="4321", MODE="0660", SYMLINK+="mooltipass_keyboard", TAG+="uaccess", TAG+="udev-acl"
# libusb
SUBSYSTEM=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", MODE="0660", SYMLINK+="mooltipass_device", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="4321", MODE="0660", SYMLINK+="mooltipass_device", TAG+="uaccess"
Expand Down
42 changes: 29 additions & 13 deletions debian/README
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,55 @@ Moolticute

[![License](https://img.shields.io/badge/license-GPLv3%2B-blue.svg)](http://www.gnu.org/licenses/gpl.html)

[![Build Status](https://travis-ci.org/raoulh/moolticute.svg?branch=master)](https://travis-ci.org/raoulh/moolticute)
[![Build Status](https://travis-ci.org/mooltipass/moolticute.svg?branch=master)](https://travis-ci.org/mooltipass/moolticute)

This project aims to be an easy companion to your [Mooltipass](http://www.themooltipass.com) device and extend
the power of the device to more platform/tools.
With it you can manage your Mooltipass with a crossplatform app, as well as provide a daemon service that
With it you can manage your Mooltipass with a cross-platform app, as well as provide a daemon service that
handle all USB communication with the device.

This tool is written with a daemon that runs in background, and a user interface app to control you Mooltipass.
Other clients could also connect and talk to the daemon (it uses a websocket connection and simple JSON messages).
The official Mooltipass App only works with Chrome as it relies on USB HID library that is only implemented in Chrome.
A Firefox (or any other browser) extension could easily be written by using the Moolticute daemon.

It is completely cross platform, and runs on Linux (using libusb), OS X (native IOKit API), and Windows (native HID API).

> Warning! This project is a work in progress!
It is completely cross platform, and runs on Linux (using native hidraw API), OS X (native IOKit API), and Windows (native HID API).

### Downloads
Packages are build and available here: https://calaos.fr/mooltipass/
Packages are build and available here: https://github.com/mooltipass/moolticute/releases

### Dependencies

##### Windows, Linux, OSX
- Requires Qt 5.6 or higher.
- Those Qt5 modules are required:
- qt-base, qt-widgets, qt-gui, qt-network, qt-websockets
- These Qt5 modules are required:
- qt-core
- qt-gui
- qt-widgets
- qt-network
- qt-websockets

##### Linux
- Requires libusb
- Requires a [udev rule for libusb](https://github.com/bobsaintcool/mooltipass-udev)
- Requires the qt-dbus module
- Requires to install [udev rule](https://github.com/bobsaintcool/mooltipass-udev) for it

##### Ubuntu 16.04
```bash
sudo apt install libqt5websockets5-dev libusb-dev libusb-1.0-0-dev qt-sdk qt5-qmake qt5-default
sudo apt install libqt5websockets5-dev qt-sdk qt5-qmake qt5-default
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/50-mooltipass.rules
sudo udevadm control --reload-rules
```

##### Arch Linux
```bash
sudo pacman -S --needed qt5-websockets libusb qt5-base
sudo pacman -S --needed qt5-websockets qt5-base
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/50-mooltipass.rules
sudo udevadm control --reload-rules
```

##### Fedora Linux
```bash
sudo dnf install gcc-c++ qt5 qt5-qtwebsockets qt5-qtwebsockets-devel qt5-qttools-devel
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/50-mooltipass.rules
sudo udevadm control --reload-rules
```
Expand All @@ -59,7 +68,9 @@ Two method can be used to build, by using QtCreator IDE, or from command line (t

- Download and install the Qt SDK from their [website](http://qt.io)
- Start Qt-Creator
- Open the main Moolticute.pro project file
- Open the main Moolticute.pro project file
- Note for Windows users: make sure that you select a "kit" that uses the MinGW compiler.
Moolticute currently won't compile successfully on the Microsoft Visual C++ compiler.
- Click on the "play" button to build and run

##### Command line
Expand All @@ -85,6 +96,11 @@ On Gentoo, a wrapper is created for qmake, so this command should be used:
qmake -qt=5 ../Moolticute.pro
```

On Fedora, use this qmake command:
```
qmake-qt5 ../Moolticute.pro
```

### Licensing

Moolticute is free software; you can redistribute it and/or modify it under the terms of the GNU Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Expand Down
6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ Source: moolticute
Section: utils
Priority: optional
Maintainer: Mooltipass Team <support@themooltipass.com>
Build-Depends: debhelper (>=9), tar (>=1.27.1), gzip (>=1.6), libqt5websockets5-dev, libusb-1.0-0-dev, qt5-qmake, qttools5-dev-tools, pkg-config
Build-Depends: debhelper (>=9), tar (>=1.27.1), gzip (>=1.6), libqt5websockets5-dev, libudev-dev, qt5-qmake, qttools5-dev-tools, pkg-config
Standards-Version: 3.9.7
Homepage: https://www.themooltipass.com/
Vcs-Git: https://github.com/mooltipass/moolticute.git
Vcs-Browser: https://github.com/mooltipass/moolticute

Package: moolticute
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5core5a, libqt5gui5, libqt5network5, libqt5websockets5, libqt5widgets5, libqt5dbus5, libusb-1.0-0
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5core5a, libqt5gui5, libqt5network5, libqt5websockets5, libqt5widgets5, libqt5dbus5, libudev
Description: Mooltipass cross platform daemon/tools
This project aims to be an easy companion to your Mooltipass device and extend
the power of the device to more platform/tools. With it you can manage your
Expand All @@ -25,6 +25,6 @@ Description: Mooltipass cross platform daemon/tools
library that is only implemented in Chrome. A Firefox (or any other browser)
extension could easily be written by using the Moolticute daemon.
.
It is completely cross platform, and runs on Linux (using libusb),
It is completely cross platform, and runs on Linux (using hidraw API),
OS X (native IOKit API), and Windows (native HID API).

2 changes: 2 additions & 0 deletions src/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#define MOOLTIPASS_BLE_VENDORID 0x1209
#define MOOLTIPASS_BLE_PRODUCTID 0x4321

#define MOOLTIPASS_USBHID_DESC_SIZE 28

#define MOOLTIPASS_FAV_MAX 14
#define MOOLTIPASS_ADDRESS_SIZE 4
#define MP_NODE_SIZE 132
Expand Down
Loading

0 comments on commit 67ef5fc

Please sign in to comment.