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
#1. Talking to the Phone via USB data cable: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
My understanding is that the PC-Suite mode is for communicating with the "whole" phone using the Nokia PC Suite Software. This mode enables you to talk with all the features of your phone. We shall be using this mode for many of our tasks here on Linux, but without using Nokia PC Suite.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 ModemI 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 filesReproduced 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"
~
Now: $pppd call gprs
should 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.
USB Data cable
Bluetooth
Infrared
#1. Talking to the Phone via USB data cable: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
My understanding is that the PC-Suite mode is for communicating with the "whole" phone using the Nokia PC Suite Software. This mode enables you to talk with all the features of your phone. We shall be using this mode for many of our tasks here on Linux, but without using Nokia PC Suite.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 ModemI 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 filesReproduced 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"
~
Now: $pppd call gprs
should 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.