If you have the little brother, enabled for recording and CF with an external USB disk, you may be vexed that at start-up the display is blocked with a pop-up "USB is loading" followed by the Video/Music/Photo icons that also appear when you press Media (Yellow) in the media browser functions of the menu system.
Some old ideas based on sending (eg) 0 and Exit commands using ir, failed to defeat these icons consistently. However the observation that the icons don't appear on my HD-Fox setup with a 64GB SD card indicates that the presentation of the icons is a timing issue rather than some hard-coded start-up process in the HD-Fox settop binary.
Recently the following exchange prompted me to look at this again:
Notes
Some old ideas based on sending (eg) 0 and Exit commands using ir, failed to defeat these icons consistently. However the observation that the icons don't appear on my HD-Fox setup with a 64GB SD card indicates that the presentation of the icons is a timing issue rather than some hard-coded start-up process in the HD-Fox settop binary.
Recently the following exchange prompted me to look at this again:
andI just discovered how to wake up the disk controller.
...Code:echo "- - -" > /sys/class/scsi_host/host0/scan
A bit of investigation led to this as a minimal boot-time scriptIt seems you can [do this on the HD too].
On my boxecho "- - -" >/sys/class/scsi_host/host2/scan
Poking a bit more, both HD and HDR have host0, host1 and host2 and:
Code:humax ~ # cat /sys/class/scsi_host/host?/proc_name sata_svw sata_svw usb-storage
/mod/boot/xinit.d/a_usbdisk
that defeats the media icons for my system with an external 3.5" disk in a USB 2.0 SATA enclosure connected via an unpowered hub. I found that it typically took 2-3 iterations (and so seconds) for the usb-storage
node to appear.
Code:
#!/bin/sh
[ "$(cat /etc/model)" = HD ] || exit
# 5 might be enough
ii=10
while [ $ii -gt 0 ]; do
for dd in /sys/class/scsi_host/host?; do
# below would log progress to xinit.log
# printf "%s -> \"%s\"\n" "$dd/proc_name" "$(cat "$dd"/proc_name)"
# look for scsi_host of type usb-storage that isn't a virtual disk
if [ "$(cat "$dd"/proc_name)" = usb-storage ] &&
[ -z "$(grep -ls 'File-Stor Gadget' "$dd"/device/target*/*/model)" ]; then
# below would display hstn on the front panel
# /sbin/display "\$hst${dd##*/host}"
break 2
fi
done
ii=$((ii - 1))
sleep 1
done
exit 0
- The disk scan command as originally quoted turned out not to be relevant; all that was needed was for the USB device to have been recognised as a storage device before the settop binary hooked into it. Presumably the settop binary mounts the device if the disk scan command isn't used, but only shows the media icons for a "new storage medium", recognised when its
/sys/class/scsi_host/hostn
appears. - Also unnecessary was this fragment, intended to force-cold-plug USB devices:
for dd in /sys/bus/usb/devices/*/uevent; do echo add > "$dd"; done
- The test to ignore a virtual disk hasn't been seen to run, and it's possible that the
sysfs
entry being tested may not have been created at the point where it's being checked.
Last edited: