Hi Folks, in the last two months I have done much work with the current SDP implementation. The library is full featured and works fine for me in all situations, but the programming interface is a mess. It is not easy to get the service name or the number of the RFCOMM channel. You have to play with internal SDP lists, pointer of pointer stuff and static assigned UUID's. Since I already have rewritten most of the HCI part from scratch for the new Bluetooth library, so I decided to also build a new client SDP libary from scratch. I took me one day to get a first draft of a working version and I am positiv astonished how easy it can be. While coding the new library I came to the conclusion that we need two interfaces to SDP. A simple one for basic tasks like getting service name and needed protocol information and a second full featured API which can do everything according to spec. For the simple API I made some assumptions to achieve a simple interface: 1) The simple API can only deal with UUID16 2) A request can only contain one UUID 3) It always requests the full range of attributes 4) It returns only a predefined number of attributes 5) No function return dynamic allocated memory/lists Both interfaces share two common functions, which are needed for SDP connection creation and clearing. These functions are also present in the current library, but I named the datatype sdp_t instead of sdp_session_t to keep it short: sdp_t *sdp_connect(...); int sdp_close(sdp_t *sdp); The simple API only contains three additional functions which reflects the three request PDU's of the SDP specification: int sdp_service_search(sdp_t *sdp, ...); int sdp_service_attribute(sdp_t *sdp, ...); int sdp_service_search_attribute(sdp_t *sdp, ...); All data exchange is done through the sdp_record_t datatype, a uint32_t for the record handle and/or a UUID16 for the service class. I attached the complete sdp.h file with all definitions of the new simple interface to this email. And here is a little client programing example, which gets all serial port profile records: sdp_t *sdp; sdp_record_t records[6]; int i, num sdp = sdp_connect(BDADDR_ANY, bdaddr, 0); num = sdp_service_search_attribute(sdp, SDP_SERIAL_PORT, records, 6); for (i = 0; i < num; i++) printf("Service: %s\n", records[i].name); sdp_close(sdp); The simple interface will have of course a lot of limitations, but these can all be eliminated by using the full interface if needed. I tested the new version with all my devices on my desktop and it works flawless. The internal code of the library and also the full featured interface depends only on the datatype sdp_data_t. This struct can represent the complete SDP data definitions. No additional lists or other helper structs are needed. It is easy to decode and encode this datatype to the SDP binary representation and the full featured interface uses it also for input of the UUID lists and the attribute ranges. At the moment this part of the implementation contains only the code which is needed to make the simple interface working. I will now clean up the internal stuff a little bit and then place it into the libs2 CVS instead of the "old" one. Comments? Regards Marcel