There is a sensor. This sensor is connected via USB, the file name is ttyUSB0 lying in the /dev folder. There is a set of commands:
1: -m 1024 \
2: -cpu core2duo \
3: -serial stdio \
4: -display none \
5: -hda /dev/sdb \
6: -usb \
7: -usb -device usb-host:productid=0x1a86,vendorid=0x7523 \
8: -drive file=/home/fedor/Git/usb.img \
9: -kernel $BUILD/$E_INIT/$BUILD_TARGET
The commands to connect the USB device are on lines 6,7,8 and they don't work. The following error message is displayed:
-device usb-host:productid=0x1a86,vendorid=0x7523: Parameter 'driver' is missing
The file is given full read/write rights
sudo chmod -R uog=rwx /dev/ttyUSB0
Create a file image using the command:mkisofs -J -o usb.img /dev/ttyUSB0
fedor@fedor-VirtualBox:~$ lsusb
Bus 001 Device 003: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
I have already reviewed a bunch of sources, tried a bunch of options, but the device could not be connected.
ADDITIONAL RESPONSE:
the first link - enter link description here
second link - enter link description here
Third link - enter link description here
That's it, I won't find anything else. Yes, these are the instructions to run, they are in a file with the extension .sh, it's big, it's just a small part of it. Everything works if instead of 3 lines I insert -serial /dev/ttyUSB0, but there is no exchange with the device.I just want to throw a USB device into qemu and nothing else.
to sum up. The device could not be reset, why? I do not know, maybe someone else can tell me.
1: sudo modprobe -r ch341 To return how everything was, you need to write sudo modprobe ch341.
2: sudo chown -R fedor /dev/bus/usb.
3: qemu-system-x86_64 -helpI write in the terminal and get 'USB options':
3.1: -usb enable on-board USB host controller (if not enabled by default).
3.2: -usbdevice name add the host or guest USB device 'name'.
4: lsusb -v Next, I write the command not lsusb, but lsusb -v. I find two lines: idVendor 0x1a86 QinHeng Electronics, idProduct 0x7523 CH340 serial converter.
5: Next, I open qemu and check whether the device is visible or not. I write in the terminal: qemu-system-x86_64. Qemu opens.
5.1: I open the qemu terminal by pressing Ctrl+Alt+2
5.2: Inside qemu I write info usbhost. After that, I am given the following information:
Bus 1, Addr 3, Port 2, Speed 12 Mb/s, Class ff: USB device 1a86:7523
6: After making sure that the device is available, I write the following in a file with the .sh extension:
1: -m 1024 \
2: -cpu core2duo \
3: -serial stdio \
4: -display none \
5: -hda /dev/sdb \
6: -usb \
7: -usbdevice host,vendorid=0x1a86,productid=0x7523 \
8: -kernel $BUILD/$E_INIT/$BUILD_TARGET
Added lines 6 and 7
7: The following error is displayed: could not add USB device 'host,vendorid=0x1a86,productid=0x7523'


/dev/ttyUSB0is a USB-serial port converter, which may be integrated into your sensor. Unfortunately that means thelsusboutput only tells about the converter chip, not about the sensor itself.mkisofscommand would create an ISO image file asusb.imgwith just one file namedttyUSB0, supposedly containing either nothing at all or maybe a dump of information coming in from your sensor. Since it looks like you might be trying to run a qemu VM withusb.imgas its system disk, that seems counterproductive - it would overwrite the existingusb.imgvirtual disk with non-bootable data.