473,661 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ht m")
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 3823

Brad Tilley <br********@gma il.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********@gma il.com> wrote in message
news:cl******** **@solaris.cc.v t.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.ht m")
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_ADD R"]

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********@gma il.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.ht m")
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******* *************** *************** *@python.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
10060
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 reads. What I'd like to do is compile this into my .chm I give my remote users. So ideally they would have a button to press that goes to the web site reads the site and returns the ip to a text box. I'd like to do it without the user actually...
10
2169
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 analyse. What is needed is a program that logs into the router's html page every minute, and then extracts the time and the SNR figure, and writes a line of a text file.
0
1953
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 completion of the install the following error message appears and essentially the app fails at that point: XWPCHostService.exe Common Language Runtime Debugging Services - "Application has generated an exception that could not be handled." process...
1
14744
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 to make this device only compatible with IE. It requires IE and ActiveX. However, you can access the video stream directly with the following URL http://1.2.3.4/img/video.asf
3
2972
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. I am new in C# and I am checking for some hints on how to do it. Thanks! VMAM
1
3719
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 my existing network. i turned off vista firewall. i have a secure connection. i know the security code. but i'm lost on this set up. i tried the 'help' steps on windows and Hp. it doesn't recognize/see my network - as a matter of fact - no network...
5
4126
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 I'm routing messages to uses WSHttpBinding, SSL with UserName/Password client credentials. Using guidance from the Technology samples I can create a router that forwards messages without security credentils but not with them. Can anybody point me...
1
6242
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 the MAC Address Cloning feature of the router and then restarted the DSL Modem, the Linksys router and my PC, but then I can't still connect to the internet. Does any one here know what should I do to fix this? Please help me. NOTE: I already...
2
2976
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 fine inside the office. Once we tried the phone outside the office (through VPN router), the phone connected no problem, we see calls incoming, we can dial out, all the features work, but there is no voice or tone on the phone.Please help us see if we...
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8754
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7362
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2760
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.