[maemo-users] Help with thttpd

From: Zoran Kolic zkolic at sbb.co.yu
Date: Sun Feb 18 17:00:03 EET 2007
> I've installed and run it to get easy access to my 770 via a Web browser.
> The problem I've got is that every time I get an Internet connection (via
> wifi or phone) my IP address changes.

Incoming connection is rather not the cause of the change.You didn't mention
how do you get addresses. If you make it via dhcp from wireless router, then
the leasing time should be considerably long enough. Time is measured in se-
conds, so get it high.

> So that I've prepared a very simple
> web page at a fixed URL. In that page I've uploaded a simple index.html with
> my new IP, and it redirects the reader to my 770 web server. The problem is
> that I must update that index.html every time I connect my 770 in order to
> have a correct IP address.

You have ip problem. And looks you have two web pages, one on desktop, one
on 770. One of them is overfluous. Take this scenario:
you have router that gives ip address to the box that asks for it. 770 asks
and gets new address for every 43200 seconds or similar. You should know
address range of that router. Fire up nmap and get the result from it.
  nmap -p 80 | pipe
The pipe means you have to use grep or whatever you like to see the line
with positive match. That line gives you ip address of your 770. Little
cut command and you could get rid off un-necessary particules. All in pipes.
Then use ajax to dinamicaly change the page or put it in command line, like
  lynx $ADDRESS
Cron could do it a regular interval. Or your 770 has no power or memory and
reboots and gets new address whenever it happens.

> Is there any way to automate the process via a script? Could anybody help me
> with the script? Is there a simpler way to achieve what I need?

You could change the way your router sees boxen. But dhcp is fine for home


More information about the maemo-users mailing list