pmarek
September 26, 2017, 9:20am
#1
Hi all,
Hardware: Khadas VIM Pro
Software: Vim_Ubuntu-server-16.04_Linux-4.9_V170604
Main goal: Headless server (Home Automation - Domoticz)
Questions:
How to mount TF Card and USB Pendrive to the Ubuntu linux filesystem (which devices from /dev directory should I use to mount it) ?
How to configure audio output via SPDIF from Ubuntu ?
How to assign specific action (shell script) to the “Function Button” ?
Do you have tweak or advice for this problems ?
thank you
numbqq
September 26, 2017, 10:17am
#2
Insert TF Card or U-Disk and run command dmesg | tail -n 20
you will find the device node like this:
[ 799.495301] [aml_is_card_insert] card IN
[ 799.495365] normal card in
[ 799.781327] sd: new high speed SDHC card at address 59b4
[ 799.781410] sd: clock 50000000, 4-bit-bus-width
[ 799.792354] mmcblk1: sd:59b4 USD00 7.42 GiB
[ 799.811986] mmcblk1: p1 p2
[ 799.818489] Enter aml_emmc_partition_ops
[ 804.405078] usb 1-1.4: new high-speed USB device number 4 using xhci-hcd
[ 804.517727] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 804.522193] scsi host0: usb-storage 1-1.4:1.0
[ 805.569398] scsi 0:0:0:0: Direct-Access TOSHIBA TransMemory 1.00 PQ: 0 ANSI: 4
[ 805.579898] sd 0:0:0:0: [sda] 30310400 512-byte logical blocks: (15.5 GB/14.5 GiB)
[ 805.581842] sd 0:0:0:0: [sda] Write Protect is off
[ 805.581939] sd 0:0:0:0: [sda] Mode Sense: 45 00 00 00
[ 805.584403] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 805.600843] sda: sda1
[ 805.603676] sd 0:0:0:0: [sda] Attached SCSI removable disk
And you can try to mout it.
# mount /dev/mmcblk1p1 /mnt/
# mount /dev/sda1 /mnt/
You can try the following commands
# echo 1 > /sys/class/audiodsp/digital_raw
# echo audio_off > /sys/class/amhdmitx/amhdmitx0/config
Good luck!
What do you want to do? Do you mean execute the shell script when “Function Button” pushed?
Thanks.
pmarek
September 26, 2017, 4:44pm
#3
Exactly ! I would like to execute shell script by pressing function button.