]> git.gir.st - sendHID.git/blob - README.md
added modified version of pass, the license for it, and a small demo for sending...
[sendHID.git] / README.md
1 # hardpass
2 A hardware password manager, built around a Paspberry Pi Zero and [`pass`, the UNIX password manager](https://passwordstore.org).
3
4 This is also an entry for [Hackaday.io](https://hackaday.io)'s Pi Zero Contest.
5
6 ## Hardware
7 I am using a Raspberry Pi Zero, since it has USB-OTG support and a lot of GPIO to interface an OLED screen, a button matrix for input and maybe even an ESP8266 for WiFi.
8 The OLED I am intending to use has an I²C interface and a screen diagonal of .96".
9
10 ## using the driver
11 To use this program, you have to enable the `libcomposite` driver on the Raspberry Pi and create a USB HID gadget.
12 You can use this bash script:
13 ```
14 #!/bin/bash
15 # this is a stripped down version of https://github.com/ckuethe/usbarmory/wiki/USB-Gadgets - I don't claim any rights
16
17 modprobe libcomposite
18 cd /sys/kernel/config/usb_gadget/
19 mkdir -p g1
20 cd g1
21 echo 0x1d6b > idVendor # Linux Foundation
22 echo 0x0104 > idProduct # Multifunction Composite Gadget
23 echo 0x0100 > bcdDevice # v1.0.0
24 echo 0x0200 > bcdUSB # USB2
25 mkdir -p strings/0x409
26 echo "fedcba9876543210" > strings/0x409/serialnumber
27 echo "girst" > strings/0x409/manufacturer
28 echo "Hardpass" > strings/0x409/product
29 N="usb0"
30 mkdir -p functions/hid.$N
31 echo 1 > functions/hid.usb0/protocol
32 echo 1 > functions/hid.usb0/subclass
33 echo 8 > functions/hid.usb0/report_length
34 echo -ne \\x05\\x01\\x09\\x06\\xa1\\x01\\x05\\x07\\x19\\xe0\\x29\\xe7\\x15\\x00\\x25\\x01\\x75\\x01\\x95\\x08\\x81\\x02\\x95\\x01\\x75\\x08\\x81\\x03\\x95\\x05\\x75\\x01\\x05\\x08\\x19\\x01\\x29\\x05\\x91\\x02\\x95\\x01\\x75\\x03\\x91\\x03\\x95\\x06\\x75\\x08\\x15\\x00\\x25\\x65\\x05\\x07\\x19\\x00\\x29\\x65\\x81\\x00\\xc0 > functions/hid.usb0/report_desc
35 C=1
36 mkdir -p configs/c.$C/strings/0x409
37 echo "Config $C: ECM network" > configs/c.$C/strings/0x409/configuration
38 echo 250 > configs/c.$C/MaxPower
39 ln -s functions/hid.$N configs/c.$C/
40 ls /sys/class/udc > UDC
41
42 ```
Imprint / Impressum