2004-11-04 12:59:33

by D.W.

[permalink] [raw]
Subject: [Bluez-users] Network Access Point - pairing problem

Hi Marcel,

it works perfectly now. Thank you very much for your help.
Where can I change this pin?
I assumed the pin is determined in hcid.conf.
Regards Daniel

--
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum superg?nstigen Komplett-Preis!



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users


2004-11-05 17:46:17

by Peter K. Martin

[permalink] [raw]
Subject: AW: [Bluez-users] Again dund

Hi Marcel,
refering to Linux I'm a very beginner and thatfore excuse my mistakes,
please

ps x gave me:

Linux-Notebook:~ # ps x
...........
5173 ? Ss 0:00 hcid: processing events
etc ...........

but the hcidump -x
Linux-Notebook:~ # hcidump -x
HCIDump - HCI packet analyzer ver 1.7
device: hci0 snap_len: 1028 filter: 0xffffffff
<-- at this point the program stopped and I terminated with crtl-c

I need some aditional help for the manual of hcid.conf=20

nn:nn:nn:nn:nn:nn <--- how can I give the address of the BT-modul? what
does this mean?

Parameters specified within this section will be applied =
to
the device with =20
this device bluetooth address. All other
parameters are applied=20
from the default section.



pin_helper "file"

The path to the PIN helper application. The default is
"/bin/bluepin". The=20
following
output is expected from the PIN helper:

PIN:12345678 <-- I need another PIN, how zo do this?

Or, when no PIN is available:

ERR

Thanks and regards
Peter


##>-----Urspr=FCngliche Nachricht-----
##>Von: [email protected]=20
##>[mailto:[email protected]] Im Auftrag=20
##>von Marcel Holtmann
##>Gesendet: Freitag, 5. November 2004 15:28
##>An: BlueZ Mailing List
##>Betreff: Re: [Bluez-users] AW: Re: Again dund
##>
##>
##>Hi Peter,
##>
##>> during my efforts to bring up a bluetooth connection, I'm always=20
##>> logged in as root.
##>>=20
##>> I checked with ps, here the result:
##>>=20
##>> Linux-Notebook:~ # ps
##>> PID TTY TIME CMD
##>> 6340 pts/1 00:00:00 bash
##>> 6348 pts/1 00:00:00 ps
##>> Linux-Notebook:~ # hcid
##>> Linux-Notebook:~ # ps
##>> PID TTY TIME CMD
##>> 6340 pts/1 00:00:00 bash
##>> 6363 pts/1 00:00:00 ps
##>
##>reading the manual page of ps may help. Or try "ps x" ;)
##>
##>> Then I initializedb the BT-function of my Toshiba-laptop:
##>>=20
##>> Linux-Notebook:~ # dmabt
##>> Linux-Notebook:~ # ps
##>> PID TTY TIME CMD
##>> 6340 pts/1 00:00:00 bash
##>> 6462 pts/1 00:00:00 ps
##>> Linux-Notebook:~ # hcid
##>> Linux-Notebook:~ # ps
##>> PID TTY TIME CMD
##>> 6340 pts/1 00:00:00 bash
##>> 6552 pts/1 00:00:00 ps
##>>=20
##>> The next step was to use the hcitool:
##>>=20
##>> Linux-Notebook:~ # hcitool scan
##>> Scanning ...
##>> 00:0B:CE:00:01:8F Bluetooth-Modul
##>> 00:02:EE:D0:49:44 PkM 6820
##>>=20
##>> the BT-Modul and my handy (Nokia 6820) were detected. With=20
##>sdptool I=20
##>> tried to get the available services, at first of the BT-Modul:
##>>=20
##>> Linux-Notebook:~ # sdptool browse 00:0B:CE:00:01:8F
##>> Failed to connect to SDP server on 00:0B:CE:00:01:8F: Connection=20
##>> refused
##>>=20
##>> and second my handy:
##>>=20
##>> Linux-Notebook:~ # sdptool browse 00:02:EE:D0:49:44
##>> Browsing 00:02:EE:D0:49:44 ...
##>> Service Name: OBEX Object Push
##>> Service RecHandle: 0x10000
##>> Service Class ID List:
##>> "OBEX Object Push" (0x1105)
##>> Protocol Descriptor List:
##>> "L2CAP" (0x0100)
##>> "RFCOMM" (0x0003)
##>> Channel: 9
##>> "OBEX" (0x0008)
##>> Language Base Attr List:
##>> code_ISO639: 0x656e
##>> encoding: 0x6a
##>> base_offset: 0x100
##>> Profile Descriptor List:
##>> "OBEX Object Push" (0x1105)
##>> Version: 0x0100
##>> etc........
##>>=20
##>> At the moment I don't know how to get the daemon hcid=20
##>running. I think=20
##>> if this daemon runs, many of the problems are solved, aren't they?
##>
##>You must run "hcidump -x" to see what is going on.
##>
##>Regards
##>
##>Marcel
##>
##>
##>
##>
##>-------------------------------------------------------
##>This SF.Net email is sponsored by:
##>Sybase ASE Linux Express Edition - download now for FREE=20
##>LinuxWorld Reader's Choice Award Winner for best database on=20
##>Linux. http://ads.osdn.com/?ad_id=3D5588&alloc_id=3D12065&op=3Dclick
##>_______________________________________________
##>Bluez-users mailing list
##>[email protected]=20
##>##>https://lists.sourceforge.net/lists/listinfo/bluez-users/list
##>info/bluez-users
##>




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users

2004-11-05 14:27:47

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] AW: Re: Again dund

Hi Peter,

> during my efforts to bring up a bluetooth connection, I'm always logged in
> as root.
>
> I checked with ps, here the result:
>
> Linux-Notebook:~ # ps
> PID TTY TIME CMD
> 6340 pts/1 00:00:00 bash
> 6348 pts/1 00:00:00 ps
> Linux-Notebook:~ # hcid
> Linux-Notebook:~ # ps
> PID TTY TIME CMD
> 6340 pts/1 00:00:00 bash
> 6363 pts/1 00:00:00 ps

reading the manual page of ps may help. Or try "ps x" ;)

> Then I initializedb the BT-function of my Toshiba-laptop:
>
> Linux-Notebook:~ # dmabt
> Linux-Notebook:~ # ps
> PID TTY TIME CMD
> 6340 pts/1 00:00:00 bash
> 6462 pts/1 00:00:00 ps
> Linux-Notebook:~ # hcid
> Linux-Notebook:~ # ps
> PID TTY TIME CMD
> 6340 pts/1 00:00:00 bash
> 6552 pts/1 00:00:00 ps
>
> The next step was to use the hcitool:
>
> Linux-Notebook:~ # hcitool scan
> Scanning ...
> 00:0B:CE:00:01:8F Bluetooth-Modul
> 00:02:EE:D0:49:44 PkM 6820
>
> the BT-Modul and my handy (Nokia 6820) were detected. With sdptool I tried
> to get the available services, at first of the BT-Modul:
>
> Linux-Notebook:~ # sdptool browse 00:0B:CE:00:01:8F
> Failed to connect to SDP server on 00:0B:CE:00:01:8F: Connection refused
>
> and second my handy:
>
> Linux-Notebook:~ # sdptool browse 00:02:EE:D0:49:44
> Browsing 00:02:EE:D0:49:44 ...
> Service Name: OBEX Object Push
> Service RecHandle: 0x10000
> Service Class ID List:
> "OBEX Object Push" (0x1105)
> Protocol Descriptor List:
> "L2CAP" (0x0100)
> "RFCOMM" (0x0003)
> Channel: 9
> "OBEX" (0x0008)
> Language Base Attr List:
> code_ISO639: 0x656e
> encoding: 0x6a
> base_offset: 0x100
> Profile Descriptor List:
> "OBEX Object Push" (0x1105)
> Version: 0x0100
> etc........
>
> At the moment I don't know how to get the daemon hcid running. I think if
> this daemon runs, many of the problems are solved, aren't they?

You must run "hcidump -x" to see what is going on.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users

2004-11-05 14:00:08

by Peter K. Martin

[permalink] [raw]
Subject: [Bluez-users] AW: Re: Again dund

Hi Marcel,
during my efforts to bring up a bluetooth connection, I'm always logged in
as root.

I checked with ps, here the result:

Linux-Notebook:~ # ps
PID TTY TIME CMD
6340 pts/1 00:00:00 bash
6348 pts/1 00:00:00 ps
Linux-Notebook:~ # hcid
Linux-Notebook:~ # ps
PID TTY TIME CMD
6340 pts/1 00:00:00 bash
6363 pts/1 00:00:00 ps

Then I initializedb the BT-function of my Toshiba-laptop:

Linux-Notebook:~ # dmabt
Linux-Notebook:~ # ps
PID TTY TIME CMD
6340 pts/1 00:00:00 bash
6462 pts/1 00:00:00 ps
Linux-Notebook:~ # hcid
Linux-Notebook:~ # ps
PID TTY TIME CMD
6340 pts/1 00:00:00 bash
6552 pts/1 00:00:00 ps

The next step was to use the hcitool:

Linux-Notebook:~ # hcitool scan
Scanning ...
00:0B:CE:00:01:8F Bluetooth-Modul
00:02:EE:D0:49:44 PkM 6820

the BT-Modul and my handy (Nokia 6820) were detected. With sdptool I tried
to get the available services, at first of the BT-Modul:

Linux-Notebook:~ # sdptool browse 00:0B:CE:00:01:8F
Failed to connect to SDP server on 00:0B:CE:00:01:8F: Connection refused

and second my handy:

Linux-Notebook:~ # sdptool browse 00:02:EE:D0:49:44
Browsing 00:02:EE:D0:49:44 ...
Service Name: OBEX Object Push
Service RecHandle: 0x10000
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 9
"OBEX" (0x0008)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100
etc........

At the moment I don't know how to get the daemon hcid running. I think if
this daemon runs, many of the problems are solved, aren't they?

Regards
Peter


> Hi Peter,
>
> > I tried to start hcid by typing it at the command-line, but I don't
> > know how to control if this daemon runs.
>
> check with ps. You must run it as root and only one hcid process at the
same time is > allowed.
>
> > Hcidump -x gives nearly no response, only the version-no
>
> Then there is something wrong. You must at least see something when you
run an inquiry or
> create a connection. Do this as root.
>
> Regards
>
> Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users

2004-11-04 14:22:42

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Network Access Point - pairing problem

Hi Jouni,

> > > > HCI Event: PIN Code Request(0x16) plen 6
> > > B0 3A 4C 3D 0F 00
> > > < HCI Command: PIN Code Request Reply(0x01|0x000d) plen 23
> > > B0 3A 4C 3D 0F 00 05 42 6C 75 65 5A 00 00 00 00 00 00 00 00
> > > 00 00 00
> >
> > The PIN code you entered is simply wrong. Try "BlueZ".
>
> btw, what and where is the tried PIN code in that hex dump? B0 3A 4C 3D 0F 00
> is obviously Bluetooth address of the remote host, so somewhere here
> is the PIN code "05 42 6C 75 65 5A 00 00 00 00 00 00 00 00 00 00 00",
> but how it is encoded?

you can use "hcidump -X" and you will see it. You can also read the
specification or think about what "05 42 6C 75 65 5A" maybe means ;)

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users

2004-11-04 13:43:46

by [email protected]

[permalink] [raw]
Subject: Re: [Bluez-users] Network Access Point - pairing problem

Hi MH,

On Thu, Nov 04, 2004 at 12:05:32PM +0100, Marcel Holtmann wrote:
> > > HCI Event: PIN Code Request(0x16) plen 6
> > B0 3A 4C 3D 0F 00
> > < HCI Command: PIN Code Request Reply(0x01|0x000d) plen 23
> > B0 3A 4C 3D 0F 00 05 42 6C 75 65 5A 00 00 00 00 00 00 00 00
> > 00 00 00
>
> The PIN code you entered is simply wrong. Try "BlueZ".

btw, what and where is the tried PIN code in that hex dump? B0 3A 4C 3D 0F 00
is obviously Bluetooth address of the remote host, so somewhere here
is the PIN code "05 42 6C 75 65 5A 00 00 00 00 00 00 00 00 00 00 00",
but how it is encoded?

// jouni



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users

2004-11-04 13:36:28

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Network Access Point - pairing problem

Hi Daniel,

> it works perfectly now. Thank you very much for your help.
> Where can I change this pin?
> I assumed the pin is determined in hcid.conf.

for incoming connections it is read from /etc/bluetooth/pin and you have
to restart hcid after that. Actually I like to change that and let hcid
always read the PIN from that file if needed. So patches are welcome.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users

2004-11-04 11:05:32

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Network Access Point - pairing problem

Hi Daniel,

> this is the output when I execute hciconfig -a.
> hci0: Type: USB
> BD Address: 00:02:5B:01:21:14 ACL MTU: 192:8 SCO MTU: 64:8
> UP RUNNING PSCAN ISCAN
> RX bytes:936 acl:0 sco:0 events:23 errors:0
> TX bytes:327 acl:0 sco:0 commands:22 errors:0
> Features: 0xff 0xff 0x0f 0x00
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
> Link policy: HOLD SNIFF PARK
> Link mode: ACCEPT MASTER
> Name: 'BlueZ (0)'
> Class: 0x000100
> Service Classes: Unspecified
> Device Class: Computer, Uncategorized
> HCI Ver: 1.1 (0x1) HCI Rev: 0x110 LMP Ver: 1.1 (0x1) LMP Subver: 0x110
> Manufacturer: Cambridge Silicon Radio (10)

you forcing a role switch (master role), but you aren't allowing it in
the link policy? Fix this.

> This is the output while trying to connect to the NAP at first contact:
>
> HCIDump - HCI packet analyzer ver 1.5
> device: hci0 snap_len: 1028 filter: 0xffffffff
> > HCI Event: Connect Request(0x04) plen 10
> B0 3A 4C 3D 0F 00 04 01 52 01
> < HCI Command: Accept Connection Request(0x01|0x0009) plen 7
> B0 3A 4C 3D 0F 00 00
> > HCI Event: Command Status(0x0f) plen 4
> 00 01 09 04
> > HCI Event: Role Change(0x12) plen 8
> 00 B0 3A 4C 3D 0F 00 00
> > HCI Event: Connect Complete(0x03) plen 11
> 00 28 00 B0 3A 4C 3D 0F 00 01 00
> < HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4
> 28 00 0E 00
> > HCI Event: Page Scan Repetition Mode Change(0x20) plen 7
> B0 3A 4C 3D 0F 00 01
> > HCI Event: Max Slots Change(0x1b) plen 3
> 28 00 05
> > HCI Event: Command Complete(0x0e) plen 6
> 01 0D 08 00 28 00
> < HCI Command: Change Connection Packet Type(0x01|0x000f) plen 4
> 28 00 18 CC
> > HCI Event: Command Status(0x0f) plen 4
> 00 01 0F 04
> > HCI Event: Connection Packet Type Changed(0x1d) plen 5
> 00 28 00 18 CC
> > HCI Event: PIN Code Request(0x16) plen 6
> B0 3A 4C 3D 0F 00
> < HCI Command: PIN Code Request Reply(0x01|0x000d) plen 23
> B0 3A 4C 3D 0F 00 05 42 6C 75 65 5A 00 00 00 00 00 00 00 00
> 00 00 00
> > HCI Event: Command Complete(0x0e) plen 10
> 01 0D 04 00 B0 3A 4C 3D 0F 00
> > HCI Event: Disconn Complete(0x05) plen 4
> 00 28 00 05

The PIN code you entered is simply wrong. Try "BlueZ".

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-03 20:15:25

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Network Access Point - pairing problem

Hi Daniel,

> I use kernel 2.4.22 on an axis devboard82. The bluez stack is not the
> latest(PAN, SDP, utils, libs are still seperate packages), because I
> had problems porting later versions to the devboard.

you use a version where many fixes are missing.

> But except the pairing problem at first contact it works perfectly.
> Except the PIN (it's a static one at server side) there is no further
> authentification necessary.
> Security mode 2 or 3? What do you mean? Can I check it?

What does "hciconfig -a" say?

> When I try to connect to the server at first contact, I have to enter
> the PIN(client side) and after entering the right pin I get the
> message :"Authentification failed."

Run "hcidump -x" and we can see what really happens.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-03 00:07:00

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Network Access Point - pairing problem

Hi Daniel,

> I want to use bluez for a standalone network access point. All works
> fine(pand or dund), the thing is that the pairing doesn't work at
> first contact (client is a windows-pc).
>
> So I have to establish a rfcomm-connection manually(from the server
> side rfcomm connect 0 btad) first. This pairing works, I disconnect
> and then I am able to connect the client to the NAT.
>
> Does anybody know what's wrong and what I can do to make the pairing
> work without this manually initiated rfcomm-connnection ?

are we talking about security mode 2 or security mode 3? What kernel do
you use?

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users