I would like to log the SNR on a certain satellite channel. Does anyone here how to do that?
(without using the remote control and writing it down of course)
abu_ilya
I would like to log the SNR on a certain satellite channel. Does anyone here how to do that?
(without using the remote control and writing it down of course)
abu_ilya
QuoteOriginally posted by abu_ilya
I would like to log the SNR on a certain satellite channel. Does anyone here how to do that?
(without using the remote control and writing it down of course)
abu_ilya
I figured it out (even though it is not as elegant, it works)
wget -O - --user=root --password=dreambox http://192.168.1.3/xml/streaminfo |grep snr |cut -d '>' --fields 2 |cut -d '%' --fields 1
now I can use this command in a script to log the snr and make a nice graph of it
regards,
abu_ilya
@ abu_ilya
It may seem like a stupid question
But is 192.168.1.3 the IP addr of you dreambox or PC.
QuoteOriginally posted by 1184jap
@ abu_ilya
It may seem like a stupid question
But is 192.168.1.3 the IP addr of you dreambox or PC.
dreambox
QuoteOriginal von abu_ilya
wget -O - --user=root --password=dreambox http://192.168.1.3/xml/streaminfo |grep snr |cut -d '>' --fields 2 |cut -d '%' --fields 1
Try something like this:
echo 'SNR, AGC, BER:' && wget -q -O - http://192.168.0.199/satFinder?|grep '<td align="center">'|sed -e 's/.*<td align="center">//' -e 's/<.*$//'
on your Dream:
root@dm600pvr:/> echo 'SNR, AGC, BER:' ...
Pzdr.J.P.
QuoteOriginal von pastupam
echo 'SNR, AGC, BER:' && wget -q -O - http://192.168.0.199/satFinder?|grep '<td align="center">'|sed -e 's/.*<td align="center">//' -e 's/<.*$//'
And now draft solution:
#!/bin/sh
i=1
echo 'Time;SNR;AGC;BER'>ala2.csv
echo '' > ala0
echo '' > ala
while [ $i -le 20 ]
do
uptime | sed '/ /s///g'|sed 's/up.*/;/' >> ala0
wget -q -O - http://192.168.0.199/satFinder?|grep '<td align="center">'|sed -e 's/.*<td align="center">//' -e 's/<.*$/;/' >> ala0
cat ala0 | tr -d '\n' >> ala
echo '' >> ala
i=`expr $i + 1`
echo ''> ala0
sleep 5s
done
sed -e 's/%//g' -e 's/;$//g' ala >> ala2.csv
more ala2.csv
Display More
As the result you will get the Excel file "ala2.csv" with the following columns:
"Time ---- SNR ---- AGC ---- BER"
Pzdr.J.P.
QuoteOriginal von pastupam
And now draft solution ...
Now, last but not least, I hope version:
#!/bin/sh
# get_snr ver. 1.0
# how many readings, eg.: nr_p=500 ; no spaces
nr_p=5
# next reading - pause, in sec, eg.: pau_se=5 ==> sleep 5s
# so, total scaninng time = nr_p * pau_se
pau_se=5
# put your DreamBox IP here
# !!! do not put spaces: "IP_DM = 192.168.0.199" !!!
IP_DM=192.168.0.199
# ----------------------------------------------------------
# !!!! write your USER NAME & PASSWORD here & no spaces !!!!
# ----------------------------------------------------------
use_er=root
pass_d=dreambox
# -------------------------- START -------------------------
echo '' > tmp_tmp
echo '' > tmp_all
# print actual date
echo ";;"`date` > snr_ber.csv
# print Transponder info: Name, Sat., Freq., FEC
echo >> snr_ber.csv
echo -n ';Name :;' >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<name>'|sed -e 's/.*<name>//' -e 's/<.*$//' >> snr_ber.csv
echo -n ';Sat. :;' >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<satellite>'|sed -e 's/.*<satellite>//' -e 's/<.*$//' >> snr_ber.csv
echo -n ";Freq. :;'" >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<frequency>'|sed -e 's/.*<frequency>//' -e 's/<.*$//' >> snr_ber.csv
echo -n ';Pol. :;' >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<polarisation>'|sed -e 's/.*<polarisation>//' -e 's/<.*$//' >> snr_ber.csv
echo -n ";FEC :;'" >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<fec>'|sed -e 's/.*<fec>//' -e 's/<.*$//' >> snr_ber.csv
echo >> snr_ber.csv
echo -n 'Nr;Time;SNR;AGC;BER;sync;lock' >> snr_ber.csv
i=1
wyn=''
wyn1=''
while [ "$i" -le "$nr_p" ]
do
# print nr=i ; 1 , 2 , 3 ...
echo "$i;" >> tmp_tmp
# display on TV screen: # = i ; all = nr_p
(wget -q -O - "http://$use_er:$pass_d@"$IP_DM"/cgi-bin/xmessage?timeout=1&caption=%20%20#%20/%20ALL&body=$i%20/%20$nr_p") > /dev/null
# print actual time: 13:24:20
uptime | sed '/ /s///g'|sed 's/up.*/;/' >> tmp_tmp
# print SNR , AGC , BER: 81;84;1735;
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/satFinder?|grep '<td align="center">'|sed -e 's/.*<td align="center">//' -e 's/<.*$/;/' >> tmp_tmp
# print sync: yes - 1 , no - 0
wyn=`wget -q -O - http://$use_er:$pass_d@"$IP_DM"/satFinder?|grep '<input name="sync" type="checkbox" value="on" disabled checked>'|sed -e 's/.*<input name="sync" type="checkbox" value="on" disabled checked> //' -e 's/<.*$/;/'`
wyn1='0'
if [ "$wyn" = SYNC ]; then wyn1='1'; fi
echo $wyn1';' >> tmp_tmp
# print lock: yes - 1 , no - 0
wyn=`wget -q -O - http://$use_er:$pass_d@"$IP_DM"/satFinder?|grep '<input name="lock" type="checkbox" value="on" disabled checked>'|sed -e 's/.*<input name="lock" type="checkbox" value="on" disabled checked> //' -e 's/<.*$/;/'`
wyn1='0'
if [ "$wyn" = LOCK ]; then wyn1='1'; fi
echo $wyn1';' >> tmp_tmp
# join, connect lines - delete line ending
cat tmp_tmp | tr -d '\n' >> tmp_all
echo '' > tmp_tmp
echo '' >> tmp_all
# display "." - i'am alive
echo -n '.'
i=`expr $i + 1`
sleep "$pau_se"s
done
echo
# delete ";" at the end of lines
sed -e 's/%//g' -e 's/;$//g' tmp_all >> snr_ber.csv
# remove temporary files
rm tmp_all
rm tmp_tmp
# display the file
more snr_ber.csv
# Pzdr.J.P.
exit 0
Display More
And the result:
;;Sat Aug 23 22:09:44 CEST 2008
;Name :;BBC R4 FM
;Sat. :;Eurobird1/Astra2A/2B/2C/2D (28.2E)
;Freq. :;'11951
;Pol. :;Horizontal
;FEC :;'2/3
Nr;Time;SNR;AGC;BER;sync;lock
1;22:09:45;85;85;0;1;1
2;22:09:51;85;85;0;1;1
3;22:09:57;85;85;0;1;1
4;22:10:02;85;85;0;1;1
5;22:10:08;85;85;0;1;1
Display More
Pzdr. J.P.
What did I do wrong?
The info part in csv file did not show up:-
Nr;Time;SNR;AGC;BER;sync;lock
1;22:09:45;85;85;0;1;1
2;22:09:51;85;85;0;1;1
3;22:09:57;85;85;0;1;1
4;22:10:02;85;85;0;1;1
5;22:10:08;85;85;0;1;1
QuoteOriginal von choco
What did I do wrong?
The info part in csv file did not show up:-
Nr;Time;SNR;AGC;BER;sync;lock
1;22:09:45;85;85;0;1;1
try this command from the shell:
or from your browser:
and tell if it is working.
Of course type your Dream IP, and your password.
Pzdr.J.P.
I got the same results as before...no info. Using DM7000. Result attached.
QuoteOriginal von choco
I got the same results as before...no info. Using DM7000. Result attached.
So, I see you don't have the "satFinder" part.
In this case, try command:
If it is working, please attach the file "test_html.txt", after execution of this command:
Optionally, you can use a browser, open the link:
and then attach source code of this page.
The next version I am testing at the moment, will be more universal and much more precise.
Pzdr. J.P.
File attached.
Strange!
On the first glimpse, the source of your "satFinder" page, seems to be exactly the same like mine.
And now sorry, simple but brutal question .
Have you changed lines 17, 18:
on, for instance:
???
Pzdr.J.P.
Without MY Dreambox IP and password, it wouldn't have even logged anything. I think I'll wait for the next version.
QuoteOriginal von chocoI think I'll wait for the next version.
And what about this:
#!/bin/sh
# snr_snoop ver. 2.0 , by pastupam
# fully tested on DB 600 pvr
# ---------------------------------
# how many reading points you want
# eg.: nr_p=500 ; no spaces
# nr_p=3
nr_p=5
# next reading - pause, in sec, eg.: pau_se=5 ==> sleep 5s
# so, total scaninng time = nr_p * pau_se
# pau_se=5
pau_se=5
# put your DreamBox IP here
# !!! do not put spaces: "IP_DM = 192.168.0.199" !!!
IP_DM=192.168.0.199
# ----------------------------------------------------------
# !!!! write your USER NAME & PASSWORD here & no spaces !!!!
# ----------------------------------------------------------
use_er=root
pass_d=root
# -------------------------- START -------------------------
# print actual date
echo ";;"`date` > snr_ber.csv
# print Transponder info: Name, Sat., Freq., FEC
echo >> snr_ber.csv
echo -n ';Name :;' >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<name>'|sed -e 's/.*<name>//' -e 's/<.*$//' >> snr_ber.csv
echo -n ';Sat. :;' >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<satellite>'|sed -e 's/.*<satellite>//' -e 's/<.*$//' >> snr_ber.csv
echo -n ";Freq. :;'" >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<frequency>'|sed -e 's/.*<frequency>//' -e 's/<.*$//' >> snr_ber.csv
echo -n ';Pol. :;' >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<polarisation>'|sed -e 's/.*<polarisation>//' -e 's/<.*$//' >> snr_ber.csv
echo -n ";FEC :;'" >> snr_ber.csv
wget -q -O - http://$use_er:$pass_d@"$IP_DM"/xml/streaminfo|grep '<fec>'|sed -e 's/.*<fec>//' -e 's/<.*$//' >> snr_ber.csv
echo >> snr_ber.csv
# print SatFind "csv" header
echo 'Nr;Time;AGC;AGC%;SNR;SNR%;snr100*dB;BER;status' >> snr_ber.csv
i=1
while [ "$i" -le "$nr_p" ]
do
# print nr=i ; 1 , 2 , 3 ...
echo "$i;" > tmp_tmp
# print actual time: 13:24:20
uptime | sed '/ /s///g'|sed 's/up.*/;/' >> tmp_tmp
# Sig: 55686 SNR: 55446 BER: 0 UBLK: 0 Stat: 0x7b [SIG LOCK ]
# get SIGNAL main info, using DVBSNOOP -> /usr/bin/dvbsnoop -h|more
xx=`dvbsnoop -pd 5 -hideproginfo -s signal -n 1|grep Sig:`
echo $xx > temp_x
# print AGC = Sig: "55686"
xx=`sed -e 's/^Sig: //' -e 's/ SNR.*$//' temp_x`
x_all=$xx';'
# normalize and print AGC [%]
xx=$(($(($xx*100))/65535))
x_all=$x_all$xx';'
# print SNR = SNR: "55446"
xx=`sed -e 's/.*SNR: //' -e 's/ BER.*$//' temp_x`
x_all=$x_all$xx';'
# normalize and print SNR [%]
x=$(($(($xx*100))/65535))
x_all=$x_all$x';'
# normalize to dB and print { SNR [dB] * 100 }
x=$(($(($xx*10-390750))/175 ))
x_all=$x_all$x';'
# print BER = BER: "0"
xx=`sed -e 's/.*BER: //' -e 's/ UBLK.*$//' temp_x`
x_all=$x_all$xx';'
# print STATUS of the signal: "0x7b [SIG LOCK ]"
xx=`sed -e 's/.*Stat: //' temp_x`
x_all=$x_all$xx
# processed SIGNAL line: $"agc;agc%;snr;snr%;snr%dB;ber;stat"
echo $x_all >> tmp_tmp
# join, connect lines - delete line ending
cat tmp_tmp | tr -d '\n' >> snr_ber.csv
echo >> snr_ber.csv
# display "." - i'am alive, in one line
echo -n '.'
# display on TV screen: # = i ; all = nr_p
# !!! if you want this option, delete # in next line !!!
# (wget -q -O - "http://$use_er:$pass_d@"$IP_DM"/cgi-bin/xmessage?timeout=1&caption=%20%20#%20/%20ALL&body=$i%2/%20$nr_p") > /dev/null
# increase counter; wait "$pau_se"s
i=`expr $i + 1`
sleep "$pau_se"s
done
# -------------------------- END -------------------------
# remove temporary files
rm tmp_tmp
rm temp_x
# display the file
echo
more snr_ber.csv
# Pzdr.J.P.
exit 0
Display More
Results:
root@dm600pvr:~> snr_snoop.sh
.....
;;Wed Aug 27 15:05:39 CEST 2008
;Name :;Classic FM
;Sat. :;Eurobird1/Astra2A/2B/2C/2D (28.2E)
;Freq. :;'12522
;Pol. :;Vertical
;FEC :;'2/3
Nr;Time;AGC;AGC%;SNR;SNR%;snr100*dB;BER;status
1;15:05:40;56961;86;55707;85;950;0;0x7b [SIG LOCK ]
2;15:05:45;56950;86;55788;85;955;0;0x7b [SIG LOCK ]
3;15:05:51;56952;86;55794;85;955;0;0x7b [SIG LOCK ]
4;15:05:56;56958;86;55725;85;951;0;0x7b [SIG LOCK ]
5;15:06:02;56950;86;55824;85;957;0;0x7b [SIG LOCK ]
root@dm600pvr:~>
Display More
Pzdr.J.P.
Tried this one on DM500 and DM7000.
This time there was no .csv file at all.
Maybe because it's not DM600?
QuoteOriginal von choco: Tried this one on DM500 and DM7000.
This time there was no .csv file at all.
Impossible.
The first 45 lines are exactly the same, like in the previous script,
so you should have, at least, the some results like before.
Had you changed propeties of the scrip file:
QuoteMaybe because it's not DM600?
Do not think so.
Pzdr.J.P.
Well I tried several times but all in vain. Could not believe it myself. I sincerely hope that somebody else will try it and say OK. But on my DM7000 or DM500, it simply would not work. One last thing, if I put back your previous script, I get the same results as before. Strange but true.Tx.
zur Zeit sind 23 Mitglieder (davon 2 unsichtbar) und 116 Gäste online - Record: 5,681 Users ()