Keep Alive in 10.4.4

Discussion in 'macOS' started by finalcoolman, Jan 28, 2006.

  1. finalcoolman macrumors 6502

    Joined:
    Apr 15, 2005
    #1
    Ok, I finally figured out why I keep getting disconnected from Microsoft/Windows Messenger. It seems that my Linksys router (always running latest firmware so thats not something I could fix) disconnects idle connections sometime around 5 minutes after left idle. So after two years of dealing with this I found this out and found a fix, at least for my XP Machine. I inserted three new keys in the registry, the crucial one being KeepAliveTime and I set it for 2.5 minutes. So it sends out a packet every 2 and a half minutes and keeps my router happy and I don't get booted out of Windows Messenger anymore. Now my problem is how do I replicate this on my Mac? Since the Windows fix obviosly won't help Microsoft Messenger 5 on my iBook, does anyone know how or can point me to a resource on how to do this on my Mac? Thanks,
     
  2. dolphin842 macrumors 65816

    dolphin842

    Joined:
    Jul 14, 2004
    #2
    Just a quick, slightly OT question, that Linksys router wouldn't happen to be an 802.11b model would it? I have a similar problem with regular disconnects using my Linksys.

    If so, I'd be interested in finding out a keepalivetime-like command as well. My guess is that there's some Terminal command that would do it, but that's just conjecture.
     
  3. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #3
    Well, if you could find a website that told your browser to reload content somewhat frequently, you could open the page in Safari (then hide Safari if need be), and that should work for you (the browser would keep some traffic going through).
     
  4. Wes macrumors 68020

    Wes

    Joined:
    Jun 22, 2001
    Location:
    London
    #4
    If you just need some traffic to keep your connection alive you could write a script and have it ping your router every 2 minutes or something similar.

    For the timing mechanism you could use CronniX (http://www.abstracture.de/projects-en/cronnix) and have it send one packet every 5 minutes.
     
  5. dolphin842 macrumors 65816

    dolphin842

    Joined:
    Jul 14, 2004
    #5
    Good ideas. And if you wanted to be lazy, Opera has an auto-reload function built in (it's in the contextual menu for a page, and probably elsewhere), so any old webpage should do.
     
  6. finalcoolman thread starter macrumors 6502

    Joined:
    Apr 15, 2005
    #6
    First off the router I have for anyone interested is a Linksys BEFSX41 V2 running latest firmware version of 1.52.9 released January 11, 2006. It is a wired router, I have a seperate access point but the AP has nothing to do with it. I'd assume this is a a condition found in many Linksys routers, whether only wired or also having a a built in AP. Now this has nothing to do with the browser and since I have fixed it on my Windows machine I have a good idea of how this problem originates. Apparantly the router has a NAT table, basicly a table with all computers on the LAN and what TCP/UDP connections they have going and through what ports. Now the problem is many routers like to disconnect TCP/UDP connections that have been idle for too long. Now some people have suggested to do a page that would automaticlly refresh. This will not work. Since a browser uses totally different ports than an IM client, even if you're sitting there activly surfing the net it will not help, the router will disconnect your IM connection if you have not used it for 5 minutes. Anyways in Windows there is a registry modification you can add that will basiclly tell programs like Windows Messenger to ping the server at specific intervals. By doing this you are keeping the connection in the router open, which is what exactly needs to be done. So, that's why in order to find a fix for Microsoft Messenger, there is a need to preform the equivalant of what I did in Windows on a Mac.
     
  7. mduser63 macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #7
    If I were in your position, I'd get a new router. Having to resort to obscure and difficult hacks in other equipment to get a piece of cheap hardware to work the way you want it to isn't my idea of fun.

    That said, the thing to do is probably to write an AppleScript that pings the router on the correct port(s) at a certain interval. Set it to run in the background by hiding the Dock icon and set it to open at login. I guess another option would be to write a shell script and set cron to run it ever 2.5 minutes or whatever. Note that you can incorporate shell scripts into AppleScripts.
     
  8. finalcoolman thread starter macrumors 6502

    Joined:
    Apr 15, 2005
    #8

Share This Page