Bluetooth Class Of Device?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
StN__1917156
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

In both examples for CYW20719 spp and hello_sensor in wiced_bt_cfg.c have such definitions:  {0x00, 0x00, 0x00},    /**< Local device class */

but when scan with bt scanner I've got CoD 7936

Q1: where this number come from instead 0?

Q2: if those 3 uint8 members of the array suppose to represent the 24bits for the CoD, where is the LSB of this 24bits and the MSB, as there nothing mentioned in the docs and is it enough to put 3 numbers there and override those 7936 or there are some other steps to be performed to set proper CoD as per BT specs?

Thanks

0 Likes
1 Solution

Hello,

Class of device is a parameter received during the device discovery procedure on the BR/EDR physical transport, indicating the type of device. The Class of Device parameter is only used on BR/EDR and BR/EDR/LE devices using the BR/EDR physical transport.

Please test using a BR/EDR or BR/EDR/LE project. You can test in SPP demo project.

Test results added here: Re: Bug report: Bluetooth Class of Device (CoD)

Thanks,

Anjana

View solution in original post

7 Replies
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi StN._1917156​,

I am checking more details on this internally and should provide you an update soon.

0 Likes
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hello StN._1917156

This is not a bug. 000000 means nothing defined. So its considered as UNCATEGORIZED.

Below links will be helpful:

Bluetooth - Class Of Device Lijst (CoD)

https://distriqt.github.io/ANE-Bluetooth/asdocs/com/distriqt/extension/bluetooth/BluetoothClass.html

Thanks ,

Anjana

0 Likes

Those 2 Links I think give better information regarding CoD coding:

Bluetooth CoD: Bluetooth Class of Device/Class of Service Explained

Assigned numbers for Baseband identifies the Inquiry Access codes and Class of Device/Service (CoD) ...

But those are by Bluetooth standard!

The question was how those 24bit  for CoD are represented in the Cypresse's  array for /**< Local device class */ and why {0x00,0x00,0x00} or any other combination of 3 numbers is transmitted  as 7936 i.e. {0x00, 0x1F, 0x00} instead?

P.S. Regarding the bug/not bug I already comment and gave enough test examples  on the other thread

0 Likes

Hello,

Class of device is a parameter received during the device discovery procedure on the BR/EDR physical transport, indicating the type of device. The Class of Device parameter is only used on BR/EDR and BR/EDR/LE devices using the BR/EDR physical transport.

Please test using a BR/EDR or BR/EDR/LE project. You can test in SPP demo project.

Test results added here: Re: Bug report: Bluetooth Class of Device (CoD)

Thanks,

Anjana

Thanks, but you from Cypress should add somewhere either in wiced_bt_cfg.c or somewhere in the documentation how this 3 numbers are coded (Big Endian), because is opposite of the  other multibytes information in the  Bluetooth packets that are coded Little Endian and is a pitfall

0 Likes

Hi Stan,

Yes, I will discuss this internally to add / document it anywhere in WICED docs or blog.

Sorry for the inconvenience caused.

Regards,

Anjana

0 Likes

After some research and testing - Some more details that might be of interest to anybody that could get trapped like me:

Bluetooth Class of Device as well wiced_bt_cfg_settings.device_class is NOT used only in BD/EDR/* but can be used and in BLE only projects.

The only difference BR/EDR vs BLE is that those 3 uint8 numbers from wiced_bt_cfg_settings.device_class, that form the Class of Device 24bit identification, in BR/EDR mode obviously (but not found yet in the docs, so will need further confirmation)  always are transmitted, while in BLE it is optional to include CoD as an item in the advertising batch and then even Bluetooth Scanner App recognize the Class of Device properly even in BLE only mode.

Just make sure when you calculate the CoD and split it after in 3 bytes - they should be set Big Endian in the wiced_bt_cfg_settings.device_class  (which is the opposite how other bluetooth multiByte  data is coded)!!!