Reply
Thread Tools
Posts: 3 | Thanked: 4 times | Joined on Nov 2011
#1
I would rather not have to activate edge/3G/WiFi in order to make what I describe here work. Do anyone have any pointers to where to begin if I want to stop the GUI applications from wanting me to connect to Internet with an official method?

This is the description of how I connected my phone to the Internet using the micro-USB on my Nokia N9. I am only describing phone->linux, but you can find more information on the host side here. Windows, Mac, and different linux tools is described there.

1. Connect USB between the phone and the computer. Choose SDK-mode
2. Activate your usb-network interface in linux. I did this:
Code:
ln -s /etc/init.d/net.lo /etc/init.d/net.usb0
/etc/init.d/net.usb0 start
3. SSH to your phone(or open a terminal on the phone, but I prefer computer keyboards to touch-screen). I used Qt SDK to deploy a pub-key to the phone.
4. Add routing info. You do not have to be root(I don't know if you can do it as "root").
Code:
route add default gw 192.168.2.14
5. Activate routing on your computer. As root I did this:
Code:
iptables -A POSTROUTING -t nat -s 192.168.2.15/32 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
This will not activate Internet on your gui applications. Ping, apt-get and other command line tools work though. If you want to use GUI applications you have to etablish a connection from the "Connect to Internet"-app(or widget or whatever it's called) and then remove the routing information like this:
Code:
route del default
This code will remove the latest default route added. You can remove all routes with repeating that command and re-run ifthat does not work
Code:
route add default gw 192.168.2.14
*EDIT I see a not as detailed guide to the same as I have done here http://talk.maemo.org/showthread.php?t=79929, but it doesn't cover my workaround for GUI apps.

Last edited by Ketilk; 2012-01-01 at 00:29. Reason: Title could be confused with sharing the opposite direction.
 

The Following 2 Users Say Thank You to Ketilk For This Useful Post:
Posts: 55 | Thanked: 14 times | Joined on Dec 2011
#2
id love to be able to connect my laptop to internet via usb instead wifi because it is unstable ( joikuspot ) crashes every now and then and the connection gets lost also sometimes, phone shows zzz in teh logo at the wifi app.

if there is a way id like to know, using win7. i hate it that the nokia suite doesnt support n9 :/
 
Jordi's Avatar
Posts: 400 | Thanked: 708 times | Joined on Jun 2011 @ Geneva - CH
#3
You can connect your PC to the Internet through 3G using Nokia PC suite.
 
Moderator | Posts: 5,320 | Thanked: 4,464 times | Joined on Oct 2009
#4
Originally Posted by Ketilk View Post
Guide
I thought this could also be done much more simply via Nokia Suite?
I don't mean sharing a N9's 3G connection w/a PC, I mean the other way round.
I'll add this to the Google docs guide if there's not one already there.

Last edited by jalyst; 2012-01-03 at 16:17.
 
chiappa's Avatar
Posts: 52 | Thanked: 19 times | Joined on Jan 2010
#5
Originally Posted by Ketilk View Post
I would rather not have to activate edge/3G/WiFi in order to make what I describe here work. Do anyone have any pointers to where to begin if I want to stop the GUI applications from wanting me to connect to Internet with an official method?
Second that!

Originally Posted by Ketilk View Post
This will not activate Internet on your gui applications. Ping, apt-get and other command line tools work though. If you want to use GUI applications you have to etablish a connection from the "Connect to Internet"-app(or widget or whatever it's called) and then remove the routing information like this:
Code:
route del default
This code will remove the latest default route added. You can remove all routes with repeating that command and re-run ifthat does not work
Code:
route add default gw 192.168.2.14
Care to explain a bit more? The only "Connect to Internet" thingamabob I'm aware of is for connecting to WIFI networks? Not really getting this GUI part... I can ping thou
 
chiappa's Avatar
Posts: 52 | Thanked: 19 times | Joined on Jan 2010
#6
Originally Posted by Jordi View Post
You can connect your PC to the Internet through 3G using Nokia PC suite.
Nokia PC suite supports up to Maemo 5, Fremantle.. (N900).
Wont work with the N9.
 
Posts: 56 | Thanked: 107 times | Joined on Jul 2011
#7
Originally Posted by chiappa View Post
Care to explain a bit more? The only "Connect to Internet" thingamabob I'm aware of is for connecting to WIFI networks? Not really getting this GUI part... I can ping thou

once you can ping via terminal, you need to make the "GUI apps" access internet same way, so you start any app that requires internet and because you're not connected to 3g/wifi - the scroll down list will appear asking for a connection. Once you see it, click connect (3G for example). Once it's connected, in the terminal or via SSH run:

Code:
route del default
and then

*
Code:
route add default gw 192.168.2.14
*The IP address of your PC.

After you do this, your apps will be using the USB shared internet connection, although the Data icon will be showing, as you initially connected to it, but are now using a different gateway.

P.S. From under user, not root.
 
chiappa's Avatar
Posts: 52 | Thanked: 19 times | Joined on Jan 2010
#8
Thank you Vaterix, now I understand... The way around this is quite amusing.

But I'm not comfortable with the fact that if I connect to my mobile operators 3G connection and I'm not fast enough in turning the routing off it will immediately start blasting downloads and sucking credits off my phone.

In this case I have a WIFI connection I can use. But other than that, is there a more solid solution?
 
Posts: 1,067 | Thanked: 2,383 times | Joined on Jan 2012 @ Finland
#9
Originally Posted by chiappa View Post
Thank you Vaterix, now I understand... The way around this is quite amusing.

But I'm not comfortable with the fact that if I connect to my mobile operators 3G connection and I'm not fast enough in turning the routing off it will immediately start blasting downloads and sucking credits off my phone.

In this case I have a WIFI connection I can use. But other than that, is there a more solid solution?
you can always change icd-gprs-up.sh so it will always default route to usb0 192.168.2.14, but editing that file will MALF your device (unless you sha1sum the changed file and update&resign refhashlist). So yes if you use exploited capabilities you can do it, but not possible if you don't know how to get full capas and howto resign.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:28.