Active Topics

 


Reply
Thread Tools
Posts: 15 | Thanked: 15 times | Joined on Dec 2009 @ Brisbane, Australia
#1
I followed the instructions here: http://wiki.maemo.org/N900_USB_networking

This gets me a USB networking connection between the N900 and my desktop. I also setup the desktop to allow the N900 to connect out. Testing reveals that this is all working as it should:
- I can ssh from the desktop machine to the N900.
- I can ssh from the N900 to a machine elsewhere on the internet.

What I can't do though is use any GUI app that needs network access because Maemo thinks there is no network access. It wants me to select a network to connect to and if I don't pick one then none of the apps even try to connect.

Does anyone know how to fix this?

I think perhaps I need to instruct Maemo that there is a new type of network connection that it can use that isn't WLAN/3G/EDGE but I don't know how to do that.
 
Posts: 15 | Thanked: 15 times | Joined on Dec 2009 @ Brisbane, Australia
#2
Hmm... I found a workaround, based on an idea from this thread:
http://talk.maemo.org/showthread.php?p=395452

The advice there is to connect to some kind of connection and then bring up the USB connection. What this does is to affect the route order. I have an automatic version of this workaround that simply removes the unwanted route.

In my case, there's a WLAN connection I can connect to but it's not reliable for actual use. The script also works with a 3G/EDGE connection.

I created /etc/network/if-up.d/99_fix_routes which will run every time a new interface comes up.

Code:
#!/bin/sh

interface="$2"

if [ "$interface" = "usb0" ]; then
    route delete default wlan0
    route delete default gprs0
else
    if ping -c 1 192.168.2.14 >/dev/null 2>&1; then
        route delete default wlan0
        route delete default gprs0
    fi
fi

exit 0
If the USB interface comes up, it removes the default route through the wlan0/gprs0 interfaces (ie. disables traffic through WLAN/EDGE/3G). If some other connection comes up, it pings the USB host and if it's there, it deletes the default route through wlan0/gprs0.

I don't know why GPRS, EDGE and 3G all use the gprs0 device...

This seems to work fine for me but it is still a workaround. What if there was no phone network or wifi point to connect to but you had a computer using some satelite connection setup for USB networking? What I'm saying is that a proper fix would be better than this workaround.

Last edited by a1291762; 2009-12-11 at 04:21.
 

The Following User Says Thank You to a1291762 For This Useful Post:
Posts: 4 | Thanked: 0 times | Joined on Dec 2009 @ New Zealand
#3
Hi
I've tried similar thing before, but with usb interface up first then ones connected to some wlan, I've deleted the second default entry from the routing table. That seemd to work but I couldn't load any pages (except for some cached bits), I was getting weird "Reload" html gibberish, which eventually crashed my browser.

Anyway I'm going to try your way now )

Last edited by ax31; 2009-12-11 at 04:51.
 
Posts: 162 | Thanked: 351 times | Joined on Apr 2006 @ Cotswolds, UK
#4
a1291762, what would be great is if you would create an installable package to put in Extras!

You could include your if-up.d script (although I might recommend changing the name to make it clear it came from your package) plus an icon which an ordinary user could use to run a script to do the ifup usb0. A PDF or HTML file with instructions on how to set up the other end as well would really complete the package!

Graham
 
Posts: 15 | Thanked: 15 times | Joined on Dec 2009 @ Brisbane, Australia
#5
An installable package sounds like a good idea. I'll give it a go.
 
Posts: 4 | Thanked: 0 times | Joined on Dec 2009 @ New Zealand
#6
Just to add, the easiest way to get WiFi connection for it is to create a new WiFi connection through Settings > Internet Connections > Connections and New Name it then click next, set network mode as Ad hoc and Security method as None
Click Next and then on Advanced
There set an Ip Address (uncheck Auto -retrive) to something like 192.168.2.16/24 and default gateway to 196.168.2.14
Might need to set DNS there too
Save it.
It might be good idea to reduce signal power to 10 instead of default 100

Unfortunately you then still need to delete the wlan0 or gprs default route (.

Last edited by ax31; 2010-01-15 at 04:49.
 
Posts: 474 | Thanked: 283 times | Joined on Oct 2009 @ Oxford, UK
#7
Originally Posted by ax31 View Post
Unfortunately you then still need to delete the wlan0 or gprs default route (.
Wouldn't it be enough to give the usb route higher priority with the metric option, or an entry in the policy routing table?
 
Posts: 4 | Thanked: 0 times | Joined on Dec 2009 @ New Zealand
#8
I tried that, when you connect to WiFi it automatically creates its routes with metric of 0, when I try to override it within the /etc/interfaces it didn't work, maybe my fault. But certainly changing metric of wlan/gprs to something higher helps ) Thanks.
 
Posts: 42 | Thanked: 12 times | Joined on Dec 2009 @ Kuopio, Finland
#9
Did you try Mad Developer? IT has some USB settings through gui.
 
Posts: 4 | Thanked: 0 times | Joined on Dec 2009 @ New Zealand
#10
After second upgrade USB networking became more difficult since wlan rewrites the route occasionally (
If you use an ad-hoc wifi, it seems to work fine though

Last edited by ax31; 2010-01-15 at 04:47.
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:23.