View Full Version : Ubuntu and Mobile 3G help!
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.
What does the output of 'route -n' show?
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
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. :)
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'
OK, will give it a whirl :)
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.
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'
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)
Using kppp try to add a default route of 10.115.79.205.
It's a dynamic IP. Every time I log it's changed so I can't put the "correct" IP into the kppp config :/
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.
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.
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 :)
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...
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:
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?
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.
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.
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 :)
vBulletin® v3.7.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.