Skip to content

Smp shell transport can respond on a different device than it receives from  #81144

@zakport

Description

@zakport

Describe the bug

The smp shell transport is configured to work over uart shell.
The uart shell's device can be reconfigured at runtime as can be seen in samples/subsys/shell_module
The Smp shell driver currently responds on the device defined as shell in the device tree while receiving data from the uart shell whose device can be changed during runtime.

A similar fix from 2020:
#27871

The issue came back here when the shell structures were changed.
6d2e3b5

To Reproduce
Reinitialize uart shell on a different device than what is configured in the device tree and send an smp packet to the new uart.
The smp shell driver will receive the packet and respond on device configured in the device tree.

Expected behavior
For smp to work on the device that the shell was transferred to.

Impact

If the shell device is transferred, for example to an acm device when a USB is plugged in all smp requests will timeout and not work.

Logs and console output

Environment (please complete the following information):
Seen when running on linux with zephyr version 3.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue is a bug, or the PR is fixing a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions