USB networking and openSUSE

Sean Seymour seanjseymour at gmail.com
Thu Jul 24 03:16:13 CEST 2008


Hi Rolf, sorry to hear you are having issues still.  I know when I got 
my Freerunner and I couldn't get it online I was tearing my hair out.

Now I don't know much about this stuff and your router/IPs are set up 
differently from mine, but I wanted to post my "personal 
checklist/notes" that I clobbered together from the wiki & these emails. 
Perhaps something in there will help you or someone else out.

I am running openSUSE (11) as well so Matt's original emails really 
helped me out.  Turns out my issue was the nat translation thing as 
well.  Here are my personal notes:


ON DESKTOP PC:

# My router's IP is 192.168.0.1
# My machines/devices use 192.168.0.2 through 10

# So the phone will get configured correctly when connected:
# Create the config file "/etc/sysconfig/network/ifcfg-usb0"

BOOTPROTO='static'
IPADDR='192.168.0.200'
NETMASK='255.255.255.0'
NAME='Openmoko'
STARTMODE='hotplug'
USERCONTROL='no'

# Edit /etc/hosts and add this line for convenience:

192.168.0.202   openmoko

# Get your nameserver information, you will need it for the phone later:
"cat /etc/resolv.conf" should show you the nameserver(s) at the end. 
Mine has two.

nameserver a.b.c.d
nameserver a.b.c.e

******************************************************************
These steps have to be done *every time* after reconnecting the
phone via usb unless you automate it using a script in 
/etc/sysconfig/network/if-up.d/.  I tried automating it but in the 
process messed up my eth0 connection so I abandoned that for now and 
just do it manually.

# So you can ping/ssh directly to the phone:

route add -host 192.168.0.202 dev usb0

# Forward network requests from the phone so it can use the desktop pc's 
network connection.

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24
iptables -P FORWARD ACCEPT
*******************************************************************

# Now connect to the phone

ssh root at openmoko
<yes if prompted>
<Enter for root password>

ON PHONE (one time setup):

# Edit /etc/network/interfaces and make sure the usb section looks like 
this (again, mine has two nameservers so I have two lines there):

auto usb0
iface usb0 inet static
         address 192.168.0.202
         netmask 255.255.255.0
         network 192.168.0.0
         gateway 192.168.0.200
         up echo nameserver a.b.c.d >/etc/resolv.conf
         up echo nameserver a.b.c.e >>/etc/resolv.conf

# Restart networking if you changed /etc/network/interfaces.

/etc/init.d/networking restart

******************************************************
After restarting the network on the neo, you will have
to do the three steps in "Forward network connections from
the phone" steps listed above again on your desktop PC!
******************************************************

# Back to the phone's terminal:

# Make sure the phone's usb config worked:
# "cat /etc/resolv.conf" should spit out your nameserver(s) like so:

nameserver a.b.c.d
nameserver a.b.c.e

# Now you should be able to ping www.google.com or whatever.

Hope this helps!!
Sean

casaubon wrote:
> 
> 
> Rolf Camps wrote:
>> Op zondag 20-07-2008 om 12:32 uur [tijdzone -0700], schreef casaubon:
>>> This doesn't seem to work for me. Just to be clear: you changed the
>>> file
>>> /etc/resolv.conf to read "nameserver w.x.y.z", where w.x.y.z is the IP
>>> of a
>>> DNS that your ISP router consults?
>> I also changed it in the file /etc/network/interfaces on my freerunner:
>>
>>   up echo nameserver w.x.y.z >/etc/resolv.conf
>>
>> afterwards restart your network on the freerunner:
>>
>>   /etc/init.d/networking restart
>>
>> I hope it will work for you too,
>>
>>
> 
> 
> Still having problems. Due to my own setup at home rather than the neoFR, no
> doubt.  :P
> 
> I can do a little workaround by downloading the daily packages on the
> laptop,  redirecting the update ".conf" files in /etc/opkg to point to local
> directories instead of http: locations, and running update.
> 
> I don't know if this is a good idea. Any opinions?




More information about the support mailing list