# Help for reader for NETGEAR DG834GT

**URL:** <https://www.ruby-forum.com/t/help-for-reader-for-netgear-dg834gt/100618>\
**Category:** Ruby\
**Created:** [July 30, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/help-for-reader-for-netgear-dg834gt/100618 "2006-07-30T22:56:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![enzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@enzo](https://www.ruby-forum.com/u/enzo)\
**Post date:** [July 30, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/help-for-reader-for-netgear-dg834gt/100618/1 "2006-07-30T22:56:42Z")

</div>

Hi.

I don’t find the error  
this script should read the SNR margin of my adsl line from router and  
write it on txt file…  
like this but without window

> **[ImageShack - Best place for all of your image hosting and image sharing needs](https://imageshack.com/)**
>
> Unlimited space to host images, easy to use image uploader, albums, photo hosting, sharing, dynamic image resizing on web and mobile.

but there is an error in the script  
Can you help me?

require ‘open-uri’

log = File.new(“stats.log”, “a+”)  
data = []

while true do  
i = 0  
open(  
“[http://192.168.0.1/stattbl.html",:http\_basic\_authentication=\>["username](http://192.168.0.1/stattbl.html%22,:http_basic_authentication=%3E%5B%22username)”,  
“password”] ).each do |page|  
page.each do |html|  
case html  
when /\<span._\>.kbps\</span\>/  
html.each { |line|  
line.sub(/\<span.\>(._)kbps/) { data[i] = $1.strip }  
}  
i+=1  
end  
end  
end  
log.write “SNR: down(#{data[0]}) up(#{data[1]}) – #{Time.now.to\_s}\n”  
sleep 3  
end  
log.close

the error is

c:/ruby/lib/ruby/1.8/net/http.rb:2003:in `each_response_header': wrong header line format (Net::HTTP BadResponse) from c:/ruby/lib/ruby/1.8/net/http.rb:1977:in `read\_new’  
from c:/ruby/lib/ruby/1.8/net/http.rb:1044:in `request' from c:/ruby/lib/ruby/1.8/open-uri.rb:261:in `open\_http’  
from c:/ruby/lib/ruby/1.8/net/http.rb:543:in `start' from c:/ruby/lib/ruby/1.8/open-uri.rb:245:in `open\_http’  
from c:/ruby/lib/ruby/1.8/open-uri.rb:629:in `buffer_open' from c:/ruby/lib/ruby/1.8/open-uri.rb:167:in `open\_loop’  
from c:/ruby/lib/ruby/1.8/open-uri.rb:165:in `open_loop' from c:/ruby/lib/ruby/1.8/open-uri.rb:135:in `open\_uri’  
from c:/ruby/lib/ruby/1.8/open-uri.rb:531:in `open' from c:/ruby/lib/ruby/1.8/open-uri.rb:86:in `open’  
from reader.rb:8

thnks

---

<div class="post-metadata">

**Author:** ![enzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@enzo](https://www.ruby-forum.com/u/enzo)\
**Post date:** [July 31, 2006, 6:36pm UTC](https://www.ruby-forum.com/t/help-for-reader-for-netgear-dg834gt/100618/2 "2006-07-31T18:36:57Z")

</div>

☹

> the error is
> 
> …
> 
> thnks

---

<div class="post-metadata">

**Author:** ![enzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@enzo](https://www.ruby-forum.com/u/enzo)\
**Post date:** [August 5, 2006, 9:20am UTC](https://www.ruby-forum.com/t/help-for-reader-for-netgear-dg834gt/100618/3 "2006-08-05T09:20:35Z")

</div>

can anybody give an hand?

please

---

<div class="post-metadata">

**Author:** ![enzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@enzo](https://www.ruby-forum.com/u/enzo)\
**Post date:** [August 5, 2006, 2:39pm UTC](https://www.ruby-forum.com/t/help-for-reader-for-netgear-dg834gt/100618/4 "2006-08-05T14:39:03Z")

</div>

On Aug 5, 2006, at 12:20 AM, Enzo Crasi wrote:

> can anybody give an hand?

We don’t know what you want. Almost everything can be configured by  
simply pointing your browser to [routerlogin.net](http://routerlogin.net) and working from there.

* * *

Neither a man nor a crowd nor a nation can be trusted to act humanely  
or to think sanely under the influence of a great fear.

-Bertrand Russell, philosopher, mathematician, author, Nobel laureate  
(1872-1970)

---

<div class="post-metadata">

**Author:** ![enzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@enzo](https://www.ruby-forum.com/u/enzo)\
**Post date:** [August 5, 2006, 3:59pm UTC](https://www.ruby-forum.com/t/help-for-reader-for-netgear-dg834gt/100618/5 "2006-08-05T15:59:39Z")

</div>

Chris G. wrote:

> On Aug 5, 2006, at 12:20 AM, Enzo Crasi wrote:
> 
> > can anybody give an hand?
> 
> We don’t know what you want. Almost everything can be configured by  
> simply pointing your browser to [routerlogin.net](http://routerlogin.net) and working from there.
> 
> * * *
> 
> Neither a man nor a crowd nor a nation can be trusted to act humanely  
> or to think sanely under the influence of a great fear.
> 
> -Bertrand Russell, philosopher, mathematician, author, Nobel laureate  
> (1872-1970)

first of all thanks for the answer

then

> We don’t know what you want.

sorry, maybe it’s my fault  
I want that script run on windows by ruby and made a file with this  
line (like example) on it:

SNR: down(23.6 db), up(8.0 db) – sab ago 5 15:53:51 CEST 2006  
SNR: down(23.6 db), up(8.0 db) – sab ago 5 15:53:57 CEST 2006  
SNR: down(23.6 db), up(8.0 db) – sab ago 5 15:54:02 CEST 2006  
SNR: down(23.6 db), up(8.0 db) – sab ago 5 15:54:08 CEST 2006  
SNR: down(23.4 db), up(7.5 db) – sab ago 5 15:54:13 CEST 2006

but it gave me an error.I don’t find it! 😢

> Almost everything can be configured by  
> simply pointing your browser to [routerlogin.net](http://routerlogin.net) and working from there.

sorry but don’t understand
