PDA

View Full Version : Ubuntu and Mobile 3G help!


Desmo
15-04-2008, 17:17
I'm trying to get the lappy connected via 3G from my mobile. I've installed Blueman 1.9 (had to use an older version as the newer one wouldn't install) and also installed kppp.

Now, I can get my mobile to connect to the laptop, "dial up" and it completes the connection. The mobile shows the 3G symbol and I seem to get an IP address. But that's it, no data flows in either direction apart from the first few packets of data which I'm assuming is just the connection data.

So, I'm at a loss as to what to check next. It seems it should be working but just doesn't. Using a Nokia N73 on O2.

Burble
15-04-2008, 18:51
What does the output of 'route -n' show?

Desmo
15-04-2008, 20:55
Kernel IP routeing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.6.6.6 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 10.0.0.1 0.0.0.0 UG 100 0 0 eth1

Mark
15-04-2008, 20:59
OK - that figures. Looks like some gentle massaging of routing tables is in order.

I think I understand roughly what needs doing but I'd best leave it to someone who knows networking configuration better than me. :)

Burble
15-04-2008, 21:14
The important line from the routing table you posted is the bottom line, it basically says that to get to anywhere outside of your local network go via 10.0.0.1 via eth1 which I suspect is your wireless card.

I think something like 'route add 0.0.0.0 0.0.0.0 10.6.6.6 ppp0' should do the trick. However, that would only work for your current ppp session.

It should affect your ethernet/wireless connectivity after the ppp session as ended as the ppp interface should go down and vanish from the routing table but if it doesn't try 'route delete 0.0.0.0 0.0.0.0 10.6.6.6 ppp0'

Desmo
15-04-2008, 21:17
OK, will give it a whirl :)

Desmo
15-04-2008, 21:26
It doesn't seem to like that route add command. I did look through the settings in kppp though and I can manually add the gateway address. I popped in 10.0.0.6 (assuming it's correct) but it still didn't work.

Burble
15-04-2008, 21:31
I did wonder if I had the syntax right or not, I'm a bit rusty. Looking back at the routing table, I think you might want to use 10.6.6.6 as the IP address although that doesn't seem right.

It's entirely plausible that a Mobile network will use an RFC1918 (private) address rather than an internet routable one, but 10.6.6.6 seems a bit iffy. You can double check the IP address by doing 'ifconfig ppp0'

Desmo
15-04-2008, 21:37
I did an ifconfig earlier and got this...

ppp0 Link encap:Point-to-Point Protocol
inet addr:10.115.79.205 P-t-P:10.6.6.6 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:64 (64.0 b) TX bytes:97 (97.0 b)

Burble
15-04-2008, 21:40
Using kppp try to add a default route of 10.115.79.205.

Desmo
15-04-2008, 21:48
It's a dynamic IP. Every time I log it's changed so I can't put the "correct" IP into the kppp config :/

Burble
15-04-2008, 21:52
If you connect, then do an ifconfig you'll then be able to add the correct IP address into kppp. It'll be a pain in the arse to do it all it all the time, but if you don't use it regularly then I don't suppose it'll be too bad.

I had been meaning to try out using my mobile over BT on my Linux laptop but I got a Macbook a month or two ago and have been using that instead.

Desmo
15-04-2008, 22:02
Yeah, will spend a bit more time fiddling :) Like you say, it's only for occasional use.

I tried it on the Mac today to make sure it's all working fine and it connected up first time. Seems linux still needs work on some of the simpler stuff. You'd think this would be a fairly common thing people would use. Well, maybe not common, but it's not that obscure.

Burble
15-04-2008, 22:04
If I can get the BT on my work laptop to behave I'll have a mess about and see if i can give you any more useful hints :)

Dr. Z
15-04-2008, 22:22
ip route add default via <ip> dev ppp0

If that doesn't sort it, I'll eat my hat :)

BTW, 3G over USB with my K800i just works when I plug in the cable. No configuration required whatsoever, it just works...

Desmo
16-04-2008, 07:37
Cheers for the help guys. That ip route command seems to have done the trick.

I am now posting by the power of 3G :cool:

Desmo
16-04-2008, 09:49
Had another test for this this morning and it looks like I need to add the ip route command every time I connect. Is there anywhere I can add it permanently? Or will that break my wireless connection?

Another option is to add the command into kppp which I can do. But it only allows user level commands and I think I need to do it as root. Is there a way around that? Would running kppp as root solve the problem? And if so, how do I go about doing that if I'm running kpp from the Applications menu?

Will
16-04-2008, 10:36
I'm sure there's a script that could be written to launch everytime you fire that connection up, or at least run before you do it? It would seem like a sensible thing to me.

Burble
16-04-2008, 11:47
It should be easy enough to knock up a script to grab the IP address from ifconfig and pipe it into the route command. Lemme see if my Python or PERL skills escaped when I was in hospital.

Desmo
16-04-2008, 18:32
Got it sorted now :) Popped the command into kppp to be executed upon connection. I used gksudo so that a password boxs pops up. Type in my password and it's all sorted :)