diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3a1c2f0548..782a25b15c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,15 +10,19 @@ } }, "runArgs": [ - "--privileged", "--network=host", - "--device=/dev/bus/usb", + // below is the MAJOR version of the device, which is 166 for my device. + "--device-cgroup-rule=c 166:* rmw", + // /dev/serial/by-id/ is the right way of accessing devices, tell PIO to use that. + "-v", "/dev/serial:/dev/serial", + "-v", "/dev/bus/usb:/dev/bus/usb", // arch linux tty* is owned by uucp (986) "--group-add=986", // debian tty* is owned by dialout (20) "--group-add=20" ], "postCreateCommand": { + "mknod": "for minor in `seq 0 9`; do sudo mknod -m 666 /dev/ttyACM$minor c 166 $minor; done", "platformio": "pipx install platformio", "opencode": "curl -fsSL https://opencode.ai/install | bash" }, @@ -44,4 +48,4 @@ ] } } -} \ No newline at end of file +}