Lsusb not found, unable to mount usb drive


On module: mangOH Red (WP7608), with firmware version 9 and legato ver 18.03.

Trying to insert a memory stick into the USB host port of mangOH red. It’s led is blinking and dmesg shows it’s connected properly without errors.

root@swi-mdm9x28:~# lsusb
-sh: lsusb: not found

Even if lsusb isn’t found, the module crashes completely when I use:

root@swi-mdm9x28:~# fdisk -l
Disk /dev/mtdblock0: 2 MB, 2621440 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock0 doesn’t contain a valid partition table

command, preventing me from even being able to mount it. I did a “Erase user partition” from Legato Developer Studio, did that remove some files? This is happening on all firmware versions (tested 6, 8 and 9).


I noticed that fdisk -l has issues. I forgot to check whether a bug has been reported for this or not. I will try to look into it tomorrow. What I do remember is that fdisk -l /dev/mtdblk0 will work.


I confirm the issue with “fdisk -l” when used without additional parameters.
For USB drives, you can use “fdisk -l /dev/sd*” which is working fine.
I can mount my USB flash drive (FAT32 filesystem) with the same setup as you by using this command:
mount /dev/sda1 /media/

Regarding “lsusb” tool, you can build a custom rootfs image with “usbutils” package by using Yocto.
Or you can use the following “poor man’s lsusb” script:


Thank you! Mounting USB sticks is working fine now. Your script works alright, but wanted to add native lsusb. Added IMAGE_INSTALL_append = " usbutils" to (any better to place to add it?) within the yocto recipes and it successfully added the binaries. But, lsusb is still giving the below issue:

But the package added another bin named, which seems to be working partly.

WARNING: Failure to read usb.ids
(<type ‘exceptions.IOError’>, IOError(2, ‘No such file or directory’), <traceback object at 0xb6d43030>)
usb1 1d6b:0002 09 2.00 480MBit/s 0mA 1IF (Linux 3.18.44 ehci_hcd Qualcomm EHCI Host Controller using HSIC 7c00000.hsic_host) hub
1-1 0424:3503 09 2.00 480MBit/s 2mA 1IF () hub
— 1-1.1 10c4:87a0 00 2.00 12MBit/s 100mA 1IF (Silicon Laboratories CP2130 USB-to-SPI Bridge 000EB434)

Your script:

10c4:87a0 - CP2130 USB-to-SPI Bridge
1d6b:0002 - Qualcomm EHCI Host Controller using HSIC