473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Linksys Router & Python

Probably a stupid question, but here goes:

Is there any way to get a scaled down version of Python onto a Linksys
Wireless router? Are there any projects out there that are doing this?
I've googled around a bit, but didn't find much. I want to keep the
router's software as it is, but I also would like to have some scripting
abilities on it as well (like email the router's IP addy every x hours),
etc.

I have scripts that run on my computers that do this sort of thing.

def url_open():
""" Function that gets and returns the IP addy
of my Linksys BEFW11S4 Wireless DSL router."""
import urllib, re
ip = re.compile ('\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}')
f = urllib.urlopen("http://user:pa****@192.168.1.1/RouterStatus.htm")
data = f.read()
f.close()
routerip = ip.findall(data)
print routerip[0]
return routerip[0]

But, when I leave town for vacation, I don't like leaving a computer
running. If I could get the interpreter embedded in the device itself,
then that would solve the problem.

This is probably a shot in the dark, but I thought I'd ask.

Thanks,
Brad
Jul 18 '05 #1
8 3797

Brad Tilley <br********@gmail.com> wrote:

Probably a stupid question, but here goes:

Is there any way to get a scaled down version of Python onto a Linksys
Wireless router? Are there any projects out there that are doing this?
I've googled around a bit, but didn't find much. I want to keep the
router's software as it is, but I also would like to have some scripting
abilities on it as well (like email the router's IP addy every x hours),
etc.


Some linksys routers offer support for dynamic hostnames via no-ip.org
or dyndns.org. That is, they connect to the dynamic dns server, tell it
"hey, I'm now ip address ...", and within about 5-10 minutes, the rest
of the world knows it.

- Josiah

Jul 18 '05 #2
On Fri, 2004-10-29 at 11:31 -0700, Josiah Carlson wrote:
Some linksys routers offer support for dynamic hostnames via no-ip.org
or dyndns.org. That is, they connect to the dynamic dns server, tell it
"hey, I'm now ip address ...", and within about 5-10 minutes, the rest
of the world knows it.


There's also a plethora of scripts (several of them in Python) that do
the equivalent. dyndns.org has a listing of many of them.

Regards,
Cliff

--
Cliff Wells <cl************@comcast.net>

Jul 18 '05 #3
Brad Tilley wrote:
Probably a stupid question, but here goes:

Not stupid but nevertheless I'll try to restate ;):

Has anyone heard of a (probably stipped down) MIPS version of the python
interpreter which may run on openwrt? I'd hate to write scripts in "ash".

Thanks
Paul
Jul 18 '05 #4

"Brad Tilley" <br********@gmail.com> wrote in message
news:cl**********@solaris.cc.vt.edu...
Is there any way to get a scaled down version of Python onto a Linksys
Wireless router? Are there any projects out there that are doing this?
Probably - There are some Linux + development tools for the LinkSys WRT54G
router.
http://www.pbs.org/cringely/pulpit/pulpit20040527.html
http://www.i-hacked.com/Computer_Com...S_Hacking.html

Maybe the devices are somewhat identical:
http://www.batbox.org/nslu2-linux.html
I've googled around a bit, but didn't find much. I want to keep the
router's software as it is, but I also would like to have some scripting
abilities on it as well (like email the router's IP addy every x hours),


Those requirements are mutually exclusive.
Jul 18 '05 #5
Brad Tilley wrote:
Probably a stupid question, but here goes:

Is there any way to get a scaled down version of Python onto a Linksys
Wireless router? Are there any projects out there that are doing this?
I've googled around a bit, but didn't find much. I want to keep the
router's software as it is, but I also would like to have some
scripting abilities on it as well (like email the router's IP addy
every x hours), etc.

I have scripts that run on my computers that do this sort of thing.

def url_open():
""" Function that gets and returns the IP addy
of my Linksys BEFW11S4 Wireless DSL router."""
import urllib, re
ip = re.compile ('\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}')
f = urllib.urlopen("http://user:pa****@192.168.1.1/RouterStatus.htm")
data = f.read()
f.close()
routerip = ip.findall(data)
print routerip[0]
return routerip[0]

But, when I leave town for vacation, I don't like leaving a computer
running. If I could get the interpreter embedded in the device itself,
then that would solve the problem.

This is probably a shot in the dark, but I thought I'd ask.

Thanks,
Brad

Tim Gilbert has been attempting to cross-compile just such a beast
fairly recently, and may have had some success by now. Maybe you should
drop him a line:

http://skreak.com/wrt54g/python.php

Good luck :-)
Jul 18 '05 #6
BRad

Here's a one-liner way of getting your IP address, but you'd need a
shell
account on a webserver to get it.
I made a python CGI script, and had it print the IP address of the
client as HTML.

import os
print os.environ["REMOTE_ADDR"]

I don't show the code to to format the output as HTML, but that's
rpretty straightforward.

However, this would still require you to have your computer on while
you're away, which isn't your goal. But at least you don't have to
login to your router to get the info.

You can accomplish the same thing by running a python script to
www.myipaddress.com, and scraping the screen.

These are just another ways of getting your IP address.
I copied this from a post on CLP, so I can't take credit for it.

Brad Tilley <br********@gmail.com> wrote in message news:<cl**********@solaris.cc.vt.edu>...
Probably a stupid question, but here goes:

Is there any way to get a scaled down version of Python onto a Linksys
Wireless router? Are there any projects out there that are doing this?
I've googled around a bit, but didn't find much. I want to keep the
router's software as it is, but I also would like to have some scripting
abilities on it as well (like email the router's IP addy every x hours),
etc.

I have scripts that run on my computers that do this sort of thing.

def url_open():
""" Function that gets and returns the IP addy
of my Linksys BEFW11S4 Wireless DSL router."""
import urllib, re
ip = re.compile ('\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}')
f = urllib.urlopen("http://user:pa****@192.168.1.1/RouterStatus.htm")
data = f.read()
f.close()
routerip = ip.findall(data)
print routerip[0]
return routerip[0]

But, when I leave town for vacation, I don't like leaving a computer
running. If I could get the interpreter embedded in the device itself,
then that would solve the problem.

This is probably a shot in the dark, but I thought I'd ask.

Thanks,
Brad

Jul 18 '05 #7
Cliff

dyndns.org has a listing of many of them.
Can you provide the full URL to these scripts, or do you need an
account to get them ?

Cliff Wells <cl************@comcast.net> wrote in message news:<ma**************************************@pyt hon.org>... On Fri, 2004-10-29 at 11:31 -0700, Josiah Carlson wrote:
Some linksys routers offer support for dynamic hostnames via no-ip.org
or dyndns.org. That is, they connect to the dynamic dns server, tell it
"hey, I'm now ip address ...", and within about 5-10 minutes, the rest
of the world knows it.


There's also a plethora of scripts (several of them in Python) that do
the equivalent. dyndns.org has a listing of many of them.

Regards,
Cliff

Jul 18 '05 #8
On Mon, 2004-11-01 at 16:59 -0800, Tony C wrote:
Cliff

dyndns.org has a listing of many of them.

Can you provide the full URL to these scripts, or do you need an
account to get them ?


You shouldn't need an account, but accounts are free either way ;)

http://www.dyndns.org/support/clients.html
--
Cliff Wells <cl************@comcast.net>

Jul 18 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Yogi_Bear_79 | last post by:
I've been searching for a way to programtically get my public IP from my router. After much research th eonly thing I came up with was going to a site like privacy.net and returning the value it...
10
by: Chris | last post by:
Could anyone write a small program to log the Signal-to-Noise figures for a Netgear DG834 router? I have been getting very variable SNR readings - and I would like to collect some evidence to...
0
by: Dan Hughes | last post by:
I'm reaching out to anyone reading this to help me try to resolve a problem I'm having trying to install the software app that came with my new Linksys Wireless Media Adapter, WMA11B. Upon...
1
by: michael | last post by:
Hello all, I have a Linksys WVC54GC network camera that I am trying to integrate into a website and to enable browsers other than IE to use. Linksys, in their ever-short-sighted ways, decided...
3
by: =?Utf-8?B?Vk1BTQ==?= | last post by:
Hi, I have a home network with a DSL router. I want to check the router state (connected, disconnected...) from an XP computer on the network by showing an icon (green / red) in the system tray....
1
by: pugvette | last post by:
I have a linksys w/speed booster router. on a computer w/ XP. a laptop w/xp and we just bought a new tower that has vista. we have a belkiin adapter hooked up to new vista. i'm trying to connect to...
5
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service...
1
by: ghe | last post by:
Good day, I have this DSL connection which has a dynamic IP address, then I have a new Linksys router(wired), and I had set-up my linksys router through it's web-based “Setup” utility, I had use...
2
by: canucks13 | last post by:
Good day. I work form home, so our tech guy set up a VPN using Cisco WRT31ON router to connect Nortel i2004 phone to the office system. The Nortel tech did the initial set up and the phone works...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.