You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/06/08 21:37:18 UTC

[jira] [Commented] (MYNEWT-774) Intermittent serial errors in newtmgr messages on Arduino Zero

    [ https://issues.apache.org/jira/browse/MYNEWT-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16043485#comment-16043485 ] 

ASF subversion and git services commented on MYNEWT-774:
--------------------------------------------------------

Commit cacb21e3ccb329c4323e82745f3480e760cd9d66 in incubator-mynewt-core's branch refs/heads/master from [~ccollins476]
[ https://gitbox.apache.org/repos/asf?p=incubator-mynewt-core.git;h=cacb21e ]

MYNEWT-774 Serial errors in newtmgr messages

The problem seems to be caused by an exhaustion of shell events.  By
default, the shell only allocates a single event.

The sequence looks like this:
    1. Client sends newtmgr command to device.
    2. Console passes newtmgr command to shell.
    3. Shell allocates the only event and fills it with the data.
    4. Shell processes event, hands data to newtmgr code.
    5. Newtmgr processes command and sends response.
    6. Client sees response and sends follow-up command.
    7. Console passes newtmgr command to shell.
    8. Shell has no events left; drops incoming command.
    9. Initial event gets freed.

By changing the default event count from 1 to 2, we ensure there is
always a spare event available.  Since we will never send the second
response before freeing the first event, two events is sufficient.


> Intermittent serial errors in newtmgr messages on Arduino Zero
> --------------------------------------------------------------
>
>                 Key: MYNEWT-774
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-774
>             Project: Mynewt
>          Issue Type: Bug
>      Security Level: Public(Viewable by anyone) 
>            Reporter: Christopher Collins
>            Assignee: Christopher Collins
>             Fix For: v1_1_0_rel
>
>
> (Pull request: https://github.com/apache/incubator-mynewt-core/pull/323)
> Using the nmgr_shell transport (newtmgr over shell), some incoming commands get dropped. The problem seems to be caused by an exhaustion of shell events. By default, the shell only allocates a single event.
> The sequence looks like this:
> # Client sends newtmgr command to device.
> # Console passes newtmgr command to shell.
> # Shell allocates the only event and fills it with the data.
> # Shell processes event, hands data to newtmgr code.
> # Newtmgr processes command and sends response.
> # Client sees response and sends follow-up command.
> # Console passes newtmgr command to shell.
> # Shell has no events left; drops incoming command.
> # Initial event gets freed.
> By changing the default event count from 1 to 2, we ensure there is always a spare event available. Since we will never send the second response before freeing the first event, two events is sufficient.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)