|
2010-01-04
, 01:06
|
Posts: 63 |
Thanked: 23 times |
Joined on Dec 2008
|
#92
|
|
2010-01-04
, 01:08
|
Posts: 152 |
Thanked: 41 times |
Joined on Dec 2009
@ Sydney
|
#93
|
I was trying to get the exact same thing running and it's great that someone got it working! =)
Anyway, I hit a bump trying to follow your steps:
Nokia-N900-42-11:~# visudo
visudo: no editor found (editor path = /bin/vi)
Any clue? I'm using an ssh connection and logged in as root.
ln -s /usr/bin/vim /bin/vi
The Following 2 Users Say Thank You to DaveQB For This Useful Post: | ||
|
2010-01-04
, 01:09
|
Posts: 63 |
Thanked: 23 times |
Joined on Dec 2008
|
#94
|
|
2010-01-04
, 01:20
|
Posts: 63 |
Thanked: 23 times |
Joined on Dec 2008
|
#95
|
|
2010-01-04
, 01:24
|
Posts: 152 |
Thanked: 41 times |
Joined on Dec 2009
@ Sydney
|
#96
|
|
2010-01-04
, 01:29
|
Posts: 63 |
Thanked: 23 times |
Joined on Dec 2008
|
#97
|
|
2010-01-04
, 01:32
|
Posts: 152 |
Thanked: 41 times |
Joined on Dec 2009
@ Sydney
|
#98
|
|
2010-01-04
, 07:11
|
|
Posts: 2,142 |
Thanked: 2,054 times |
Joined on Dec 2006
@ Sicily
|
#99
|
The Following 4 Users Say Thank You to debernardis For This Useful Post: | ||
|
2010-01-04
, 08:38
|
|
Posts: 20 |
Thanked: 15 times |
Joined on Nov 2009
@ Turku, Finland
|
#100
|
#!/bin/bash fmtx_client|grep disabled > /dev/null if [ $? -eq 0 ]; then fmtx_client -p 1 > /dev/null fmtx_client -f 106900 > /dev/null echo 118 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level echo "RF Enabled @106.90 with power `cat /sys/class/i2c-adapter/i2c-2/2-0063/power_level`" else fmtx_client -p 0 echo "RF Disabled" fi exit 0
user ALL = NOPASSWD: /usr/local/bin/toggleradio.sh
apt-get install bash
#!/bin/sh #N900 FM transmitter toggler #Establishing funtions enableFM () { fmtx_client -p1 > /dev/null if [ $freq ]; then fmtx_client -f$freq > /dev/null fi echo $power > /sys/class/i2c-adapter/i2c-2/2-0063/power_level freq=`fmtx_client |grep frequency=|awk '{print int(substr($1,11))/1000};'` echo "RF Enabled @"$freq" with power `cat /sys/class/i2c-adapter/i2c-2/2-0063/power_level`" return 0 } disableFM () { fmtx_client -p 0 > /dev/null echo "RF Disabled" return 0 } usage () { echo "Usage:" echo " By default the script sets the power to 118 and does not mess with your default frequency, if you just run it." echo " Optional parameter one let's you define the transmission power manually" echo " Optional parameter two let's you define the frequency manually (eg. 106900 for 106.9)" exit 0 } #Very simple command line parsing case "$1" in [0-9]* ) power=$1;; [A-Za-z\-]* ) usage;; * ) power=118;; esac case "$2" in [0-9]* ) freq=$2;; * ) esac fmtx_client|grep disabled > /dev/null if [ $? = 0 ]; then enableFM else disableFM fi exit 0
The Following 8 Users Say Thank You to slavikko For This Useful Post: | ||
I have put those two files you create in that in a tarball you get download onto the N900 directly.
So run this as root:
Last edited by DaveQB; 2010-01-05 at 23:21. Reason: Typo, again