On Wed, Mar 4, 2009 at 11:56 AM, Carlos Marcano wrote: > Good day, people. > > -SNIP- > > The thing is that in any of them the downloading works great for an > undetermined and variable period of time - sometime hours, sometime > minutes - and then the connection stalls. No p2p, no web browsing. The > modem seems to be connected to the ISP but no data moves around. I try > to soft reset both modem and wifi router but no luck. I then try to hard > reset, no luck either. Only way to get back in business is to unplug > both of the devices, wait a few seconds, replug them and voila!... works > again. > > -MORE SNIPPAGE- > > As I have not found a solution for this problem, I think I will need to > implement a brute force approach, I would need to develop a software - > hardware solution: I've actually done this before, though I used no custom hardware whatsoever - just a shell script on a Linux machine set to run every 10 minutes. I stopped using it when I upgraded to a router that could run community-developed firmware - as soon as I started running the custom Linux distribution on it, the random hanging stopped. I'll go over what I did below: > Software: =A0An always running process which in some way monitors de > downloading speed and if it falls below certain level then it will... > (see below) I used a bash shell script on a Linux machine to run every 10 minutes. It would ping www.google.com and then check the output with a regular expression. If it saw that the ping failed, it would use the "heyu" Linux X10 package to shut the power bar for the networking equipment off, wait 10 seconds, then turn it back on. > Hardware: ... trigger a device that would turn off, wait and turn on the > modem and the wifi router. I just used an X10 appliance module hooked up to the power bar, and an X10-Serial interface at the computer. > At first sight this looks like over killing but I am out of better > ideas. My questions would be: > > A) =A0 =A0 =A0Is this a bad idea? I wouldn't say it's a bad idea - mine worked fine for me. It was incredibly satisfying to be online, have the connection die on me, and then suddenly hear the X10 relay click in the other room as the problem solved itself. That said, getting a router / modem that actually worked as it's supposed to would be a better solution. > B) =A0 =A0 =A0If not, should I use USB ports to connect to the external > device? My desktop has a parallel port and it would be easier to > interface to the device this way - done it before - but I am planning on > upgrading my box so there is no guarantee I will have that port later. I still suggest the X10 route - the modules you need should be cheap over eBay. They've only been making the appliance modules for, what, 30 years? > C) =A0 =A0 =A0Should I use a micro controller? I guess that if I am going= to > use the USB ports I would need to use a micro. That might be interesting - using a TCP/IP stack on a Microcontroller to automate the whole process, and perhaps even control a relay hooked up to the power supplies for the networking gear! Just don't use Power over Ethernet without seriously thinking about what you're switching off first. :) > D) =A0 =A0 =A0If yes, which one would you recommend? I have done some pic > programming before (assembler), mostly in 16F parts. My suggestion would be something in the PIC18 series - if you go the PC / USB route, you can get the USB PICs in DIP packages, and the framework isn't actually that bad to work with if you're staying within the confines of some of the demo code. For your project, you might even be able to use the USB Bit Whacker firmware at http://greta.dhs.org/UBW/ - it provides a USB COM interface to control a bunch of digital I/O lines using little more than a PIC18F2455 and an oscillator. The far more interesting route would be to take a substantial PIC18 chip (maybe the PIC18F2620 or the '4620) with an ENC28J60 Ethernet chip. Have the Ethernet chip either ping a server on the Internet, or try to load a small webpage or something. If it times out or fails, reset the whole mess. > Sorry for the lengthy post, I hope I made myself clear and thanks in > advance for your help and ideas. > > Regards, > > *Carlos Marcano* > - Guri, Venezuela - Hope I was able to help! -Randy -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist