Linux bluetooth development
 help / color / mirror / Atom feed
From: Max Krasnyansky <maxk@qualcomm.com>
To: Maksim Yevmenkin <Maksim.Yevmenkin@cw.com>
Cc: Alexandros Karypidis <karypid@inf.uth.gr>,
	Marcel Holtmann <marcel@rvs.uni-bielefeld.de>,
	bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] How do I obtain a free PSM  automatically?
Date: Tue, 11 Feb 2003 13:09:17 -0800	[thread overview]
Message-ID: <5.1.0.14.2.20030211122302.04281ca8@mail1.qualcomm.com> (raw)
In-Reply-To: <3E4956A6.3CC2A841@cw.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; CHARSET=us-ascii, Size: 3403 bytes --]

At 12:01 PM 2/11/2003 -0800, Maksim Yevmenkin wrote:
>> btw Originally PSM was supposed to be assigned by Bluetooth SIG. ie. Just like
>> well known IP port. And then some "clever" people came up with the idea of dynamic
>> PSMs (probably the same people decided that PSM field needs 'an extension
>> bit' and made half of the PSMs space invalid). Unfortunately those "clever"
>> people didn't realize that [:[dynamic CID] is stupid.
>
>well there is nothing *really* wrong with extenstion. 
In Bluetooth case there is :). They simply reduced available number of PSMs by half.
Current spec does not permit PSM field to be longer than two bytes.
Actually it's not even half it a quarter because first bit of the second byte must 
always be 0. So only 16384 out of 65535 are available.

>i think it is just a safeguard. however i think this is way to optimistic.
>i just can't imagine that Bluetooth can ever use up all 65536
>or even 32768) PSMs. IP has lived with 65536 ports since the
>day one. 
My point exactly.

>i missed "dynamic PSM" stuff. was it somewhere is spec?
Here is PSM definition from 1.1 spec
----
Protocol/Service Multiplexor (PSM): 2 octets (minimum)
The PSM field is two octets (minimum) in length. The structure of the PSM
field is based on the ISO 3309 extension mechanism for address fields. All
PSM values must be ODD, that is, the least significant bit of the least signifi-cant
octet must be ’1’. Also, all PSM values must be assigned such that the
least significant bit of the most significant octet equals ’0’. This allows the
PSM field to be extended beyond 16 bits. PSM values are separated into
two ranges. Values in the first range are assigned by the Bluetooth SIG and
indicate protocols. The second range of values are dynamically allocated
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and used in conjunction with the Service Discovery Protocol (SDP). The
dynamically assigned values may be used to support multiple implementa-tions
of a particular protocol

PSM value Description
0x0001   Service Discovery Protocol
0x0003   RFCOMM
0x0005   Telephony Control Protocol
<0x1000 RESERVED
[0x1001-0xFFFF] DYNAMICALLY ASSIGNED
        ^^^^^^^^^^^^^^^^^^^
----
btw Fellas according to the extension bit rules 0xFFFF is illegal PSM. 
0xfeff is the last legal one.

>> When you add [dynamic DLCI] op top for RFCOMM sessions it becomes ridiculous :).
>> And I'm not even sure what to call it when you add [dynamic OBEX channel] ;-)
>
>whoa! i missed them too :) what exactly dynamic DLCI and 
>dynamic OBEX channel mean? does it mean that user select
>channel (DLCI) and give to server app? or does it mean
>that server app itself somehow figures out available DCLI
>and get it? 
Same as PSM. Server allocates RFCOMM channel number dynamically and registers it with SDP.

>and what the hell is dynamic OBEX channel? OBEX works
>over RFCOMM so it needs RFCOMM channel (DLCI), right?
OBEX has Connection Id and stuff. So it also does it's own multiplexing.

>> Anyhow, we may have to provide dynamic PSM and DLCI service just because it may
>> become a common thing on other platforms and stacks.
>
>examples please :) what platforms/stacks do support these features? 
I believe Widcomm BTW supports it.
And if I remember correctly Palm OS stack has something like that too.

>how they use it? 
Server dynamically allocates PSM and registers it with SDP.

Max

  reply	other threads:[~2003-02-11 21:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200302071951.35073.karypid@inf.uth.gr>
     [not found] ` <1044653120.32671.4.camel@pegasus.local>
2003-02-08 11:42   ` [Bluez-users] How do I obtain a free PSM automatically? Stephen Crane
     [not found] ` <200302072329.21333.karypid@inf.uth.gr>
     [not found]   ` <1044653775.32672.14.camel@pegasus.local>
2003-02-08 15:40     ` Alexandros Karypidis
2003-02-08 16:14       ` [Bluez-devel] " Alexandros Karypidis
2003-02-10 21:13         ` Max Krasnyansky
2003-02-11 12:01           ` Marcel Holtmann
2003-02-11 17:26             ` Alexandros Karypidis
2003-02-11 17:52               ` Maksim Yevmenkin
2003-02-11 18:58               ` Max Krasnyansky
2003-02-11 18:06             ` Max Krasnyansky
2003-02-17 14:12               ` Marcel Holtmann
2003-02-18 21:06                 ` Max Krasnyansky
2003-02-18 23:00                   ` Marcel Holtmann
2003-02-19 20:04                     ` Max Krasnyansky
2003-02-11 16:30           ` Alexandros Karypidis
2003-02-10 20:49       ` Max Krasnyansky
2003-02-11 16:22         ` Alexandros Karypidis
2003-02-11 18:04           ` [Bluez-devel] " Maksim Yevmenkin
2003-02-11 18:52             ` Max Krasnyansky
2003-02-11 20:01               ` Maksim Yevmenkin
2003-02-11 21:09                 ` Max Krasnyansky [this message]
2003-02-11 18:23           ` [Bluez-devel] Re: [Bluez-users] " Max Krasnyansky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.0.14.2.20030211122302.04281ca8@mail1.qualcomm.com \
    --to=maxk@qualcomm.com \
    --cc=Maksim.Yevmenkin@cw.com \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=karypid@inf.uth.gr \
    --cc=marcel@rvs.uni-bielefeld.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox