maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   Routing Internet via USB (https://talk.maemo.org/showthread.php?t=79995)

Konceptz 2011-11-14 23:03

Routing Internet via USB
 
Hey guys, I'm pretty sure it's not hard to route internet from the N9 to linux via USB set to SDK.

I usually connect via wifi hotspot and always charge it via usb because of battery drain. Isn't it easy to just route packets from the N9 over usb?

Actually, it may be harder because I'm on Mac, but possibly not.

something like,

On mac:

#route add 192.168.2.14 localhost

On N9:
#ip route add 192.168.2.15 gw.....

I'm not exactly sure.

Thanks!

uber 2011-11-14 23:25

Re: Routing Internet via USB
 
I'm not at a computer where I have access to change my routing tables but you can try the following. However, I highly doubt that forwarding is enabled in the stock kernel. Also, please know how to revert these changes before trying them.

On mac

route change default 192.168.2.15

On N9

echo 1 > /proc/sys/net/ipv4/ip_forward

Konceptz 2011-11-15 00:45

Re: Routing Internet via USB
 
Quote:

Originally Posted by uber (Post 1123658)
I'm not at a computer where I have access to change my routing tables but you can try the following. However, I highly doubt that forwarding is enabled in the stock kernel. Also, please know how to revert these changes before trying them.

On mac

route change default 192.168.2.15

On N9

echo 1 > /proc/sys/net/ipv4/ip_forward

Looks like you're right about the ip_forward flag, but can't you manually set up the routing table? on the N9

lma 2011-11-15 06:31

Re: Routing Internet via USB
 
Quote:

Originally Posted by Konceptz (Post 1123648)
Hey guys, I'm pretty sure it's not hard to route internet from the N9 to linux via USB set to SDK.
[...]

On N9:
#ip route add 192.168.2.15 gw.....

It should be something like:

Code:

# route del default
# route add default gw 192.168.2.15

(assuming that 192.168.2.15 is the Mac's IP address). You don't need to enable IP forwarding on the N9, but you do on the Mac.

uber 2011-11-15 07:30

Re: Routing Internet via USB
 
Which way does he want to go? Does he want internet on his Mac through the N9 (N9 is the router) or does he want internet on his N9 through his Mac (Mac is the router)? What I described is using his N9 as the router and he'd need to have forwarding to be enabled on the N9 in that scenario.

uber 2011-11-15 07:33

Re: Routing Internet via USB
 
Quote:

Originally Posted by Konceptz (Post 1123693)
Looks like you're right about the ip_forward flag, but can't you manually set up the routing table? on the N9

The routes are already setup on the N9. It has a route to the internet through gprs0 and it has a route to your mac over usb0. What it won't do without forwarding is actually forwarding packets between those two interfaces.

Konceptz 2011-11-16 02:28

Re: Routing Internet via USB
 
Quote:

Originally Posted by uber (Post 1123778)
The routes are already setup on the N9. It has a route to the internet through gprs0 and it has a route to your mac over usb0. What it won't do without forwarding is actually forwarding packets between those two interfaces.

What does the joiku framework do to let it forward from gprs to adhoc wifi?

Can't we use those commands or actually modify the wifi program to route to USB Ethernet?

uber 2011-11-16 09:07

Re: Routing Internet via USB
 
I was wrong. Routing appears to work with the ip_forward set to 1, but since you probably want to share you gprs connection it won't matter since the NAT modules aren't included on the N9. JoikuSpot has it's own module (JoikuSpot_Bouncer.ko) that probably does all the NAT work.

feeltch 2011-12-05 12:59

Re: Routing Internet via USB
 
Is sth new about getting internet connection to PC via N9 and USB cable?
I don't know about programming but as I read here it might be possible via some hack or sth.

jalyst 2011-12-05 13:12

Re: Routing Internet via USB
 
someone posted a how-to the other day for exactly this
Can't find the link now, but a search should reveal it.
It was either in this or the N9/N950 sub-forum.


All times are GMT. The time now is 00:45.

vBulletin® Version 3.8.8