* [Bluez-users] l2test problem
@ 2004-03-22 4:33 Swarup Mohalik
2004-03-22 6:37 ` Marcel Holtmann
0 siblings, 1 reply; 7+ messages in thread
From: Swarup Mohalik @ 2004-03-22 4:33 UTC (permalink / raw)
To: bluez-users
I have BlueZ on a red hat 8 linux kerner 2.6.0.
I have built all the modules for bluetooth (I believe so).
I am able to send and receive to/from a Nokia 3650 via Obex Push.
I can establish a ppp connection as well and browse the web.
After all this, when I ran
l2test -s <phone bt address>,
I get the following output
[root@lx98218 tools]# cd ../test;./l2test -s 00:60:57:4A:25:DB
l2test[11744]: Can't connect. Connection refused(111)
hcidump data
[root@lx98218 bluetooth]# hcidump
HCIDump - HCI packet analyzer ver 1.6
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Link Key Notification(0x18) plen 23
> HCI Event: Connect Complete(0x03) plen 11
< ACL data: handle 0x0028 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 4097 scid 0x0040
< HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4
> HCI Event: Command Complete(0x0e) plen 6
> HCI Event: Number of Completed Packets(0x13) plen 5
> HCI Event: Max Slots Change(0x1b) plen 3
> ACL data: handle 0x0028 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0040 result 2 status 0
> HCI Event: QoS Setup Complete(0x0d) plen 21
< HCI Command: Disconnect(0x01|0x0006) plen 3
> HCI Event: Command Status(0x0f) plen 4
> HCI Event: Disconn Complete(0x05) plen 4
The original l2test.c uses PSM 10, which gives identical failure.
Please give me some clue.
Thanks in advance.
Swarup Mohalik
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] l2test problem
2004-03-22 4:33 [Bluez-users] l2test problem Swarup Mohalik
@ 2004-03-22 6:37 ` Marcel Holtmann
[not found] ` <405EBCDD.3090402@india.hp.com>
0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2004-03-22 6:37 UTC (permalink / raw)
To: mohalik; +Cc: BlueZ Mailing List
Hi Swarup,
> I have BlueZ on a red hat 8 linux kerner 2.6.0.
> I have built all the modules for bluetooth (I believe so).
>
> I am able to send and receive to/from a Nokia 3650 via Obex Push.
> I can establish a ppp connection as well and browse the web.
>
> After all this, when I ran
> l2test -s <phone bt address>,
>
> I get the following output
> [root@lx98218 tools]# cd ../test;./l2test -s 00:60:57:4A:25:DB
> l2test[11744]: Can't connect. Connection refused(111)
>
> hcidump data
>
> [root@lx98218 bluetooth]# hcidump
> HCIDump - HCI packet analyzer ver 1.6
> device: hci0 snap_len: 1028 filter: 0xffffffff
> > HCI Event: Link Key Notification(0x18) plen 23
> > HCI Event: Connect Complete(0x03) plen 11
> < ACL data: handle 0x0028 flags 0x02 dlen 12
> L2CAP(s): Connect req: psm 4097 scid 0x0040
> < HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4
> > HCI Event: Command Complete(0x0e) plen 6
> > HCI Event: Number of Completed Packets(0x13) plen 5
> > HCI Event: Max Slots Change(0x1b) plen 3
> > ACL data: handle 0x0028 flags 0x02 dlen 16
> L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0040 result 2 status 0
> > HCI Event: QoS Setup Complete(0x0d) plen 21
> < HCI Command: Disconnect(0x01|0x0006) plen 3
> > HCI Event: Command Status(0x0f) plen 4
> > HCI Event: Disconn Complete(0x05) plen 4
>
> The original l2test.c uses PSM 10, which gives identical failure.
may you wanna take a look at the Bluetooth specification and search for
result code 2 of the L2CAP connect response ;)
0x0002 Connection refused - PSM not supported.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] l2test problem
[not found] ` <405EBCDD.3090402@india.hp.com>
@ 2004-03-22 10:26 ` Marcel Holtmann
2004-03-22 10:57 ` Xavier Garreau
0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2004-03-22 10:26 UTC (permalink / raw)
To: mohalik; +Cc: BlueZ Mailing List
Hi Swarup,
> > may you wanna take a look at the Bluetooth specification and search for
> > result code 2 of the L2CAP connect response ;)
> >
> > 0x0002 Connection refused - PSM not supported.
> >
>
> Yes, I saw that earlier. But how do I get the supported PSM's?
> Are they available from the SDP records one gets from the output of
> "sdptool browse"?
> (are they the numbers beside L2CAP in the records?)
yes, they are the uint16 numbers besides the uuid16 protocol UUID for
L2CAP, but why do you want them? You asked about a mobile phone and most
of them are based on the higher layer RFCOMM. So far I haven't seen any
phone that support BNEP, HID or HCRP. And this means that in your case
only two PSM's are supported. PSM 1 for the SDP requests and PSM 3 for
the RFCOMM protocol.
> In case of l2test, which PSM (psm of which record) should it use?
The l2test program is for Linux-to-Linux testing and not really meant
for testing other devices. You should ask yourself what you are trying
to do.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] l2test problem
2004-03-22 10:26 ` Marcel Holtmann
@ 2004-03-22 10:57 ` Xavier Garreau
2004-03-22 13:39 ` Swarup Mohalik
0 siblings, 1 reply; 7+ messages in thread
From: Xavier Garreau @ 2004-03-22 10:57 UTC (permalink / raw)
To: BlueZ Mailing List
> yes, they are the uint16 numbers besides the uuid16 protocol UUID for
> L2CAP, but why do you want them? You asked about a mobile phone and most
> of them are based on the higher layer RFCOMM. So far I haven't seen any
> phone that support BNEP, HID or HCRP. And this means that in your case
> only two PSM's are supported. PSM 1 for the SDP requests and PSM 3 for
> the RFCOMM protocol.
Symbian Phones like Nokia 3650 allows you to use an L2CAP (or higher) api
for application programming.
But as with other bluetooth applications, you of course must have a server
llistening on a given PSM for it to answer "Connection accepted" (0).
mohalik, you should have a look at development papers from Sony Ericcson
(and maybe nokia) on symbian bluetooth programming (Basically, they also
provide a socket interface).
http://developer.sonyericsson.com/ (you'll have to create an account first)
BR,
--
Xavier Garreau <x.garreau@prim-time.fr>
Prim'Time Technology
http://www.prim-time.fr/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] l2test problem
2004-03-22 10:57 ` Xavier Garreau
@ 2004-03-22 13:39 ` Swarup Mohalik
2004-03-22 13:53 ` Xavier Garreau
2004-03-22 14:23 ` Marcel Holtmann
0 siblings, 2 replies; 7+ messages in thread
From: Swarup Mohalik @ 2004-03-22 13:39 UTC (permalink / raw)
To: Xavier Garreau; +Cc: BlueZ Mailing List
[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]
Thanks a lot Marcel and Xavier.
Actually I started with a client on the linux PC and a symbian server
on the nokia 3650. I used the API's for l2cap sockets and had set the
psm to 5 (arbitrary choice). Then i got the
connection refused(111)
message from the PC.
It was now that I wanted to use l2test as a client (just for the
connection part).
So I changed the psm in l2test.c to 5 and tested. But connection still
gets refused.
The reason for connect response is always - "psm not supported".
Does this mean that the nokia device may not have l2cap socket support?
I did not find any such information though on the web.
Marcel, please tell me if I am not addressing the forum.
Regards,
Swarup
Xavier Garreau wrote:
>>yes, they are the uint16 numbers besides the uuid16 protocol UUID for
>>L2CAP, but why do you want them? You asked about a mobile phone and most
>>of them are based on the higher layer RFCOMM. So far I haven't seen any
>>phone that support BNEP, HID or HCRP. And this means that in your case
>>only two PSM's are supported. PSM 1 for the SDP requests and PSM 3 for
>>the RFCOMM protocol.
>>
>>
>
>Symbian Phones like Nokia 3650 allows you to use an L2CAP (or higher) api
>for application programming.
>
>But as with other bluetooth applications, you of course must have a server
>llistening on a given PSM for it to answer "Connection accepted" (0).
>
>mohalik, you should have a look at development papers from Sony Ericcson
>(and maybe nokia) on symbian bluetooth programming (Basically, they also
>provide a socket interface).
>
>http://developer.sonyericsson.com/ (you'll have to create an account first)
>
>BR,
>
>
[-- Attachment #2: Type: text/html, Size: 2212 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] l2test problem
2004-03-22 13:39 ` Swarup Mohalik
@ 2004-03-22 13:53 ` Xavier Garreau
2004-03-22 14:23 ` Marcel Holtmann
1 sibling, 0 replies; 7+ messages in thread
From: Xavier Garreau @ 2004-03-22 13:53 UTC (permalink / raw)
To: mohalik; +Cc: BlueZ Mailing List
> Actually I started with a client on the linux PC and a symbian server
> on the nokia 3650. I used the API's for l2cap sockets and had set the
> psm to 5 (arbitrary choice). Then i got the
> connection refused(111)
> message from the PC.
> It was now that I wanted to use l2test as a client (just for the
connection part).
> So I changed the psm in l2test.c to 5 and tested. But connection still
gets refused.
> The reason for connect response is always - "psm not supported".
PSM 5 is reserved for Telephony Control Protocol so it can be tricky to
access it.
Use a PSM > 0x1000, odd, and with the least significant bit of the most
significant octet equal to 0.
Also look at the -P param for l2test ;-)
BR,
--
Xavier Garreau <x.garreau@prim-time.fr>
Prim'Time Technology
http://www.prim-time.fr/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] l2test problem
2004-03-22 13:39 ` Swarup Mohalik
2004-03-22 13:53 ` Xavier Garreau
@ 2004-03-22 14:23 ` Marcel Holtmann
1 sibling, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2004-03-22 14:23 UTC (permalink / raw)
To: mohalik; +Cc: Xavier Garreau, BlueZ Mailing List
Hi Swarup,
> Actually I started with a client on the linux PC and a symbian server
> on the nokia 3650. I used the API's for l2cap sockets and had set the
> psm to 5 (arbitrary choice). Then i got the
> connection refused(111)
> message from the PC.
>
> It was now that I wanted to use l2test as a client (just for the
> connection part).
> So I changed the psm in l2test.c to 5 and tested. But connection still
> gets refused.
> The reason for connect response is always - "psm not supported".
>
> Does this mean that the nokia device may not have l2cap socket
> support?
> I did not find any such information though on the web.
you must use a PSM > 0x1000, so PSM 4097 is the first usable choise and
of course your application on the Symbian must listen on that PSM for
incoming connection. From what your hcidump shows is that the problem is
on the phone side and so a problem of your symbian server code.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-03-22 14:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-22 4:33 [Bluez-users] l2test problem Swarup Mohalik
2004-03-22 6:37 ` Marcel Holtmann
[not found] ` <405EBCDD.3090402@india.hp.com>
2004-03-22 10:26 ` Marcel Holtmann
2004-03-22 10:57 ` Xavier Garreau
2004-03-22 13:39 ` Swarup Mohalik
2004-03-22 13:53 ` Xavier Garreau
2004-03-22 14:23 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).