echo "pa 30 00" | cec-client
sets physical address to 3.0.0.0
- which is HDMI Port 3 - receiving remote control signals from different hdmi port
/boot/config.txt
add dtoverlay=dwc2
/boot/cmdline.txt
add modules-load=dwc2
(not dwc2,g_serial
- see below)
To fake the VendorID and ProductID to match those of the usb adapter one cant use the default "g_serial" module.
Alternative method found here
#!/bin/bash -e
modprobe libcomposite
cd /sys/kernel/config/usb_gadget/
mkdir g && cd g
echo 0x2548 > idVendor # pulse-8
echo 0x1001 > idProduct # Multifunction Composite Gadget
echo 0x0100 > bcdDevice # v1.0.0
echo 0x0200 > bcdUSB # USB 2.0
mkdir -p strings/0x409
echo "deadbeef00115599" > strings/0x409/serialnumber
echo "irq5 labs" > strings/0x409/manufacturer
echo "Pi Zero Gadget" > 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/
udevadm settle -t 5 || :
ls /sys/class/udc/ > UDC
use cat /dev/ttyGS0
(or xxd /dev/ttyGS0
for hex output) to show received messages.
send messages by calling echo "foo" > /dev/ttyGS0
(or echo -n -e '\x66\x6f\x6f' > /dev/ttyGS0
for hex input)
for macOS use Couch Slouch
check communication with above commands
To be continued ...