[ 
https://issues.apache.org/jira/browse/MYNEWT-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christopher Collins updated MYNEWT-774:
---------------------------------------
    Description: 
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.

  was:
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.


> 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
>
>
> 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)

Reply via email to