Build 353 is getting very close to our goals for the trial.  Remaining
are:
        o fixing a bug that is causing Sugar to crash on boot; rebooting the
machine will generally fix it.  As of a few minutes ago, Trent Lloyd
understands the fault and I expect it will be resolved tomorrow.
        o providing a UI for telling the system to join the mesh.
and possibly a few other things.

So the adventurous of you should install the Q2B83 firmware and Build
353; it would help to get some feedback if anyone runs into serious
problems.  If you have to ask us how to find and install this firmware
and build, you're probably not the right person to try these.

If you want to play with the mesh before the build with the working UI
for selecting the mesh, I attach some scripts.
                                   - Jim

-- 
Jim Gettys
One Laptop Per Child

--- Begin Message ---
In order to try internet access via our mesh testbed you need to do two 
things:

1. configure and start your msh0 interface.
The attached msh0-conf script will do that and assign a network 10. 
address to it based on the last 3 bytes of its MAC address

2. check for a mesh portal (internet gateway). To do that run the attached 
mppreq_client.py script. No news is good news when you run that script. 
If a mesh portal gets discovered, its IP address will be added to the 
routing table as the default route.


M.


#!/bin/sh
# 
# This script runs after the init scripts.  Its current purpose is to set the
# OLPC up for mesh testing.

#killall NetworkManager

# pick the LAN interface (its the one without a Quanta prefix)
if [ "`/sbin/ifconfig -a | grep eth0 | awk '{print $5}' | grep 00:17:C4`" ]
then
        WIRED="eth1"
        WIRELESS="eth0"
else
        WIRED="eth0"
        WIRELESS="eth1"
fi

#killall dhclient
#dhclient $WIRED
#ifconfig $WIRED -multicast
#ifconfig $WIRELESS -multicast

# configure mesh interface
# pick an IP

MAC=`/sbin/ifconfig -a | grep msh0 | awk '{print $5}'`
byte4=${MAC:9:2}
byte5=${MAC:12:2}
byte6=${MAC:15:2}
iwconfig msh0 mode ad-hoc
iwconfig msh0 essid olpc-mesh-$((0x$byte4)).$((0x$byte5)).$((0x$byte6))
#iwconfig msh0 channel 11
ifconfig msh0 10.$((0x$byte4)).$((0x$byte5)).$((0x$byte6))
#!/usr/bin/python
# Copyright 2006, Marvell Semiconductor, Inc.
# Author: Luis Carlos Cobo <[EMAIL PROTECTED]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

import socket, traceback, commands

ANY_MPP_IP = '10.10.10.10'
ANY_MPP_MAC = 'c027c027c027'
MPPREQ_PORT = 953
RETRIES=5
TIMEOUT=1
commands.getoutput('arp -s ' + ANY_MPP_IP + ' ' + ANY_MPP_MAC)

server = ANY_MPP_IP
server_port = MPPREQ_PORT
msg="MPPREQ\n"
socket.setdefaulttimeout(TIMEOUT) 

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(('',0))
mpprep=''

for i in range(RETRIES):
        try:
                s.sendto(msg,(server,server_port))
        except (KeyboardInterrupt, SystemExit):
                raise
        except:
                traceback.print_exc()
        
        try:
                mpprep, address = s.recvfrom(8192)
        except (KeyboardInterrupt, SystemExit):
                raise
        except (socket.timeout):
                continue
        except:
                traceback.print_exc()
        config=mpprep.rsplit()
        commands.getoutput('route add default gw ' + config[1])
        dnsconf=';generated by mppreq_client\nnameserver ' + config[2]
        if (len(config)>3):
                dnsconf += '\nnameserver ' + config[3] 
        commands.getoutput('echo """' + dnsconf +'""">/etc/resolv.conf')
        break

s.close()

if(mpprep==''):
        print 'No MPP was found'

--- End Message ---
_______________________________________________
Devel mailing list
[email protected]
http://mailman.laptop.org/mailman/listinfo/devel

Reply via email to