Bluetooth stack/sdp protocol update
When initially writing the Bluetooth stack for NetBSD, I imported the Service Discovery suite directly from FreeBSD with few changes as the spec seemed a bit obtuse, and it saved a huge bunch of time. After working with some software using that API since though, I found it quite limiting and really thought something better was needed.
So, I have deprecated the libsdp functions and replaced them with something that reflects the specification more closely, allowing much more flexibility and added an API to deal with the raw data in a fairly simple manner. While working on it, I found that the SDP spec was not that obtuse and the data streams were fairly easy to work with.
SDP daemon, sdpquery
Along the way I rewrote the SDP daemon sdpd(8) to be much simpler, and finally updated the sdpquery(1) program to display complete service records in a meaningful manner:
% sdpquery -a phone search OPUSH ServiceRecordHandle: 0x00010001 ServiceClassIDList: Object Push ProtocolDescriptorList: L2CAP RFCOMM (channel 9) OBEX BrowseGroupList: Public Browse Root LanguageBaseAttributeIDList: en.UTF-8 base 0x0100 BluetoothProfileDescriptorList: Object Push, v1.0 ServiceName: "OBEX Object Push" SupportedFormatsList: Any
Compatibility
All programs in base are converted to use the new API and compatibility is provided at source level by defining SDP_COMPAT and the old ABI is still supported.
[0 comments]