# Making WP7607 appear as mass storage device

**URL:** <https://forum.legato.io/t/making-wp7607-appear-as-mass-storage-device/4453>\
**Category:** Legato Application Framework\
**Created:** [June 24, 2019, 8:15am UTC](https://forum.legato.io/t/making-wp7607-appear-as-mass-storage-device/4453 "2019-06-24T08:15:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![langestefan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/langestefan/32/645_2.png) [@langestefan](https://forum.legato.io/u/langestefan)\
**Post date:** [June 24, 2019, 8:15am UTC](https://forum.legato.io/t/making-wp7607-appear-as-mass-storage-device/4453/1 "2019-06-24T08:15:24Z")

</div>

Hi,

For a usecase I want my WP7607 to appear as a mass storage device when I plug it into a host PC (or any device that supports USB mass storage). I found an article that does this on a RPI: [MAKE A PI ZERO W SMART USB FLASH DRIVE](https://www.raspberrypi.org/magpi/pi-zero-w-smart-usb-flash-drive/)

I understand that I need to do `modprobe g_mass_storage`. But modules.dep is empty so that command returns an error. I checked [Legato KConfig options](https://docs.legato.io/latest/kconfigDescription.html) but this doesn’t mention the option to customize any USB options.

Is it possible to add mass storage support to Legato? If yes, how?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [June 26, 2019, 2:47am UTC](https://forum.legato.io/t/making-wp7607-appear-as-mass-storage-device/4453/2 "2019-06-26T02:47:20Z")

</div>

seems no such option in AT!USBCOMP=?

at!usbcomp=?  
!USBCOMP:  
AT!USBCOMP=,,  
 - configuration index to which the composition applies, should be 1

- 1:Generic

- DIAG - 0x00000001,  
NMEA - 0x00000004,  
MODEM - 0x00000008,  
RAWDAT - 0x00000040,  
RMNET0 - 0x00000100,  
RMNET1 - 0x00000400,  
RMNET2 - 0x00000800,  
AUDIO - 0x00010000,  
ECM - 0x00080000,  
NCM - 0x00400000,  
e.g.  
9 - diag,modem interfaces enabled  
10D - diag,nmea,modem,rmnet0 interfaces enabled

OK

---

<div class="post-metadata">

**Author:** ![langestefan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/langestefan/32/645_2.png) [@langestefan](https://forum.legato.io/u/langestefan)\
**Post date:** [June 26, 2019, 9:06am UTC](https://forum.legato.io/t/making-wp7607-appear-as-mass-storage-device/4453/3 "2019-06-26T09:06:07Z")

</div>

I know. But you can add it through KConfig, like this post: [https://forum.mangoh.io/t/build-linux-for-wp76/1084/3](https://forum.mangoh.io/t/build-linux-for-wp76/1084/3)

I was hoping the same could be achieved for mass storage. Maybe @dfrey knows?

---

<div class="post-metadata">

**Author:** ![mlw](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mlw](https://forum.legato.io/u/mlw)\
**Post date:** [June 28, 2019, 1:23pm UTC](https://forum.legato.io/t/making-wp7607-appear-as-mass-storage-device/4453/4 "2019-06-28T13:23:00Z")

</div>

@langestefan,

So this is possible as per the below (not generated by me).

Create an empty 32MB FAT image (in /tmp/fat.fs) using mkdosfs command:

```
dd if=/dev/zero of=/tmp/fat.fs bs=1024 count=32768
mkdosfs /tmp/fat.fs

```

Then mount this image in “/tmp/mass\_storage” in order to add some files.

```
mount -o loop /tmp/fat.fs /tmp/mass_storage
echo "Hello World!" > /tmp/mass_storage/README.TXT

```

After that add/configure “mass\_storage” in the USB functions:

```
echo 0 > /sys/class/android_usb/android0/enable
echo diag,serial,rmnet,ecm, **mass_storage** > /sys/class/android_usb/android0/functions
echo /tmp/fat.fs > /sys/class/android_usb/android0/f_mass_storage/lun/file
echo 1 > /sys/class/android_usb/android0/enable

```

After that, a new USB flash drive is visible on the host side (a PC in this case) with the expected content.

Regards

Matt

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 2, 2019, 1:48am UTC](https://forum.legato.io/t/making-wp7607-appear-as-mass-storage-device/4453/5 "2019-07-02T01:48:42Z")

</div>

it works!  
BTW, you can use the busybox here for mkdosfs command on WP76  
[busybox-armv5l\_1.26](https://forum.legato.io/uploads/short-url/xUdxtSxERe1qEpAdYxqO7SkmhdZ.26) (1.1 MB)

root@swi-mdm9x28-wp:~# chmod 777 busybox-armv5l\_1.26  
root@swi-mdm9x28-wp:~# ./busybox-armv5l\_1.26 mkdosfs /tmp/fat.fs

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 6, 2026, 4:30am UTC](https://forum.legato.io/t/making-wp7607-appear-as-mass-storage-device/4453/6 "2026-08-06T04:30:13Z")

</div>

Here is an updated version of document which shows how to enumerate mass storage device for WP76 with FW R12 (kernel 3.18) and FW R17.1 (kernel 4.14) :

> **["http post" on WP76xx](https://forum.sierrawireless.com/t/http-post-on-wp76xx/25601/11)**
>
> Here is an updated version of document which also shows how to enumerate mass storage device for WP76 with new FW R17.1: How to make WP76 module as mass storage device\_v2.docx (690.9 KB)
