Author Topic: Ppp Connect To Nokia Mobile [solved]  (Read 3911 times)

DaveR

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« on: June 29, 2006, 12:41:10 pm »
Hi.

I want to make a PPP dial-up connection via bluetooth and a Nokia 6310i mobile  - CSD not GPRS. The phone and ISP works OK with the Nokia Windows modem software.

The bluetooth part works OK and I can dial the ISP - but then nothing. I'm pretty sure it fails to PAP authenticate - there are no authentication messages in the log and a ping to an internet address fails.

I've tried several ways of specifying username/password and lots of combinations of PPP parameters - it's a long way from the standard setup now. Here's the latest log:

Code: [Select]
root@zaurus:/etc/ppp/peers>pppd call BTNokDialFreeUK
pppd options in effect:
debug           # (from /etc/ppp/peers/BTNokDialFreeUK)
nodetach                # (from /etc/ppp/peers/BTNokDialFreeUK)
connect-delay 8000              # (from /etc/ppp/peers/BTNokDialFreeUK)
dump            # (from /etc/ppp/peers/BTNokDialFreeUK)
noauth          # (from /etc/ppp/peers/BTNokDialFreeUK)
user royal              # (from /etc/ppp/peers/BTNokDialFreeUK)
remotename FreeUK1              # (from /etc/ppp/peers/BTNokDialFreeUK)
/dev/rfcomm0            # (from /etc/ppp/peers/BTNokDialFreeUK)
115200          # (from /etc/ppp/peers/BTNokDialFreeUK)
connect /usr/sbin/chat -v -f /etc/ppp/chatscript.NokDialFreeUK.connect          # (from /etc/ppp/peers/BTNokDialFreeUK)
disconnect /usr/sbin/chat -v -f /etc/ppp/chatscript.NokDial.disconnect          # (from /etc/ppp/peers/BTNokDialFreeUK)
crtscts         # (from /etc/ppp/peers/BTNokDialFreeUK)
silent          # (from /etc/ppp/peers/BTNokDialFreeUK)
show-password           # (from /etc/ppp/peers/BTNokDialFreeUK)
noipdefault             # (from /etc/ppp/peers/BTNokDialFreeUK)
defaultroute            # (from /etc/ppp/peers/BTNokDialFreeUK)
usepeerdns              # (from /etc/ppp/peers/BTNokDialFreeUK)
AT
OK
ATE1
OK
AT+CBST=14,0,1;+chsn=2,1,0,8
OK
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/rfcomm0

And it just sits there for a minute or so, when the call ends itself. There should be some PAP messages in the log at this point, I think. If I kill it myself I get:

Code: [Select]
Terminating on signal 2
Connection terminated.
Receive serial link is not 8-bit clean:
Problem: all had bit 7 set to 0
Sending break to the modem
PDP context detached
Serial link disconnected.

To debug this I want to look at the messages between the Z and the phone in detail. I have debug on, but as I understand it, the usual syslogd stuff is not implemented by busybox. So how do I get at these messages to find out what's happening?

I'd appreciate a few pointers on this - although I've been using Linux for some years I'm new to the Z.

Dave
« Last Edit: July 03, 2006, 05:09:28 pm by DaveR »
Dave Royal
Sharp Zaurus C860 (pdaXrom 1.1.0beta1)
Buffalo WLI-CF-S11G 802.11b CF
Belkin F8T020 Bluetooth CF

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« Reply #1 on: June 29, 2006, 04:44:11 pm »
Are you using the graphical ppp dialer? It adds extra quotes to the password, so authentication always fails. It needs to be recompiled to fix it. Here is the version I am using successfully with my Nokia on RC12 (it does need one of the old compat libs). Replace the one in /usr/lib/qt/bin/ (backup your old one first).
SL6000-L, RC12

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« Reply #2 on: June 29, 2006, 04:49:41 pm »
Not sure what is going on with the forum (or my browser?), but hopefully here is the attachment - not a zip file, remove the extension. If you have beta4/2.6 kernel you will have to find the source and recompile yourself...
« Last Edit: June 29, 2006, 04:54:46 pm by karlto »
SL6000-L, RC12

DaveR

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« Reply #3 on: June 29, 2006, 05:16:13 pm »
Quote
Are you using the graphical ppp dialer? It adds extra quotes to the password, so authentication always fails...
Not any more - though I started with it. I'm using a terminal - as I quoted.

I saw the reference to that error - I can't see any extra quotes.My pap-secrets file contains
Code: [Select]
royal FreeUK1 "mypassword" .

In the /var/log/messages I get
Code: [Select]
May 30 17:10:50 pppd[2188]: user royal^I^I# (from /etc/ppp/peers/BTNokDialFreeUK)
May 30 17:10:50 pppd[2188]: password ??????^I^I# (from command line)
(That from command line puzzles me though. Is it normal?)

I've also tried including the password in the ppp config file, in double-quotes like the username "royal" in my OP.

I've even tried putting it in the chat script:
Code: [Select]
CONNECT         ''
ogin:--ogin:    royal
assword:        mypassword

The result is always the same - it dials and hangs. I suspect that the phone is giving a response I need to allow for in the chat script - hence I need to see the detailed dialogue which ppp debug would normally give me.

Thanks for the attachment, though. I'll look into it as well.
Dave Royal
Sharp Zaurus C860 (pdaXrom 1.1.0beta1)
Buffalo WLI-CF-S11G 802.11b CF
Belkin F8T020 Bluetooth CF

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« Reply #4 on: June 29, 2006, 05:59:28 pm »
Quote
Quote
Are you using the graphical ppp dialer? It adds extra quotes to the password, so authentication always fails...
Not any more - though I started with it. I'm using a terminal - as I quoted.

I saw the reference to that error - I can't see any extra quotes.My pap-secrets file contains
Code: [Select]
royal FreeUK1 "mypassword" .

In the /var/log/messages I get
Code: [Select]
May 30 17:10:50 pppd[2188]: user royal^I^I# (from /etc/ppp/peers/BTNokDialFreeUK)
May 30 17:10:50 pppd[2188]: password ??????^I^I# (from command line)
(That from command line puzzles me though. Is it normal?)

I've also tried including the password in the ppp config file, in double-quotes like the username "royal" in my OP.

I've even tried putting it in the chat script:
Code: [Select]
CONNECT         ''
ogin:--ogin:    royal
assword:        mypassword

The result is always the same - it dials and hangs. I suspect that the phone is giving a response I need to allow for in the chat script - hence I need to see the detailed dialogue which ppp debug would normally give me.

Thanks for the attachment, though. I'll look into it as well.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=133400\"][{POST_SNAPBACK}][/a][/div]
Sorry, I should open my eyes more when I read

I'm sure I had some more detail showing after the 'Connect ppp0 <--> ...' line - it was ppp output, not logged (it is normal for the password to be hidden in the log). Maybe there is a verbose option for pppd?

Are you certain that the quotes should be present in the pap-secrets file? Perhaps try it from the command line again without those quotes.
SL6000-L, RC12

DaveR

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« Reply #5 on: June 29, 2006, 06:17:43 pm »
Quote
Are you certain that the quotes should be present in the pap-secrets file?
No I'm not. I don't have another Linux machine configured for PPP and the sample file on this SuSE system has:
Code: [Select]
#hostname    *    password So I'll try that tomorrow.

Thanks for your help.

Dave
Dave Royal
Sharp Zaurus C860 (pdaXrom 1.1.0beta1)
Buffalo WLI-CF-S11G 802.11b CF
Belkin F8T020 Bluetooth CF

DaveR

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« Reply #6 on: June 30, 2006, 05:02:48 am »
I think the double-quotes are optional in pap-secrets. Indeed the example given in 'man pppd' includes them. Anyway I edited them out of both pap- and chap-secrets and it makes no difference.

I'm calling pppd with this config file:
Code: [Select]
#PPP config file created by DR 26/5/2006
#Bluetooth - Nokia (6310i) - DialUp - FreeUK
/dev/rfcomm0
115200
defaultroute
connect    "/usr/sbin/chat -v -f /etc/ppp/chatscript.NokDialFreeUK.connect"
disconnect "/usr/sbin/chat -v -f /etc/ppp/chatscript.NokDial.disconnect"
noauth
nodetach
connect-delay 8000
silent
usepeerdns
dump
debug
noipdefault
#modem
user "royal"
#password "mypassword"
#demand
#idle 120
remotename FreeUK1
crtscts
show-password
And the connect chatscript:
Code: [Select]
#based on http://www.hingston.demon.co.uk/mike/orange-connect
#AT commands from http://nds1.nokia.com/phones/files/guides/Nokia_AThelp.pdf
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

# ATE1 turns on echo
OK              ATE1
#here's the magic bit! (DR - BUT IT'S FOR GPRS)
#OK              'AT+cgdcont=1,"IP","orangeinternet"'
#OK              ATD*99***1#

# Dial up equiv - DR
#V34 modem
OK  'AT+CBST=14,0,1;+chsn=2,1,0,8'
#FreeUK
OK  ATDT08450790007
(You can also see where it came from and my mods.)

If this were an ordinary Linux box I'd look in /var/log/ppp for lines like
Code: [Select]
sent [PAP AuthReq id=0x1 user="username" password="password"]but IIUC busybox does not log these messages. Is that correct? Is there a way to see this debug info?

Dave
Dave Royal
Sharp Zaurus C860 (pdaXrom 1.1.0beta1)
Buffalo WLI-CF-S11G 802.11b CF
Belkin F8T020 Bluetooth CF

DaveR

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« Reply #7 on: July 01, 2006, 01:39:54 pm »
1 I can see from the bug report
http://www.pdaxrom.org/buglist.php?doactio...owbug&bugid=289
that just removing the double-quotes from the secrets file does not work.

2 I tried the version of pppdialer you attached, karlto. Made it exec and replaced the one in /usr/lib/qt/bin. It does not run. However I don't know what the relationship between this GUI dialler and pppd is - I would have thought the GUI dialler simply calls pppd - in which case  the error is probably in pppd. Can anyone confirm that?

3 Loaded minicom and connected manually:
Code: [Select]
AT
OK
ATE1
OK
AT+CBST=14,0,1;+chsn=2,1,0,8
OK
ATDT08450790007
CONNECT 9600


User Access Verification

Login:royal
Password:
Auth successful
Entering PPP mode.
Async interface address is unnumbered (FastEthernet0)
Your IP address is 195.8.75.43. MTU is 1500 bytes
Header compression is on.

~}#.!}!.} ,}"}&} }*} } }%}&�r}(}'}"}(}"}1}$}%�3}4}!fuk-energis-cisco.d~~}#.!}!.} ,}"}&} }*} } }%}&�r}(}'}"}(}"}1}$}%�3}4}!fuk-energis-ciscoY}+~~}#.!}

(repeats)
That all looks reasonable to me.

4 I suppose it's possible  that pppd is authenticating OK but failing after that. IFCONFIG doesn't show an i/f and no DNS addresses are put in /etc/resolve.conf. However,  if the double-quotes bug is in pppd then it's probably failing in PAP. Any ideas how to tell?

Dave
Dave Royal
Sharp Zaurus C860 (pdaXrom 1.1.0beta1)
Buffalo WLI-CF-S11G 802.11b CF
Belkin F8T020 Bluetooth CF

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« Reply #8 on: July 02, 2006, 04:38:16 pm »
Hi DaveR

Logging - those messages should show up in /var/log/messages provided you have syslog running (it is by default).

Yes, as far as I know the pppdialer program just calls pppd. I found using the graphical setup was the only way I could get all the settings right though to make it all work. I didn't have much success with pppd on the command line.

Removing the double quotes from the secrets file doesn't work because the code in the dialer handles whether quotes already exist or not, and still adds extras! The recompiled version I uploaded needs you to install this compat library (because I compiled an old one) before it will run. The bug isn't in pppd.

Here is the contents of my peers file that works with my Nokia 6385 using a direct data connection (that's why the strange phone number):
Code: [Select]
/dev/ircomm0
115200
connect '/usr/sbin/chat -s -v ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT "BUSY" "" "at+crm=1;+cso=33" OK ATDT#777 CONNECT'
crtscts
noipdefault
modem
user "mobile@jamamobile"
usepeerdns
defaultroute
connect-delay 6000
remotename Telecom
Can't see any problems with any of yours though. Note that my Nokia won't connect using any machine if the init string is wrong; I see you've looked yours up though...

Obviously minicom proves everything works, so just keep trying different settings I guess.

Karl
SL6000-L, RC12

DaveR

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://
Ppp Connect To Nokia Mobile [solved]
« Reply #9 on: July 03, 2006, 06:52:27 am »
SUCCESS

I installed libstdcxx5-compat_5.0.7_armv5tel.ipk which made your version of /usr/lib/qt/bin/dialler work, Karl. But not with my pppd script. So I amended yours, and it worked. I can't see what the critical difference is, but nevermind.

For the record:

The pppd script
Code: [Select]
# DR 3/7/2006
# based on karl's ppp script
# http://www.oesf.org/forums/index.php?showtopic=20229
# modified for Bluetooth, FreeUK dialup, & CSD
/dev/rfcomm0
115200
connect '/usr/sbin/chat -s -v ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT "BUSY" "" "AT+CBST=14,0,1;+chsn=2,1,0,8" OK ATDT08450790007 CONNECT'
crtscts
noipdefault
modem
user royal
usepeerdns
defaultroute
connect-delay 6000
remotename FreeUK1

To logfile (why didn't any of the sent/rcvd ppp dialogue show up before - it was before the PAP issue?)
Code: [Select]
Jul  3 10:44:44 pppd[1131]: pppd 2.4.3 started by root, uid 0
Jul  3 10:44:45 chat[1133]: abort on (NO CARRIER)
Jul  3 10:44:45 chat[1133]: abort on (NO DIALTONE)
Jul  3 10:44:45 chat[1133]: abort on (BUSY)
Jul  3 10:44:45 chat[1133]: send (AT+CBST=14,0,1;+chsn=2,1,0,8^M)
Jul  3 10:44:46 chat[1133]: expect (OK)
Jul  3 10:44:46 chat[1133]: AT+CBST=14,0,1;+chsn=2,1,0,8^M^M
Jul  3 10:44:46 chat[1133]: OK
Jul  3 10:44:46 chat[1133]:  -- got it
Jul  3 10:44:46 chat[1133]: send (ATDT08450790007^M)
Jul  3 10:44:46 chat[1133]: expect (CONNECT)
Jul  3 10:44:46 chat[1133]: ^M
Jul  3 10:45:09 chat[1133]: ATDT08450790007^M^M
Jul  3 10:45:09 chat[1133]: CONNECT
Jul  3 10:45:09 chat[1133]:  -- got it
Jul  3 10:45:09 pppd[1131]: Serial connection established.
Jul  3 10:45:09 pppd[1131]: using channel 1
Jul  3 10:45:09 pppd[1131]: Using interface ppp0
Jul  3 10:45:09 pppd[1131]: Connect: ppp0 <--> /dev/rfcomm0
Jul  3 10:45:15 pppd[1131]: sent [LCP ConfReq id=0x1 ]
Jul  3 10:45:17 pppd[1131]: rcvd [LCP ConfReq id=0x14 ]
Jul  3 10:45:17 pppd[1131]: sent [LCP ConfRej id=0x14 ]
Jul  3 10:45:18 pppd[1131]: sent [LCP ConfReq id=0x1 ]
Jul  3 10:45:18 pppd[1131]: rcvd [LCP ConfReq id=0x15 ]
Jul  3 10:45:18 pppd[1131]: sent [LCP ConfAck id=0x15 ]
Jul  3 10:45:21 pppd[1131]: sent [LCP ConfReq id=0x1 ]
Jul  3 10:45:22 pppd[1131]: rcvd [LCP ConfReq id=0x16 ]
Jul  3 10:45:22 pppd[1131]: sent [LCP ConfRej id=0x16 ]
Jul  3 10:45:22 pppd[1131]: rcvd [LCP ConfAck id=0x1 ]
Jul  3 10:45:22 pppd[1131]: rcvd [LCP ConfReq id=0x17 ]
Jul  3 10:45:22 pppd[1131]: sent [LCP ConfAck id=0x17 ]
Jul  3 10:45:22 pppd[1131]: sent [PAP AuthReq id=0x1 user="royal" password=]
Jul  3 10:45:23 pppd[1131]: rcvd [PAP AuthAck id=0x1 ""]
Jul  3 10:45:23 pppd[1131]: PAP authentication succeeded
Jul  3 10:45:23 insmod: Warning: loading /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/net/ppp_deflate.o will taint the kernel: non-GPL license - BSD without advertisement clause
Jul  3 10:45:23 insmod:   See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Jul  3 10:45:23 insmod: Module ppp_deflate loaded, with warnings
Jul  3 10:45:23 pppd[1131]: sent [CCP ConfReq id=0x1 ]
Jul  3 10:45:23 pppd[1131]: sent [IPCP ConfReq id=0x1 ]
Jul  3 10:45:23 pppd[1131]: rcvd [IPCP ConfReq id=0x52 ]
Jul  3 10:45:23 pppd[1131]: sent [IPCP ConfAck id=0x52 ]
Jul  3 10:45:23 pppd[1131]: rcvd [proto=0x8207] 01 8f 00 04
Jul  3 10:45:23 pppd[1131]: Unsupported protocol 0x8207 received
Jul  3 10:45:23 pppd[1131]: sent [LCP ProtRej id=0x2 82 07 01 8f 00 04]
Jul  3 10:45:24 pppd[1131]: rcvd [LCP ProtRej id=0x18 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Jul  3 10:45:24 pppd[1131]: rcvd [IPCP ConfNak id=0x1 ]
Jul  3 10:45:24 pppd[1131]: sent [IPCP ConfReq id=0x2 ]
Jul  3 10:45:25 pppd[1131]: rcvd [IPCP ConfAck id=0x2 ]
Jul  3 10:45:25 pppd[1131]: local  IP address 195.8.75.149
Jul  3 10:45:25 pppd[1131]: remote IP address 217.158.114.108
Jul  3 10:45:25 pppd[1131]: primary   DNS address 212.126.144.2
Jul  3 10:45:25 pppd[1131]: secondary DNS address 212.126.144.13
Jul  3 10:45:25 pppd[1137]: Script /etc/ppp/ip-up started (pid 1138)
Jul  3 10:45:25 pppd[1137]: Script /etc/ppp/ip-up finished (pid 1138), status = 0x0
Jul  3 10:50:09 hcid[1035]: HCI dev 0 down
Jul  3 10:50:09 hcid[1035]: Stoping security manager 0
Jul  3 10:50:09 pppd[1137]: Modem hangup
Jul  3 10:50:09 pppd[1137]: Connect time 4.8 minutes.
Jul  3 10:50:09 pppd[1137]: Sent 3499 bytes, received 28008 bytes.
Jul  3 10:50:09 hcid[1035]: HCI dev 0 unregistered
Jul  3 10:50:09 pppd[1137]: Script /etc/ppp/ip-down started (pid 1191)
Jul  3 10:50:09 pppd[1137]: Connection terminated.
Jul  3 10:50:09 pppd[1137]: Waiting for 1 child processes...
Jul  3 10:50:09 pppd[1137]:   script /etc/ppp/ip-down, pid 1191
Jul  3 10:50:10 pppd[1137]: Script /etc/ppp/ip-down finished (pid 1191), status = 0x0

Here is the lash-up script I use to connect bluetooth with the Nokia - I inserted the waits 'cos each command seems to take a while.

Code: [Select]
#!/bin/sh
#
# Connects Bluetooth to Nokia 6310i
# DR 21/5/2006
#
echo "Turn on phone, activate Bluetooth, then hit ENTER"
read anyresponse
hciattach ttyS3 bcsp
read anyresponse
hciconfig
read anyresponse
hcitool dev
read anyresponse
hcitool cc 00:60:57:6C:2A:xx (the phone's address)
read anyresponse
hcitool con
read anyresponse
rfcomm connect hci0 00:60:57:6C:2A:xx 1

Thanks again Karl.  
Dave
Dave Royal
Sharp Zaurus C860 (pdaXrom 1.1.0beta1)
Buffalo WLI-CF-S11G 802.11b CF
Belkin F8T020 Bluetooth CF

jose-vi

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Ppp Connect To Nokia Mobile [solved]
« Reply #10 on: July 10, 2006, 04:39:36 am »
Hello Karl
I created a new post about my problem to access internet with my n gage Nokia mobil Phone, and as  see you know how to solve this.
As you know I have not much adnowledge in linux and I heve been unable to connect my zaurus sl c 1000 to internet or to other computer.
I have Pdaxrom beta 3, using Irda to connect to my other mobil (3g Sharp z 300) it and the Zaurus are unable to conect betwen they (I am unable to send or receibe any file or data from or out one to other),
I acces to xirda (program to send and receip data by Irda port in Pdaxrom) but it do not work.
I activated first my irda in my Phone, but nothing happens.
Could you helpme?