Announcement

Collapse
No announcement yet.

Problems with SpeedStream 5260 Ethernet ADSL modem. Help with a linux script?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems with SpeedStream 5260 Ethernet ADSL modem. Help with a linux script?

    Hello, I was wondering/hoping if anyone could help me with this. My DSL connection uses a SpeedStream 5260 ADSL modem, I upgraded it to a 5660 through a hack on the net in the hopes it would help my problem. It didn't so I'm posting here, since there are a lot of smart people here.

    What happens is that whenever I have any upstream usage it overheats. It's quite cool in my room and yet this thing is like a overclocked AMD. What I'd like to do is perhaps have a script that runs ping every so often on my server to make sure the connection is still alive. Then if it's not, to do an 'ifconfig eth0 10.0.0.1' (the DSL modem's IP addresss) then there is a command to do a reboot (which usually fixes the connection problems) and then run dhcpcd again to bring the connection back up, and to also run dns2go so that it'll put my website back onto the net.

    Of course a better idea would be to get it so it doesn't overheat. I tried putting some silicon compound between the heatsink and the metal piece (for some reason they're just held together by a metal clamp and not very well). Any ideas would be MOST appreciated. Sorry if this seems like it's in the wrong forum, but I need help with a linux script or something to do this on. Could be an interesting project.

    Leech
    Wah! Wah!

    In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship.

  • #2
    1. I vote for Perl.

    2. I think you should get the modem replaced anyway. If it's really overheating, it doesn't have long to live.
    Gigabyte P35-DS3L with a Q6600, 2GB Kingston HyperX (after *3* bad pairs of Crucial Ballistix 1066), Galaxy 8800GT 512MB, SB X-Fi, some drives, and a Dell 2005fpw. Running WinXP.

    Comment


    • #3
      Yeah, Perl is the way I was going to go, since that's the only thing I know how to program in (well, I know a little perl).

      As far as replacing it, I've had it over a year and it's kind of always had this problem, though I think it has gotten worse overtime. I'll look into getting that replaced.

      Leech
      Wah! Wah!

      In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship.

      Comment


      • #4
        Sounds like a typical job for an ordinary shell-script. No need to use perl, the way I see it. Just put it in your crontab and set it to run once every 5 minutes or so.

        Code:
        #!/bin/bash
        if [ `ping -c1 192.71.220.10|grep icmp|wc -l` -eq 0 ]; then
                /sbin/ifconfig eth0 10.0.0.1
                /sbin/reboot
        fi
        I'm not quite sure why you want to set the eth0 to 10.0.0.1, since you want to reboot the machine anyway. But this is what you said

        The dhcpcd and dns2go should be started from one of your system start-up scripts, not this one.

        Comment


        • #5
          I think he means reboot the modem?
          P4 Northwood 1.8GHz@2.7GHz 1.65V Albatron PX845PEV Pro
          Running two Dell 2005FPW 20" Widescreen LCD
          And of course, Matrox Parhelia | My Matrox histroy: Mill-I, Mill-II, Mystique, G400, Parhelia

          Comment


          • #6
            That's what I thought too, bu tI wasn't sure

            Anyway, just replace the /sbin/reboot with whatever you use to reboot the modem.. And remember folks, netcat is your friend

            Comment


            • #7
              Yeah, I want to reboot the modem, not the machine. The only time that machine has gone down at all is when the power goes out. Thanks for the code snippet, I'll give it a try.

              10.0.0.1 is to log into the modem, http://www.dslreports.com/faq/efficient is the faq I found on this. I do realize that dns2go should be in the init script, and dhcpcd IS in there, I just want to have it restarted because sometimes the lease on the IP address has to be renewed (though that's only about once every few months (I have no idea why)).

              Leech
              Last edited by leech; 2 August 2002, 08:41.
              Wah! Wah!

              In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship.

              Comment


              • #8
                Ok, to get it to reset the modem I have to set eth0 to 10.0.0.2, then 'telnet 10.0.0.1' and then the command prompt pops up for the modem. And the command is then 'reboot' but it then asks 'Are you sure? default: n [y,n]'

                So now my question is, can I get telnet to send those commands to it, then after that I could just have it restart dhcpcd and all would be good. Thanks for all the help guys.

                Leech
                Wah! Wah!

                In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship.

                Comment


                • #9
                  Your options are either to have your script just type characters to the outbound telnet port, and use sleep() calls to time them, or you could use a little bit of Expect to handle the whole telnet easily. http://mini.net/tcl/201
                  You should find some example code without much trouble.
                  Gigabyte P35-DS3L with a Q6600, 2GB Kingston HyperX (after *3* bad pairs of Crucial Ballistix 1066), Galaxy 8800GT 512MB, SB X-Fi, some drives, and a Dell 2005fpw. Running WinXP.

                  Comment


                  • #10
                    Yeah, expect is a nice tool for the job.
                    Last edited by albatorsk; 2 August 2002, 14:59.

                    Comment


                    • #11
                      Thanks for all the help, found autoexpect which created the proper script for me. now to make it part of my shell script. Oh the joys of linux :-)

                      Hopefully it works. Here's what it looks like.


                      #!/bin/bash
                      if [ `ping -c1 192.71.220.10|grep icmp|wc -l` -eq 0 ]; then
                      /sbin/ifconfig eth0 10.0.0.2
                      /etc/script.exp
                      /sbin/dhcpcd
                      fi

                      Does that sound about right?

                      Leech
                      Wah! Wah!

                      In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship.

                      Comment


                      • #12
                        Yep, that should do it. You should probably set the IP-address it's pinging to one owned by your ISP. Just make sure it belongs to a machine that always answers to ping

                        Comment


                        • #13
                          Yeah, I was thinking that too. Actually I think something like Yahoo would work well, that always gives me a nice ping. Had to look up how to set up crontab, but hey, that's the beauty of linux, all the help you need is right online :-)

                          Leech
                          Wah! Wah!

                          In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship.

                          Comment

                          Working...
                          X