STM32f4 Device add

Hey Guys
I am trying to add an Stm32f4 device to my Ubuntu 21.10 container with the followimg command

“lxc config dwvice add dev ttyACM0 unix-char source=/dev/ttyACM0 path=/dev/ttyACM0 mode=0666”

the device is added to to container but i cant flash it since i get

“libusb: error [get_usbfs_fd] libusb couldn’t open USB device /dev/bus/usb/003/010, errno=2”

meaning stlink couldn’t find the device which also i getting as a warning from stlink.

what setting can i make or changes needed kindly guys??

Have you tried using the usb device type?

As the unix-char will not pass through the /dev/bus/usb entry.

Like That i get error Still;

lxc config device add zigdev-1 ttyACM1 usb mode=0666 gid=20 path=/dev/ttyACM1
Error: Invalid devices: Device validation failed for "ttyACM1": Invalid device option "path"

The usb device doesn’t have a path property.