Skip to content

Conversation

@LingaoM
Copy link
Contributor

@LingaoM LingaoM commented May 8, 2021

Bluetooth Mesh Vendor model hava company id field.

Accordin MeshPRFV1.0.1 3.7.3.1 Operation codes.

The 3-octet opcodes are used for manufacturer-specific opcodes.
The company identifiers are 16-bit values defined by the
Bluetooth SIG and are coded into the second and third octets of
the 3-octet opcodes.

Therefore, we can speed up the search process by checking whether
CID fields match, rather than comparing opcodes one by one.

Signed-off-by: Lingao Meng [email protected]

@trond-snekvik trond-snekvik added the Enhancement Changes/Updates/Additions to existing features label May 20, 2021
@LingaoM LingaoM force-pushed the compress_opcode branch from 799d056 to 0be06c6 Compare May 25, 2021 07:07
@LingaoM LingaoM force-pushed the compress_opcode branch from 0be06c6 to 76bfa1c Compare May 25, 2021 09:31
@trond-snekvik
Copy link
Contributor

@LingaoM would you have time to look into the compliance issue, so we can move this forwards? Looks good to me apart from this.

@LingaoM
Copy link
Contributor Author

LingaoM commented Jun 23, 2021

@LingaoM would you have time to look into the compliance issue, so we can move this forwards? Looks good to me apart from this.

I didn't see the real wrong place

@trond-snekvik
Copy link
Contributor

trond-snekvik commented Jun 23, 2021

-:43: WARNING:MISSING_SPACE: break quoted strings at a space character
#43: FILE: subsys/bluetooth/mesh/access.c:329:
+					BT_ERR("Invalid vendor model(company:0x%04x"
+						"id:0x%04x) message opcode 0x%08x",

The string needs a space at the line break. Either end the first line with ...04x ", or start the next with " id...

@jhedberg
Copy link
Member

If it's implied by the spec that this is how implementations should behave, perhaps we want the new Kconfig option to default to being enabled?

@LingaoM
Copy link
Contributor Author

LingaoM commented Jun 24, 2021

If it's implied by the spec that this is how implementations should behave, perhaps we want the new Kconfig option to default to being enabled?

@trond-snekvik #35001 (comment)

@trond-snekvik
Copy link
Contributor

@LingaoM up to you whether you want to add this in this PR, I haven't seen a usecase for this yet, but you never know

@LingaoM
Copy link
Contributor Author

LingaoM commented Jun 24, 2021

I'm thinking that if we leave it off by default, this optimization may never be used (because most people don't know what it is). On the contrary, we can optimize most of the scenarios as much as possible.

Bluetooth Mesh Vendor model hava company id field.

Accordin MeshPRFV1.0.1 3.7.3.1 Operation codes.

The 3-octet opcodes are used for manufacturer-specific opcodes.
The company identifiers are 16-bit values defined by the
Bluetooth SIG and are coded into the second and third octets of
the 3-octet opcodes.

Therefore, we can speed up the search process by checking whether
CID fields match, rather than comparing opcodes one by one.

Signed-off-by: Lingao Meng <[email protected]>
@nashif nashif merged commit cc0abee into zephyrproject-rtos:main Jun 29, 2021
@LingaoM LingaoM deleted the compress_opcode branch July 1, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Mesh area: Bluetooth Enhancement Changes/Updates/Additions to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants