<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Create a custom model in nrf mesh.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116684/create-a-custom-model-in-nrf-mesh</link><description>I am Creating a custom model for my application using the chat client example. My project is based on checking the battery percentage of a device using this model. So what are the steps that need to be taken while creating this model. Also how to change</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Dec 2024 17:06:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116684/create-a-custom-model-in-nrf-mesh" /><item><title>RE: Create a custom model in nrf mesh.</title><link>https://devzone.nordicsemi.com/thread/514102?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 17:06:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3accd941-6b77-4f42-9de4-2a60efe1ea0e</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The vendor ID is also known as Company Identifier, and &lt;a href="https://support.bluetooth.com/hc/en-us/articles/360062030092-Requesting-Assigned-Numbers"&gt;must be registered with the Bluetooth SIG&lt;/a&gt;. The way it works is you apply for a company identifier for your company, which is granted for a fee. In order to apply you must already register as a Bluetooth SIG member. This is similar to how you must be a Bluetooth SIG member in order to qualify Bluetooth products.&lt;/p&gt;
&lt;p&gt;When you have a Company Identifier, you have an address space of 64 possible 3 byte vendor specific opcodes, that you can use for Bluetooth Mesh. Those opcodes will then be unique to your company, and your company is the only entity to decide how to use them.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a custom model in nrf mesh.</title><link>https://devzone.nordicsemi.com/thread/513791?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 09:51:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01ad683d-02a5-4cb2-9e21-c9959daa9caf</guid><dc:creator>cyriactoms</dc:creator><description>&lt;p&gt;thank you for the reply.&amp;nbsp; Also while giving our custom vedndor id do i need to follow any criteria or can i give it a raw value. Also the vendor mdoel ID 0x00A named as chat client. so if i need to give a custom name what should i need to do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a custom model in nrf mesh.</title><link>https://devzone.nordicsemi.com/thread/513693?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 16:53:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb3a3b2d-a979-4b63-acb2-d6f478fac9eb</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you use the exact same vendor id and opcode as the chat client, then if you use a tool for testing the chat sample, it may send messages which do not fit for your changed model. The opcode would then be the same, but the content not correct for your model.&lt;/p&gt;
&lt;p&gt;Please note also that the size of messages for the model is defined somewhere in the model implementation. I do not know what you have named the c file for your model implementation, but in that file somewhere there would be use of the BT_MESH_LEN_EXACT macro, for defining the size of the message. The message that is sent when you test this, is not of that exact size. In order to fix the issue, you should either change the length defined using that macro, or the size of the message that you send, so that they correspond.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a custom model in nrf mesh.</title><link>https://devzone.nordicsemi.com/thread/513550?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 05:47:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d4facc3-1a6c-4c6e-9396-3a9130aae259</guid><dc:creator>cyriactoms</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; BT_MESH_SPRINK_CLI_VENDOR_COMPANY_ID &amp;nbsp; &amp;nbsp;CONFIG_BT_COMPANY_ID_NORDIC&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; BT_MESH_SPRINK_CLI_VENDOR_MODEL_ID &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;0x0010&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;i have taken chat client example to give this opcodes. and given company id for nordic and vendor id have been given as 0x0010 .&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;[00:02:00.505,462] &amp;lt;err&amp;gt; bt_mesh_access: Invalid message size for OpCode 0x00cb0059&amp;nbsp; this is the error i am getting while sending the message&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a custom model in nrf mesh.</title><link>https://devzone.nordicsemi.com/thread/513442?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 13:43:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6a3642e-e013-43a6-9d16-45dbd82410c1</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It basically means that the message doesn&amp;#39;t have the exact size which you specified when defining what the message should look like, through use of the BT_MESH_LEN_EXACT macro.&lt;/p&gt;
&lt;p&gt;From the opcode, it looks like you are still using the Nordic Semiconductor vendor ID of 0x59, and with the third byte of the opcode being 0xCB, so none of the 0x0A, 0x0B or 0x0C that you quoted from your code.&lt;/p&gt;
&lt;p&gt;What is your BT_MESH_SPRINK_CLI_VENDOR_COMPANY_ID defined as, and what does your model definitions look like?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a custom model in nrf mesh.</title><link>https://devzone.nordicsemi.com/thread/513219?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 13:25:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8f29cc8-4ce8-44ff-898a-8a35c7df8421</guid><dc:creator>cyriactoms</dc:creator><description>&lt;p&gt;i have created vendor model with op codes same as that of chat client example.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;BT_MESH_SPRINK_CLI_OP_SPRINK_ON_OFF&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_OP_3&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;0x0A&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;\&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;BT_MESH_SPRINK_CLI_VENDOR_COMPANY_ID&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;BT_MESH_SPRINK_CLI_OP_BATTERY_PERC&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_OP_3&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;0x0B&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;\&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;BT_MESH_SPRINK_CLI_VENDOR_COMPANY_ID&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;BT_MESH_SPRINK_CLI_OP_FUNCTION_REPLY&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_OP_3&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;0x0C&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;\&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;BT_MESH_SPRINK_CLI_VENDOR_COMPANY_ID&lt;/span&gt;&lt;span&gt;) &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;is the opcodes given is correct.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;when i am sending data over the mesh its showning error &amp;lt;err&amp;gt; bt_mesh_access: Invalid message size for OpCode 0x00cb0059&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;what will be the cause for this...&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a custom model in nrf mesh.</title><link>https://devzone.nordicsemi.com/thread/511914?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 13:45:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db59946e-ef5d-46f6-931d-5c7eeb99b1d0</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The chat model implementation may be a good reference for making your own models, since it is a vendor specific model. I highly recommend that you have a look at the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/bt/bt_mesh/vendor_model/chat_sample_walk_through.html"&gt;Chat sample walk-through&lt;/a&gt;, which explains how the chat model works and how it is implemented. With the walk-through, and studying the code, you should get a solid understanding of how it works and how to modify it towards what you need.&lt;/p&gt;
&lt;p&gt;I also recommend looking at the implementations of other mesh models, to see how to implement a typical server/client type model. Please remember that the difference between the SIG defined models and a vendor specific one, is basically the model ID and the size of the opcode for messages. This means you could base your model off of any of the existing models, provided that you change to using 3 byte opcodes for the messages, and use a proper model ID.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>