Using Custom OpCode in MESH vendor model

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
firebird
Offline
Last seen: 1 year 10 hours ago
Joined: 2019-07-12 09:48
Using Custom OpCode in MESH vendor model

I am using MESH SDK 1.6.1 and tried to modify vendor model for specific uasge.

When I tried to change Vendor OpCode, the following error occurs and not working.

 

[** ERR **]:[access_api.c]:[833]: [ACCESS] Check FAILED for 3 Octet Opcode 0x00A000D2

 

If I changed back to the original definition, i.e. to 0x00C000D2, it works.

Why this happens, and how can I change this behaviour?

Keywords: 
Device: 
LC_Dialog
Offline
Last seen: 1 year 2 months ago
Staff
Joined: 2016-09-19 23:20
Hi firebird,

Hi firebird,

I am working on this with our team internally. Will get back to you with a solution asap.

Best,
LC_Dialog

LC_Dialog
Offline
Last seen: 1 year 2 months ago
Staff
Joined: 2016-09-19 23:20
Hi firebird,

Hi firebird,

The format of the Vendor Opcode is restricted by the Mesh spec. Please refer to section 3.7.3.1 of Mesh_v1_0 spec. In short all vendor specific opcodes have to have the two most significant bits of the third octet set to 0b11. Please implement an Opcode with this format and check if the error is resolved. Attaching a refernce to the spec below..

3.7.3.1 Operation codes

An operation code (opcode) is an array of octets comprising 1, 2, or 3 octets. The first octet of the opcode determines the number of octets that are part of the opcode.

If the most significant bit of the first octet of the opcode is zero, then the opcode contains a single octet. If the two most significant bits of the first octet are 0b10, then the opcode contains two octets. If the two most significant bits of the first octet are 0b11, then the opcode contains three octets. This is shown in Table 3.43.

The 1-octet opcodes are used for Bluetooth SIG defined application opcodes. There are 127 1-octet opcodes that can be defined and allocated by the Bluetooth SIG. Opcode 0x7F is reserved for future possible extension.

The 2-octet opcodes are used for Bluetooth SIG defined application opcodes. There are 16384 2-octet opcodes that can be defined and allocated by the Bluetooth SIG.

The 3-octet opcodes are used for manufacturer-specific opcodes. There are 64 3-octet opcodes available per company identifier, identified using ”x” in Table 3.43, although a company may further sub-class opcodes if desired. 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, identified using ”z” in Table 3.43. The company- specific opcodes are managed by the company associated with the identifier

 

Best regards,
LC_Dialog

firebird
Offline
Last seen: 1 year 10 hours ago
Joined: 2019-07-12 09:48
OK, I see. I will change

OK, I see. I will change OpCode according to the spec.