|
|
 |
logging SNR |
abu_ilya
Newbie

Registration Date: 19.09.2005
Posts: 68
Which box: DM 7020S External Storage: HDD Which Image: Gemini
 |
|
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
|
|
31.07.2008 13:51 |
|
|
abu_ilya
Newbie

Registration Date: 19.09.2005
Posts: 68
Which box: DM 7020S External Storage: HDD Which Image: Gemini
Thread Starter
 |
|
| quote: |
Originally 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
|
|
05.08.2008 21:28 |
|
|
1184jap
Newbie
Registration Date: 17.02.2006
Posts: 75
Which box: DM 8000HD External Storage: HDD Which Image: Gemini Origin: Ireland
 |
|
@ abu_ilya
It may seem like a stupid question
But is 192.168.1.3 the IP addr of you dreambox or PC.
|
|
06.08.2008 00:11 |
|
|
idreamsat
V.I.P.
  

Registration Date: 09.06.2005
Posts: 911
Which box: DM 8000HD External Storage: HDD Which accessories: USB - CF - HDD Which Image: Gemini Welcher Bildschirm: Sony Bavaria XBR Origin: NW, US
 |
|
|
06.08.2008 06:08 |
|
|
pastupam
Newbie
Registration Date: 31.03.2007
Posts: 24
Which box: DM 600PVR-S; DM 800S External Storage: USB-Stick; HDD Which Image: Gemini Welcher Bildschirm: TV Origin: Poland, Szczecin
 |
|
| quote: |
Original von pastupam
And now draft solution ... |
Now, last but not least, I hope version:
| code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
|
#!/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 |
|
And the result:
| code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
|
;;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 |
|
Pzdr. J.P.
This post has been edited 4 time(s), it was last edited by pastupam: 25.08.2008 23:39.
|
|
23.08.2008 22:23 |
|
|
choco
Newbie
Registration Date: 25.02.2006
Posts: 62
Which box: DM 500S External Storage: NFS Which Image: Gemini Origin: malta
 |
|
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
|
|
24.08.2008 12:17 |
|
|
pastupam
Newbie
Registration Date: 31.03.2007
Posts: 24
Which box: DM 600PVR-S; DM 800S External Storage: USB-Stick; HDD Which Image: Gemini Welcher Bildschirm: TV Origin: Poland, Szczecin
 |
|
| quote: |
Original 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:
| code: |
1:
|
root@dm600pvr:~> wget -q -O - http://root:dreambox@192.168.0.199/xml/streaminfo |
|
or from your browser:
| code: |
1:
|
http://192.168.0.199/xml/streaminfo |
|
and tell if it is working.
Of course type your Dream IP, and your password.
Pzdr.J.P.
|
|
24.08.2008 14:59 |
|
|
choco
Newbie
Registration Date: 25.02.2006
Posts: 62
Which box: DM 500S External Storage: NFS Which Image: Gemini Origin: malta
 |
|
I got the same results as before...no info. Using DM7000. Result attached.
|
|
24.08.2008 15:53 |
|
|
pastupam
Newbie
Registration Date: 31.03.2007
Posts: 24
Which box: DM 600PVR-S; DM 800S External Storage: USB-Stick; HDD Which Image: Gemini Welcher Bildschirm: TV Origin: Poland, Szczecin
 |
|
| quote: |
Original 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:
| code: |
1:
|
wget -q -O - http://root:root@192.168.0.199/satFinder? |
|
If it is working, please attach the file "test_html.txt", after execution of this command:
| code: |
1:
|
wget -q -O - http://root:root@192.168.0.199/satFinder?>test_html.txt |
|
Optionally, you can use a browser, open the link:
| code: |
1:
|
http://192.168.0.199/satFinder? |
|
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.
|
|
24.08.2008 23:06 |
|
|
choco
Newbie
Registration Date: 25.02.2006
Posts: 62
Which box: DM 500S External Storage: NFS Which Image: Gemini Origin: malta
 |
|
|
25.08.2008 16:41 |
|
|
pastupam
Newbie
Registration Date: 31.03.2007
Posts: 24
Which box: DM 600PVR-S; DM 800S External Storage: USB-Stick; HDD Which Image: Gemini Welcher Bildschirm: TV Origin: Poland, Szczecin
 |
|
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:
| code: |
1:
2:
3:
|
# write your user name & password here
use_er=root
pass_d=root |
|
on, for instance:
| code: |
1:
2:
|
use_er=root
pass_d=dreambox |
|
???
Pzdr.J.P.
|
|
25.08.2008 20:13 |
|
|
choco
Newbie
Registration Date: 25.02.2006
Posts: 62
Which box: DM 500S External Storage: NFS Which Image: Gemini Origin: malta
 |
|
Without MY Dreambox IP and password, it wouldn't have even logged anything. I think I'll wait for the next version.
|
|
26.08.2008 18:09 |
|
|
pastupam
Newbie
Registration Date: 31.03.2007
Posts: 24
Which box: DM 600PVR-S; DM 800S External Storage: USB-Stick; HDD Which Image: Gemini Welcher Bildschirm: TV Origin: Poland, Szczecin
 |
|
| quote: |
| Original von chocoI think I'll wait for the next version. |
And what about this:
| code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
|
#!/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 |
|
Results:
| code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
|
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:~> |
|
Pzdr.J.P.
This post has been edited 2 time(s), it was last edited by pastupam: 27.08.2008 23:16.
|
|
27.08.2008 15:15 |
|
|
choco
Newbie
Registration Date: 25.02.2006
Posts: 62
Which box: DM 500S External Storage: NFS Which Image: Gemini Origin: malta
 |
|
Tried this one on DM500 and DM7000.
This time there was no .csv file at all.
Maybe because it's not DM600?
|
|
27.08.2008 16:11 |
|
|
pastupam
Newbie
Registration Date: 31.03.2007
Posts: 24
Which box: DM 600PVR-S; DM 800S External Storage: USB-Stick; HDD Which Image: Gemini Welcher Bildschirm: TV Origin: Poland, Szczecin
 |
|
| quote: |
Original 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:
| code: |
1:
|
chmod 775 snr_snoop.sh |
|
| quote: |
| Maybe because it's not DM600? |
Do not think so.
Pzdr.J.P.
|
|
27.08.2008 23:25 |
|
|
choco
Newbie
Registration Date: 25.02.2006
Posts: 62
Which box: DM 500S External Storage: NFS Which Image: Gemini Origin: malta
 |
|
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.
|
|
28.08.2008 16:37 |
|
|
|
|
|
 |
|