I downloaded a previous version of gnokii from synaptic package manager, then I downloaded the newest gnokii from gnokii.org download site.
As instructed I've run "./configure" and "make" as user and "make install" as root.
Then I edited the configuration file:
sudo gedit /etc/gnokiirc
I had to comment out lines from port, model and connection sections, and I had to uncomment lines for:
model = series40
port = aa:bb:cc:dd:ee:ff
connection = bluetooth
rfcomm_channel = 1
Actually the "model=series40" I had to type in.
To get the mac address of your phone's bluetooth device type *#2820# in your phone.
I checked rfcomm channel with "sdptool search DUN"
In /etc/bluetooth/hcid.conf I found that the "Default PIN code for incoming connections" is "1234".
After this, when I run "gnokii --identify" the connection worked, and I used the passkey "1234" for both the phone and the PC.