This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pi@raspberrypi ~/hack $ dmesg | |
... | |
[ 23.603277] usb 1-1.2: new low-speed USB device number 5 using dwc_otg | |
[ 23.710086] usb 1-1.2: New USB device found, idVendor=1130, idProduct=0002 | |
[ 23.710116] usb 1-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0 | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### iBuddy Device Class | |
class iBuddyDevice: | |
USB_VENDOR = 0x1130 | |
USB_PRODUCT = int(0x0001) # <-- change this | |
BATTERY = 0 | |
SETUP = (0x22, 0x09, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00) | |
MESS = (0x55, 0x53, 0x42, 0x43, 0x00, 0x40, 0x02) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias mci='$HOME/scripts/ibuddy.sh mvn clean install' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function send_commands() { | |
for command in $*; do | |
echo 1 > /proc/driver/ibuddy/0/$command | |
done | |
} | |
function send_multiple_times() { | |
for f in $(seq 1 $2); do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2013 Shazam Entertainment Limited | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. | |
* | |
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | |
*/ | |
package com.shazam.shazamcrest; |