site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com User-agent: Thunderbird 1.4 (Macintosh/20050908) Am 31.01.2006 um 17:33 schrieb Elliotte Harold: -- Elliotte Rusty Harold elharo@metalab.unc.edu XML in a Nutshell 3rd Edition Just Published! http://www.cafeconleche.org/books/xian3/ http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.a... Christian Klein wrote: What is the legal range for values returned by getDeviceClassMajor in IOBluetoothDevice? Is it 1-31 or 0 to 7968 or something else? In other words, is it an unsigned 5-bit int or unsigned 13-bit int, or something else? I've seen both used in practice in other APIs for working with Bluetooth. // +---------------+---------------+---------------+ // | octet 3 | octet 2 | octet 1 | <- Octet Transmission Order // +---------------+---------------+---------------+ // <------ 11 bits ----->< 5 bits ><- 6 bits -> // +---------------------+---------+-----------+-+-+ // | Service Classes | Major | Minor | | | // +-+-+-+-+-+-+-+-+-+-+-+ Device | Device |0|0| // | | | | | | | |*|*|*| | Class | Class | | | // +-+-+-+-+-+-+-+-+-+-+-+---------+-----------+-+-+ // | | | | | | | | | Yes, but there's more than one way to interpret that layout. The 5 bits of the major device class could be represented as a simple 5 bit number or the whole class ID could be masked off and the entire thing treated as a 32-bit number of which only the major class part can be non-zero. I've seen both done elsewhere. Which does Apple's Bluetooth API do? (Or does it do something completely different?) This email sent to site_archiver@lists.apple.com