document what it does and tested boards
[linux-usb-otg] / usb-composite-all.sh
index 324a6ac..ecc3938 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -xe
+#!/bin/bash -e
 
 # this file is from: https://github.com/ckuethe/usbarmory/wiki/USB-Gadgets
 echo "creating composite mass-storage, serial, ethernet, hid..."
@@ -24,9 +24,9 @@ echo 0x0100 > bcdDevice # v1.0.0
 echo 0x0200 > bcdUSB # USB2
 
 mkdir -p strings/0x409
-echo "fedcba9876543210" > strings/0x409/serialnumber
-echo "girst" > strings/0x409/manufacturer 
-echo "Hardpass" > strings/0x409/product 
+echo "deadbeef00000001" > strings/0x409/serialnumber
+echo `uname -r` > strings/0x409/manufacturer 
+echo `hostname -s` > strings/0x409/product 
 
 N="usb0"
 mkdir -p functions/acm.gs0
@@ -35,10 +35,10 @@ mkdir -p functions/hid.$N
 mkdir -p functions/mass_storage.$N
 
 # first byte of address must be even
-HOST="aa:00:73:74:50:43" # "HostPC"
-SELF="aa:01:64:55:53:42" # "BadUSB"
-#echo $HOST > functions/ecm.$N/host_addr
-#echo $SELF > functions/ecm.$N/dev_addr
+HOST="48:6f:73:74:50:43" # "HostPC"
+SELF="42:61:64:55:53:42" # "BadUSB"
+echo $HOST > functions/ecm.$N/host_addr
+echo $SELF > functions/ecm.$N/dev_addr
 
 echo 1 > functions/mass_storage.$N/stall
 echo 0 > functions/mass_storage.$N/lun.0/cdrom