Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I wanted to establish a TCP connection between my java-supported Nokia X2-01 and my Ubuntu Desktop. I read several guides but they seem to be pretty old (Ubuntu ~8,9). Mainly the issue is with my bluetooth network not providing a DHCP server for my phone, so it does not get assigned an IP address.

The older methods involve fiddling with the pand config files. I was wondering if there is a better GUI based, or a simpler CLI way to assign an IP address to my phone on connection.

ifconfig gives the following output :

bnep0     Link encap:Ethernet  HWaddr 00:24:2b:f9:68:7c  
          inet addr:10.0.66.3  Bcast:10.0.66.15  Mask:255.255.255.240
          inet6 addr: fe80::224:2bff:fef9:687c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1400  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:760 (760.0 B)  TX bytes:8692 (8.6 KB)

But when I try to open 10.0.66.3 on my cell phone, it does not connect.

I'm using Ubuntu 11.10 with gnome-shell.

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

Ok so this question is coming up to a year old but I'll answer it anyway!

You need to set up a dhcp server like you've said, but there's no graphical way to do it, as far as I'm aware. Fortunately it's relatively painless, but appears to be a little daunting.

The first thing to do is install the dhcp server. sudo apt-get install dhcp3-server should achieve this.

Once it's installed, you need to set what interfaces it should run on. To do this, you need to edit the /etc/default/isc-dhcp-server file on 12.04 (pre-12.04 the file may be called dhcp3-server). To do this, run sudo nano /etc/default/isc-dhcp-server. It should have a line like this:

INTERFACES=""

change it to match your interface name, in your case bnep0:

INTERFACES="bnep0"

use CTRL+O (thats o as in onion, not 0 as in 10) to save the file and CTRL+Q to quit

next you need to set up the DHCP server. To do this, first remove the template configuration:

sudo rm /etc/dhcp/dhcpd.conf

then create a new config and enter this:

(open with sudo nano /etc/dhcp/dhcpd.conf)

default-lease-time 600;
max-lease-time 7200;
authoritative;


subnet 10.0.66.0 netmask 255.255.255.240 {
 range 10.0.66.4 10.0.66.14
}

(matches your settings)

after that, (re)start the dhcp server with

sudo service start isc-dhcp-server.

if it complains it's already running, try

sudo service restart isc-dhcp-server

and that should be it :D

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.