|
Dynamically Assigning PSM Values to Support
Multiple Upper Protocol Implementations
Original Post: L2CAP - PSM Value (eGroups Msg. )
Date: 2000-08-24
The L2CAP spec (page. 278) say "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 [0x1001
- 0xffff] are dynamically allocated and used in conjunction with the
Service Discovery Protocol (SDP). The dynamically assigned values may be used to support
multiple implementations of a particular protocol, e.g., RFCOMM, residing on top of L2CAP
or for prototyping an experimental protocol."
Question
So the question is how would you go about deciding
what PSM value to assign to RFCOMM residing on top of L2CAP. For example, if the
connection requires SDP and RFCOMM channel, how can this PSM value be assigned.
Answer
Normally you would assign the default PSM-value to the protocols
that you have on top of L2CAP (e.g. RFCOMM is 0x0003). However, you can assign any
dynamically assigned number to any protocol. this is required if you have multiple
implementations of RFCOMM for example, as you have already used up your default PSM, so
you must assign the RFCOMM implementations different (dynamic) PSM values
These PSM values would be handled by the SDP, as you have to write
into your SDP that the protocol with PSM 0xXXXX behaves as a protocol of type 0xYYYY where
0xYYYY is one of the reserved PSM values.
|