This post will list my adventures with my newly acquired Nokia E51 on Linux (Ubuntu 7.04)
Interfacing the Nokia E51 with the computer can be done by:
- USB Data cable
- Bluetooth
- Infrared
The phone comes with a mini USB 2.0 port which can be connected to the USB port of my computer.
Plug-in the USB data cable to the computer and then to the phone.
You get a pop-up on your phone, asking for the transfer mode:
- PC-Suite
- Data Transfer
The Data Transfer mode is for interacting only with the Memory Card that comes with the phone. Once you select this mode, the memory card is available for access from your computer and is inaccessible from your phone.
Listed below is a slowly increasing list of things I have done with the phone:
#1.1 Connecting to the Internet- Nokia E51 as a GSM USB Modem
I shall now show you how you can use your phone as a USB GSM Modem to connect to the Internet, provided you are subscribed to your operator's data services.
- Type in $dmesg on your terminal and observe the output
- Choose the "PC Suite" mode
- Now, type in $ dmesg again on your terminal and note the output. You will notice that you see some extra lines than the previous output. In a succesful scenario, the lines will be similar to:
[ 790.120000] usb 1-2: new full speed USB device using uhci_hcd and address 3
[ 790.296000] usb 1-2: configuration #1 chosen from 1 choice
[ 790.308000] cdc_acm 1-2:1.10: ttyACM0: USB ACM device
- The hint here is the device file name 'ttyACM0'. This is the device filename which we will be using for interfacing with the phone
- Setting up connection scripts
- Copy the following scripts from http://kapsi.fi/~mcfrisk/linux_gprs.html into the directory /etc/ppp/peers:
- gprs
- gprs-connect-chat
- gprs-disconnect-chat
- Configure the gprs script as follows:
- In the file, you will see a list of device files under the heading " Serial device to which the GPRS phone is connected:".
- Uncomment the line "/dev/ttyACM0" and comment all the other lines containing device files
Reproduced below is the relevant portion from my script:
# Serial device to which the GPRS phone is connected:
# /dev/ttyS0 for serial port (COM1 in Windows),
# /dev/ircomm0 for IrDA,
# /dev/ttyUB0 for Bluetooth (Bluez with rfcomm running) and
#/dev/ttyUSB0 for USB
#/dev/ttyS0 # serial port one
#/dev/ttyS1 # serial port two
#/dev/ircomm0 # IrDA serial port one
#/dev/rfcomm0 # Bluetooth serial port one
/dev/ttyACM0 # USB serial device, for example Orange SPV
- Now, configure the gprs-connect script so that it includes the proper number to dial, the Access Point Name (APN), etc. For example, listed below is my gprs-connect-chat script that I use to connect to Airtel GPRS service:
#!/bin/sh
exec chat \
TIMEOUT 5 \
ECHO ON \
ABORT '\nBUSY\r' \
ABORT '\nERROR\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO DIALTONE\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
TIMEOUT 12 \
SAY "Press CTRL-C to close the connection at any stage!" \
SAY "\ndefining PDP context...\n" \
OK ATH \
OK ATE1 \
OK 'AT+CGDCONT=1,"IP","airtelgprs.com","",0,0' \
OK ATD*99*# \
TIMEOUT 22 \
SAY "\nwaiting for connect...\n" \
CONNECT "" \
SAY "\nConnected." \
SAY "\nIf the following ppp negotiations fail,\n" \
SAY "try restarting the phone.\n"
~
$pppd call gprsshould start the connection attempt:
amit@ubuntu-laptop:~$ pppd call gprs
Press CTRL-C to close the connection at any stage!
defining PDP context...
rAT
OK
ATH
OK
ATE1
OK
AT+CGDCONT=1,"IP","airtelgprs.com","",0,0
OK
waiting for connect...
ATD*99*#
CONNECT
Connected.
If the following ppp negotiations fail,
try restarting the phone.
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
rcvd [LCP ConfReq id=0x0]
sent [LCP ConfReq id=0x1]
sent [LCP ConfAck id=0x0]
rcvd [LCP ConfRej id=0x1]
sent [LCP ConfReq id=0x2]
rcvd [LCP ConfAck id=0x2]
sent [PAP AuthReq id=0x1 user="9890600000" password=""]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [CCP ConfReq id=0x1]
sent [IPCP ConfReq id=0x1]
rcvd [IPCP ConfReq id=0x0]
sent [IPCP ConfAck id=0x0]
rcvd [LCP ProtRej id=0x0 80 fd 01 01 00 0c 1a 04 78 00 18 04 78 00]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfNak id=0x1]
sent [IPCP ConfReq id=0x2]
rcvd [IPCP ConfAck id=0x2]
not replacing existing default route through eth0
Cannot determine ethernet address for proxy ARP
local IP address 117.99.0.87
remote IP address 10.6.6.6
primary DNS address 202.56.250.5
secondary DNS address 202.56.250.6
Script /etc/ppp/ip-up started (pid 6630)
Script /etc/ppp/ip-up finished (pid 6630), status = 0x0
The connection is now established. Please configure the nameservers in your system.
#1.2 Using the Memory Card
- Select the Data Transfer Mode
- The Memory Card is automatically mounted and shows you the files stored on your memory card, as it would do for a USB Pen-drive.

A Look behind the scenes:
The last few lines of
$ dmesgwill show something like:
[ 69.680000] usb 1-2: new full speed USB device using uhci_hcd and address 4
[ 69.856000] usb 1-2: configuration #1 chosen from 1 choice
[ 70.016000] usbcore: registered new interface driver libusual
[ 70.152000] Initializing USB Mass Storage driver...
[ 70.152000] scsi2 : SCSI emulation for USB Mass Storage devices
[ 70.152000] usb-storage: device found at 4
[ 70.152000] usb-storage: waiting for device to settle before scanning
[ 70.152000] usbcore: registered new interface driver usb-storage
[ 70.152000] USB Mass Storage support registered.
[ 75.152000] usb-storage: device scan complete
[ 75.156000] scsi 2:0:0:0: Direct-Access Nokia E51 1.0 PQ: 0 ANSI: 0
[ 75.164000] SCSI device sdb: 1000215 512-byte hdwr sectors (512 MB)
[ 75.168000] sdb: Write Protect is off
[ 75.168000] sdb: Mode Sense: 03 00 00 00
[ 75.168000] sdb: assuming drive cache: write through
[ 75.176000] SCSI device sdb: 1000215 512-byte hdwr sectors (512 MB)
[ 75.180000] sdb: Write Protect is off
[ 75.180000] sdb: Mode Sense: 03 00 00 00
[ 75.180000] sdb: assuming drive cache: write through
[ 75.180000] sdb: unknown partition table
[ 75.376000] sd 2:0:0:0: Attached scsi removable disk sdb
[ 75.376000] sd 2:0:0:0: Attached scsi generic sg2 type 0
What you see is here simply means that the memory card is now identified by the device file /dev/sdb which has been mounted on /media/your-card-name
Now you can create/edit/rename/copy/cut/paste folders/files as you would do normally.
This is a WORK IN PROGRESS. Please provide comments/suggestions.
This work may not be reproduced in any format as of now. Once completed, I shall release it in an appropriate license.
You may linkback or refer to it.
Stay tuned..........




15 comments:
Nice Work Amit. But I feel hardware vendors like Nokia , (especially Nokia since it recently acquired an Open Source company, Trolltech), need to understand that they should provide supporting software for Linux as well as Windows
Any progress yet? I'm thinking of buying the same phone, so I'm particularly interested in the bluetooth side. Does that work properly with Linux?
@raseel
+1, though it would be a great thing to do on part of Nokia, but it will also take some fun out of it if we, the Linux g33ks *do not* have anything to explore with the phone on Linux
Cheers!
@matthijs
I didn;t spend enough time with the Bluetooth stuff on Linux. I used it sometime ago to connect it to the Internet, but now I use the USB cable to do so, since my Bluetooth device on my computer is now no more discoverable. but this IMO is an issue with Ubuntu 7.04 and not the phone.
So you can feel safe to buy this phone!
Hi,Amit
could You tell me how to find the istruction to set up the memory of nokia e51? I can't mount it! If you could tell me where download PCSUITE for nokia E51 for Ubuntu 7.10
By
great, maybe this weekend toying with it, in the mean time got spoiled by the pcsuite on win :) lol
Thanks Amit, It works for me - although the scripts seemed to have changed slightly. When you did it - did you get Edge or 3.5G on the phone? I got E on the phone.
Dear Amit,
I am new to linux using xubuntu hardy.
I tried to use my nokia E51 as a modem according to You guidance, but it somehow didn't work for me.
First, I got the following extra lines (there was ohcd instead of uhcd as You see), so I don't know if it's OK or not:
[ 132.475394] usb 1-1: new full speed USB device using ohci_hcd and address 2
[ 132.697432] usb 1-1: configuration #1 chosen from 1 choice
[ 133.974921] cdc_acm 1-1:1.10: ttyACM0: USB ACM device
[ 133.980025] usbcore: registered new interface driver cdc_acm
[ 133.980034] /build/buildd/linux-2.6.24/drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
[ 134.013674] usbcore: registered new interface driver cdc_ether
[ 134.034888] usb 1-1: bad CDC descriptors
[ 134.034916] usbcore: registered new interface driver rndis_host
Then I saved the three linked files to my desktop, and moved to the /etc/ppp/peers folder.
Then I made the modifications according to You post, typed "pppd call gprs" and got the following:
Cannot read `/etc/ppp/peers/gprs-wvdial.conf'
wvdial: invalid option: `/etc/ppp/peers/gprs-wvdial.conf'
Connect script failed
Do You have an idea where I did it wrong?
...later on, as I saw it was searching for gprs-wvdial.conf, I opened /etc/ppp/peers/gprs and made the following modification, changing from:
#connect /etc/ppp/peers/gprs-connect-chat
connect "/usr/bin/wvdial --chat --config /etc/ppp/peers/gprs-wvdial.conf radiolinja_usb_orange_spv"
to:
connect /etc/ppp/peers/gprs-connect-chat
#connect "/usr/bin/wvdial --chat --config /etc/ppp/peers/gprs-wvdial.conf radiolinja_usb_orange_spv"
Then I got the following:
sh: /etc/ppp/peers/gprs-connect-chat: Permission denied
Connect script failed
Amit, It's awesome that you have this info posted... I want to access my sim, contacts etc on the E 51 from Ubuntu... any chance you could post some info on that?
Thanks
Naren
Hi Amit, nice post.
Which speed did you achieve when connecting via ppp? 3G or Edge? I have a motorola V3i which I already use to connect my linux to the net, and I can get Edge.
I'm planning to buy a Nokia E51, but only if I can get 3G on my SuSE ;-)
regerds,
Braulio Gergull
I could always get fastest connection available in my location when I was using my N70 as a modem over Bluetooth. I'm sure the same applies to E51.
Wrote similar stuff if you want to connect to the Internet via bluetooth with E51.
http://babarhaq.blogspot.com/2009/02/mobily-internet-via-nokia-e51-as.html
Post a Comment