1

I'm under wsl on Windows 10 19043.1826, so I don't have the "wsl --mount" command so i found out that I could use usbipd to get the USB device 'inside' linux on wsl (Ubuntu 20.04).

then finally I get, and using command lsusb I got the answer:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 303a:80aa Espressif Franzininho WIFI w/Wroom
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

After a long hours searching I "found the device" on /dev/bus/usb/001 folder and if I do a ls command on that I get the "files??" 001 and 005, as I understood (I think - wrong) my USB device is that 005

My device (that on Bus 001 Device 005 with ID 303a:80aa) has a file called "code.py" on root of USB device (and device is under FAT) and I want to access this file and root folder. How shold I do that?

I tried

mkdir /mnt/e
sudo mount --bind /dev/bus/usb/001/005 /mnt/e

but didn't work

I found a script here: https://unix.stackexchange.com/a/634849 But didn't understood how to use that I tried to put script on a file getdevice.sh (with nano), saved, and then tried to run

bash getdevice.sh 303a:80aa

but have nothing on response

I'm really asking here because I'm stucked literally for hours on internet seaching and trying a lot of things, and I believe this should be simple to access and I'm missing something.

with the command:

 lsblk -o model,name,size,fstype,label,mountpoint

I get only block devices I think:

MODEL            NAME  SIZE FSTYPE LABEL MOUNTPOINT
Virtual Disk     sda   256G
Virtual Disk     sdb   256G              /
  • Try the command lsblk -o model,name,size,fstype,label,mountpoint and edit your original question to show the output. – sudodus Aug 04 '22 at 05:55

1 Answers1

1

The device /dev/bus/usb/001/005 is not for mounting - it is for sending & receiving essentially raw USB data packets, preferably using libusb or similar.

If the USB device is identifying itself as a standard USB storage device, then it would normally appear as some /dev/sdX device, where X = some letter. As suggested by sudodus, use the lsblk command to see if such a device is available and associated with your Espressif Franzininho WIFI w/Wroom. If your USB device contains just a single filesystem with no partition table (the so-called "superfloppy" configuration), you could mount it with a command like:

mkdir -p /mnt/e
mount /dev/sdX /mnt/e

But if the device includes a partition table, and you wish to mount the first partition, you'll need to add the partition number to the device name:

mkdir -p /mnt/e
mount /dev/sdX1 /mnt/e

But the Espressif Franzininho WIFI w/Wroom is not a USB storage device. It's a development board - a tiny computer on its own, with a WiFi interface and other ways to connect things to it, so it can be used as a building block in hardware projects.

It could be programmed to act as a USB storage device, or as a multi-function device with USB storage being just one of its functions. But since it has just 4 MB of flash memory, it would be a hilariously low-capacity USB storage device unless extra flash memory chips have been added to it.

telcoM
  • 96,466
  • my question about accessing "as" USB storage is just to have access to the file "code.py" inside that. Same way as I do in Windows ( I just plug, and can access as another USB storage at E: drive. If there's a way just to access this file with command (by VSCODE) code ./code.py is just what I need. But for that I need to reach the file location and this is what I'm trying to do, unsuccessfully. – Henrique Vilela Aug 04 '22 at 23:34
  • Does it work like that on all Windows systems, or only on Windows that has had some special Franzininho programming drivers installed? If the latter, then the "magic" is in the Windows driver; if the former, then it might be that the default WSL kernel does not include USB-storage drivers, since Microsoft assumed Windows would be handling all the physical drive access. – telcoM Aug 05 '22 at 06:03