Skip to content

mbed-tool detect doesn't detect mbed devices inside docker #308

Closed
@saheerb

Description

@saheerb

Describe the bug
docker environment will become the common method to execute tests against mbed devices, especially when H/W testing is moved to LAVA in CI. A linux host machine will run docker, and mbed devices will be passed through to docker as explained here

Though the detection of devices work in mbed-cli-v1 (mbedls), mbed-tools detect doesn't list any device.

To Reproduce
Steps to reproduce the behavior:

  1. In Linux host machine (USB pass through will work only in Linux host): install docker if not already present. Connect an mbed device, for example, K64F.

  2. In Linux host machine, run docker container:
    docker run -it --privileged -v /dev/disk/by-id:/dev/disk/by-id -v /dev/serial/by-id:/dev/serial/by-id ghcr.io/armmbed/mbed-os-env:master-latest

  3. mount usb device and execute mbed-ls
    mount /dev/sdb /mnt

# mbedls
| platform_name | platform_name_unique | mount_point | serial_port  | target_id                                        | interface_version |
|---------------|----------------------|-------------|--------------|--------------------------------------------------|-------------------|
| K64F          | K64F[0]              | /mnt        | /dev/ttyACM0 | 0240000048824e450041700fdedd003598d1000097969900 | 0253 
  1. run mbed-tools detecte
# mbed-tools detect  
No connected Mbed devices found.

Expected behavior
mbed-tools detect the mbed device.

Desktop (please complete the following information):
Any linux host that can run docker

Mbed (please complete the following information):

# mbed-tools --version
7.31.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions