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:  Bcast:  Mask:
          inet6 addr: fe80::224:2bff:fef9:687c/64 Scope:Link
          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 on my cell phone, it does not connect.

I'm using Ubuntu 11.10 with gnome-shell.


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:


change it to match your interface name, in your case 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;

subnet netmask {

(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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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