Author Topic: Bluetooth Dial-up Always Asks For Z Pin  (Read 3400 times)

jackburton

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
Bluetooth Dial-up Always Asks For Z Pin
« on: January 19, 2007, 12:31:18 pm »
Hello,

I'm using a Zaurus 3100 with a Socket Bluetooth Card. I'm connecting to my Ericsson w810i using qtopia bluetooth applet to dial-up to the internet. Everything works fine. My issue is this:

Everytime the Z dials the phone, the phone asks for the Z's PIN. I always enter the pin and always get a connection. How come the phone always asks for the PIN? I thought after initial pairing, it shouldn't happen again. I don't want to have to take my phone out of my pocket to enter the PIN.

I have told the phone to "Always Allow" the Z, but it always asks for the PIN.

Does anybody else have this issue with their phones?

BTW, my Palm Tungsten E2 can dial-up w/o password after the first pairing occurred, so I assume this problem is in the way the Z negotiates BT connection with phone and not a problem with the phone.

FWIW, here is the INIT string for the Palm
Code: [Select]
E0X1+CMEE=1;+CMGF=0;V1
Also, FWIW, the phone is listed as a "Trusted Device" on the Palm. Where is the list of "Trusted Devices" on the Z?

TIA
« Last Edit: January 19, 2007, 12:55:21 pm by jackburton »

harvell

  • Full Member
  • ***
  • Posts: 241
    • View Profile
    • http://
Bluetooth Dial-up Always Asks For Z Pin
« Reply #1 on: January 19, 2007, 01:20:15 pm »
When I was running w/ Cacko it would do the same thing.  I haven't noticed it with pdaXrom.  Did you try changing the pin in /etc/bluetooth/pin ???
C1000 w/...  Cacko Lite (When I use the Z alot for business)... pdaXrom (when I see something cool and want to try it.  Best way for me to learn shell commands)
Eee PC for Mrs. Harvell  
4G SD

harvell

  • Full Member
  • ***
  • Posts: 241
    • View Profile
    • http://
Bluetooth Dial-up Always Asks For Z Pin
« Reply #2 on: January 19, 2007, 01:20:33 pm »
Actually what ROM are you using????
C1000 w/...  Cacko Lite (When I use the Z alot for business)... pdaXrom (when I see something cool and want to try it.  Best way for me to learn shell commands)
Eee PC for Mrs. Harvell  
4G SD

jackburton

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
Bluetooth Dial-up Always Asks For Z Pin
« Reply #3 on: January 19, 2007, 01:28:37 pm »
Quote
Actually what ROM are you using????
[div align=\"right\"][a href=\"index.php?act=findpost&pid=151697\"][{POST_SNAPBACK}][/a][/div]


Stock Sharp ROM
qtopia-bluetoothnetworkapplet 1.0.1

jackburton

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
Bluetooth Dial-up Always Asks For Z Pin
« Reply #4 on: January 19, 2007, 01:44:25 pm »
Quote
Stock Sharp ROM
qtopia-bluetoothnetworkapplet 1.0.1
[div align=\"right\"][a href=\"index.php?act=findpost&pid=151698\"][{POST_SNAPBACK}][/a][/div]

More info.

Removing /etc/bluetooth/pin does nothing. It still works the same.

HOWEVER,
  commenting the line
Code: [Select]
echo "PIN:1234"
in /usr/bin/bluepin causes the phone to reject the Bluetooth connection. It still asks for a PIN, though.

It seems the phone wants to add the Z every time,
and then I enter my PIN into the phone,
which is validated by the Z's response from /usr/bin/bluepin

jackburton

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
Bluetooth Dial-up Always Asks For Z Pin
« Reply #5 on: January 19, 2007, 01:51:28 pm »
Just doing a
Code: [Select]
rfcomm connect 1  00:16:XX:XX:XX:XX
causes the phone to prompt for the PIN as well.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3694
    • View Profile
Bluetooth Dial-up Always Asks For Z Pin
« Reply #6 on: January 19, 2007, 04:22:18 pm »
Quote
  commenting the line
Code: [Select]
echo "PIN:1234"
in /usr/bin/bluepin causes the phone to reject the Bluetooth connection. It still asks for a PIN, though.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=151702\"][{POST_SNAPBACK}][/a][/div]

it should really be
    echo -n "PIN:1234"


or even
    echo -n "PIN:"
    cat /etc/bluetooth/pin

where /etc/bluetooth/pin contains just "1234" with no end of line.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

jackburton

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
Bluetooth Dial-up Always Asks For Z Pin
« Reply #7 on: January 19, 2007, 05:56:55 pm »
Quote
it should really be
    echo -n "PIN:1234"


or even
    echo -n "PIN:"
    cat /etc/bluetooth/pin

where /etc/bluetooth/pin contains just "1234" with no end of line.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=151724\"][{POST_SNAPBACK}][/a][/div]

Thank you, but sadly it did not work.

I tried both of your suggestions and I still get the prompt from the phone.

Where exactly in the stack does the pairing process occur? It's almost as if the Z presents itself to the phone as a different device each time.

I wonder if I try with my Ubuntu desktop if it would behave the same.

jackburton

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
Bluetooth Dial-up Always Asks For Z Pin
« Reply #8 on: January 19, 2007, 06:18:57 pm »
This is just a shot in the dark, but would the OBEX Push service help?

I noticed that my laptop (running windows and bluesoleil) and the Palm (this is the only service running on the Palm) both have this service running when I browse services from my phone. When I browse services from my phone on the Z, it says nothing is running.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3694
    • View Profile
Bluetooth Dial-up Always Asks For Z Pin
« Reply #9 on: January 19, 2007, 06:23:25 pm »
Quote
I tried both of your suggestions and I still get the prompt from the phone.

Where exactly in the stack does the pairing process occur? It's almost as if the Z presents itself to the phone as a different device each time.

I wonder if I try with my Ubuntu desktop if it would behave the same.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=151737\"][{POST_SNAPBACK}][/a][/div]

look for a file called /etc/bluetooth/link_key or similar, delete it (it's the Z's database of paired devices), then on the phone delete the pairing, and turn it off, remove its battery for 10s, then power it on and try pairing again.

p.s. ensure that /etc/bluetooth/hcid.conf has a static name defined for the Z, i.e make it hard-wired.
« Last Edit: January 19, 2007, 06:24:09 pm by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3694
    • View Profile
Bluetooth Dial-up Always Asks For Z Pin
« Reply #10 on: January 19, 2007, 06:26:21 pm »
Quote
This is just a shot in the dark, but would the OBEX Push service help?

I noticed that my laptop (running windows and bluesoleil) and the Palm (this is the only service running on the Palm) both have this service running when I browse services from my phone. When I browse services from my phone on the Z, it says nothing is running.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=151738\"][{POST_SNAPBACK}][/a][/div]

no, I don't think so. this is a much higher level than the pairing process. you can tweak the device ID if you wish. I modified the hcid.conf on my server so I could play...

*edit* oops, I copied in the suse default one
Code: [Select]
       # Service class - OR these together - note that this is
        # only really used for initial scan for services by a
        # bluetooth scanning device, it will then use SDP to
        # find what's running.
        # IAC https://www.bluetooth.org/foundry/assignnumb/document/baseband
        #  0x002bbb = "Limited Discoverable Mode [Ref#1]"
        #  0x004bbb = "reserved"
        #  0x008bbb = "reserved"
        #  0x010bbb = "Positioning (Location identification)"
        #  0x020bbb = "Networking (LAN,Ad hoc,..)"
        #  0x040bbb = "Rendering (Printing,Speaker,..)"
        #  0x080bbb = "Capturing (Scanner, Microphone,..)"
        #  0x100bbb = "Object Transfer  (v-Inbox,v-Folder,..)"
        #  0x200bbb = "Audio (Speaker,Microphone,Headset service,..)
        #  0x400bbb = "Telephony (Cordless telephony, Modem, Headset service,...)"
        #  0x800bbb = "Information (WEB-server, WAP-server, ...)"
        #
        # Major/Minor device class
        #  The 'sss' above define the service-class, add value below
        #  0xss01bb = Computer type of device
        #  0xss0100 = .. uncategorized
        #  0xss0104 = .. Desktop
        #  0xss0108 = .. Server
        #  0xss010c = .. Laptop
        #  0xss0110 = .. Handheld PC/PDA (clamshell)
        #  0xss0114 = .. Handheld PC/PDA (palm sized)
        #  0xss0118 = .. Wearable Computer (watch sized)
        #  0xss01xx = other values reserved
        class 0x920104;

the device class is supplemented by the SDP daemon announcing what is running.
« Last Edit: January 19, 2007, 06:30:17 pm by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

jackburton

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
Bluetooth Dial-up Always Asks For Z Pin
« Reply #11 on: January 20, 2007, 11:38:13 am »
Thanks! That worked! The only difference is that I had to delete
Code: [Select]
/var/lib/bluetooth/xx:xx:xx:xx:xx:xx/linkkeys
I dial-up to the zaurus and in seconds I'm online using Cingular. This is awesome. My phone stays in my pocket , which used to be soooooo annoying before when I had to always enter the pin.

Thanks again.  

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3694
    • View Profile
Bluetooth Dial-up Always Asks For Z Pin
« Reply #12 on: January 20, 2007, 04:36:49 pm »
Quote
Thanks! That worked! The only difference is that I had to delete
Code: [Select]
/var/lib/bluetooth/xx:xx:xx:xx:xx:xx/linkkeysThanks again. 
[div align=\"right\"][a href=\"index.php?act=findpost&pid=151806\"][{POST_SNAPBACK}][/a][/div]

sounds like the linkkeys file had become corrupted, so although the Z did the pairing each time, when it stored the keys it couldn't reuse it and created a new session key each time.

I used to have this sort of problem when I only had one BT dongle (when they used to cost 50 dollars+) and transferred it from PC to PC, it used to confuse my Palm and Zaurus and I had to jump through hoops to unpair and re-pair. Now dongles are just US$15 I have three (well, two, I lost one on vacation, sadly, the best one :-(

glad to help.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.