#CustomerDisplay install
- Download and burn raspbian full : http://mirror.lagoon.nc/pub/downloads.raspberrypi.org/raspbian/images/
- Mount card on host pc. Will mount 2 partitions :
boot and system
- Create empty file named
ssh on boot partition in root folder
- Edit
config.txt
- Uncomment
hdmi_force_hotplug=1
- Append line
dtoverlay=dwc2
- On system partition, create file
/usr/bin/myusbgadget
chmod +x the file
- Set content
#!/bin/bash -e
modprobe libcomposite
cd /sys/kernel/config/usb_gadget/
mkdir g && cd g
echo 0x1d6b > idVendor # Linux Foundation
echo 0x0104 > idProduct # Multifunction Composite Gadget
echo 0x0100 > bcdDevice # v1.0.0
echo 0x0210 > bcdUSB # USB 2.1
echo 0xEF > bDeviceClass
echo 0x02 > bDeviceSubClass
echo 0x01 > bDeviceProtocol
mkdir -p strings/0x409
echo "deadbeef00115599" > strings/0x409/serialnumber
echo "Isi.nc" > strings/0x409/manufacturer
echo "PosCustomerScreen" > strings/0x409/product
# mkdir -p functions/acm.usb0 # serial
mkdir -p functions/rndis.usb0 # network
mkdir -p configs/c.1
echo 250 > configs/c.1/MaxPower
ln -s functions/rndis.usb0 configs/c.1/
# ln -s functions/acm.usb0 configs/c.1/
# OS descriptors
echo 1 > os_desc/use
echo 0xcd > os_desc/b_vendor_code
echo MSFT100 > os_desc/qw_sign
echo RNDIS > functions/rndis.usb0/os_desc/interface.rndis/compatible_id
echo 5162001 > functions/rndis.usb0/os_desc/interface.rndis/sub_compatible_id
ln -s configs/c.1 os_desc
udevadm settle -t 5 || :
ls /sys/class/udc/ > UDC
- On system partition, create file
/usr/lib/systemd/system/myusbgadget.service
# /usr/lib/systemd/system/myusbgadget.service
[Unit]
Description=My USB gadget
After=systemd-modules-load.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/myusbgadget
[Install]
WantedBy=sysinit.target
- On system partition, edit file
/etc/network/interfaces
iface usb0 inet static
address 192.168.42.1
netmask 255.255.255.0
broadcast 192.168.42.255
- Or create file
etc/network/interfaces.d/usb0 with same content