svn co http://svn.enlightenment.org/svn/e/trunk/BINDINGS/python/python-elementary/tests python-elementary-tests/usr/share/applications
action: suspend mdbus2 -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.Suspend
LANG=de_DE.UTF-8 navitUm z.B. 10 Sekunden in einer Datei zu speichern und direkt danach abzuspielen:
alsactl -f /usr/share/openmoko/scenarios/voip-handset.state restore
arecord -D hw -f cd -V mono -d 10 -t wav /tmp/recorded.wav
alsactl -f /usr/share/openmoko/scenarios/stereoout.state restore
aplay /tmp/recorded.wav
(Das "-V mono" kann man ruhig weglassen, ist nur zur Darstellung da) - für Details bei der Aufnahme siehe "man arecord"
Ein exklusives Babyfon oder was auch immer... ;)
Auf dem anderen Rechner (dort, wo der Sound ankommen soll - in diesem Beispiel hat er die IP Adresse "192.168.0.1" und wir benutzen port "9999"):
nc -u -l -s 192.168.0.1 -p 9999 | aplay
Auf dem Moko:
alsactl -f /usr/share/openmoko/scenarios/voip-handset.state restore
arecord -D hw -f cd -q -t wav | nc -u 192.168.0.1 9999
alsactl -f /usr/share/openmoko/scenarios/stereoout.state restore
# SCRIPTS
script_incoming_call=/usr/sbin/alsactl -f /usr/share/openmoko/scenarios/stereoout.state restore
script_in_call_answered=/usr/sbin/alsactl -f /usr/share/openmoko/scenarios/voip-headset-earphone.state restore
script_in_call_failed=
script_outgoing_call=/usr/sbin/alsactl -f /usr/share/openmoko/scenarios/voip-headset-earphone.state restore
script_out_call_answered=
script_out_call_failed=/usr/sbin/alsactl -f /usr/share/openmoko/scenarios/stereoout.state restore
script_local_release=/usr/sbin/alsactl -f /usr/share/openmoko/scenarios/stereoout.state restore
script_remote_release=/usr/sbin/alsactl -f /usr/share/openmoko/scenarios/stereoout.state restore
mknod /dev/mmcblk0 b 179 0
mknod /dev/mmcblk0p1 b 179 1
mknod /dev/mmcblk0p2 b 179 2
dd if=/dev/zero of=/swapfile bs=1M count=256mkswap /swapfile/swapfile none swap sw 0 0swapon -a
Um Bootparameter, Bootmenue etc. zu aendern:
# apt-get install fso-utils # from FSO
# mkdir /tmp/uboot && cd /tmp/uboot
# dfu-util -a u-boot_env -U env.u-boot
# uboot-envedit -i env.u-boot -p > env_modified.u-boot.txt
env_modified.u-boot.txt nach belieben editieren
# uboot-envedit -i env.u-boot -f env_modified.u-boot.txt -o env_modified.u-boot
# dfu-util -a u-boot_env -D env_modified.u-boot
/sys/devices/platform/sc32440_fiq.0/neo1973-vibrator.0/leds:neo1973:vibrator/brightness/ect/rc.local (gruppe "led" und "vibration" für die leds/vibration erstellt):
chown :vibration /sys/class/leds/neo1973:vibrator/brightness
chown :video /sys/class/backlight/gta02-bl/brightness
chown :leds /sys/class/leds/gta02-aux:red/brightness
chown :leds /sys/class/leds/gta02-power:orange/brightness
chown :leds /sys/class/leds/gta02-power:blue/brightness
chmod g+rw /sys/class/leds/neo1973:vibrator/brightness
chmod g+rw /sys/class/backlight/gta02-bl/brightness
chmod g+rw /sys/class/leds/gta02-aux:red/brightness
chmod g+rw /sys/class/leds/gta02-power:orange/brightness
chmod g+rw /sys/class/leds/gta02-power:blue/brightness
/etc/udev/rules.d/55-freerunner-accelerometer.rules mit folgendem Inhalt erstellen:SUBSYSTEM=="input", ATTRS{name}=="lis302-1 (top)", SYMLINK+="accelerometer-top", GROUP="accelerometer", MODE="0664"
SUBSYSTEM=="input", ATTRS{name}=="lis302-2 (bottom)", SYMLINK+="accelerometer-bottom", GROUP="accelerometer", MODE="0664"
mdbus2 -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy Display enabled
anwendung starten...
mdbus2 -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy Display auto
/sys/class/backlight/gta02-bl/
/etc/network/interfaces (208.67.222.222 kann man auch ersetzen durch einen eigenen DNS server, dieser verweist auf opendns.com) die Zeile pre-up /usr/local/skripte/paketfilter ist ebenfalls optional, startet halt meinen paketfilter:
auto usb0
iface usb0 inet static
address 192.168.0.202
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.200
pre-up /usr/local/skripte/paketfilter
up rm /etc/resolv.conf
up echo nameserver 208.67.222.222 >/etc/resolv.conf
/etc/network/interfaces (das iptables zeug kann man sich schenken wenn man eh keinen Paketfilter benutzt):
allow-hotplug usb0
iface usb0 inet static
address 192.168.0.200
netmask 255.255.255.0
network 192.168.0.0
post-up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -P FORWARD ACCEPT
down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24
down echo 0 > /proc/sys/net/ipv4/ip_forward
down iptables -P FORWARD DROP