<?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>Generic  Level Server Bugs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42976/generic-level-server-bugs</link><description>Hello, 
 I&amp;#39;m working with Mesh SDK 3.1.0. 
 I made some changes in app_level.c file. 
 Could you please confirm that these changes are right? 
 They seem to work fine, but I would appreciate very much your comments/corrections! 
 
 1) g_transition_complete</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Feb 2019 13:21:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42976/generic-level-server-bugs" /><item><title>RE: Generic  Level Server Bugs</title><link>https://devzone.nordicsemi.com/thread/169928?ContentTypeID=1</link><pubDate>Thu, 07 Feb 2019 13:21:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3000c7e1-946f-4aa1-ae54-7a450585d118</guid><dc:creator>david_owtschinnikow</dc:creator><description>&lt;p&gt;OK, thank you very much for your support&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic  Level Server Bugs</title><link>https://devzone.nordicsemi.com/thread/169922?ContentTypeID=1</link><pubDate>Thu, 07 Feb 2019 12:56:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19808f40-00cf-47b4-8a4a-8ec3f50b7d26</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) Yes you can do what you have done.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2) After a double check we confirmed that it&amp;#39;s a bug. You can use&amp;nbsp;&lt;span&gt;TRANSITION_TIME_MAX_MS&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3) I think that&amp;#39;s the way it should be for the Move Set command. The present level should by the end of transition time stop at the INT16_MAX or INT16_MIN. Or keep wrapping over like what we have implemented.&amp;nbsp; My understanding is that there is no target level that the state need to get to for this command. If you want a target level you should use the Level Set.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic  Level Server Bugs</title><link>https://devzone.nordicsemi.com/thread/169661?ContentTypeID=1</link><pubDate>Wed, 06 Feb 2019 09:03:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:745a8801-1dc7-4596-a122-e568def80137</guid><dc:creator>david_owtschinnikow</dc:creator><description>&lt;p&gt;Thank you for your response&lt;/p&gt;
&lt;p&gt;1) I understand, but in my case (I want to stop the movement when the transition time is completed) I don&amp;rsquo;t find another way of stopping the movement other than the way I posted, because inside &amp;ldquo;g_transition_complete()&amp;rdquo;, if the condition to stop is NOT( TRANSITION_MOVE_SET), then a move set never stops. Besides, the target level is already INT16_MAX or INT16_MIN.&lt;/p&gt;
&lt;p&gt;2) In that case, I cannot handle transition times higher than TRANSITION_TIME_STEP_100MS_MAX, which is 6200ms (not encoded). The comparison is done between decoded values, in ms, not between encoded values. According to the spec., the maximum transition time is 10.5 hours. I don&amp;rsquo;t see why the maximum should be 6200ms?&lt;/p&gt;
&lt;p&gt;3)I have undone my change according to what you said, but if I do so, then no matter what parameters I send to the server (transition time and delta level), the &amp;ldquo;present level&amp;rdquo; at the end of the transition is always equal to the &amp;ldquo;target level&amp;rdquo;, which is INT16_MAX or INT16_MIN; I don&amp;rsquo;t think this is the correct behaviour. What would then be the correct solution?&lt;/p&gt;
&lt;p&gt;Thank you very much&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic  Level Server Bugs</title><link>https://devzone.nordicsemi.com/thread/169572?ContentTypeID=1</link><pubDate>Tue, 05 Feb 2019 15:04:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f31d090d-0e34-4ef5-b8ef-fb57d81bb281</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again David,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding your questions:&lt;/p&gt;
&lt;p&gt;1. According to spec, Mesh model v1.0:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;When the Generic Level state is not bound to another state, the overflow/underflow handling is&lt;/em&gt;&lt;br /&gt;&lt;em&gt; implementation-specific. Some Generic Level Servers may stop at their maximum or minimum levels,&lt;/em&gt;&lt;br /&gt;&lt;em&gt; and some may wrap around.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;Since this is implementation specific, we choose to do continuous movement showing the wrap around behavior. You can&amp;nbsp;modify this behavior to stop at INT16_MAX or INT16_MIN values.&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;TRANSITION_TIME_STEP_100MS_MAX&amp;nbsp; is the correct value in milliseconds and not the encoded value. You should not use the&amp;nbsp;&lt;span&gt;TRANSITION_TIME_MAX_MS. The&amp;nbsp;reason is the transition number of steps is limited to 0x00 to 0x3E according to spec.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3.&amp;nbsp;Target level should be 32767 for positive move values (level increases continuously) and should be -32768 for negative move values. This is according to the spec:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Upon receiving a Generic Move Set message, the Generic Level Server shall respond with a Generic&lt;/em&gt;&lt;em&gt; Level Status message (see Section 3.3.2.2.5). The target Generic Level state is the upper limit of the&amp;nbsp;&lt;/em&gt;&lt;em&gt;Generic Level state when the transition speed is positive, or the lower limit of the Generic Level state&lt;/em&gt;&lt;br /&gt;&lt;em&gt; when the transition speed is negative.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4. It&amp;#39;s a bug and we have reported it. Fix is coming on v3.2&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic  Level Server Bugs</title><link>https://devzone.nordicsemi.com/thread/168836?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 10:12:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a73c994-4bfc-4cd2-a0ef-bfd91dd4dcf3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi David,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry for the late response. I&amp;#39;m forwarding your suggested fixes to our team and I will get back to you&amp;nbsp;ASAP.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>