Skip to content

Commit

Permalink
dynamic commands documented.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdelnero committed Dec 6, 2021
1 parent bfc9a58 commit 9afbc4f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ The uMTP-Responder allows files to be transferred to and from devices through th

- Storages mount / unmount.

- Storages lock / unlock.

- GadgetFS and FunctionFS/libcomposite modes supported.

## Which platforms are supported ?
Expand Down Expand Up @@ -119,6 +121,53 @@ Check the file [umtprd.conf](conf/umtprd.conf) file for details on available opt

Once you have configured the correct settings in umtprd.conf, you can use umtprd_ffs.sh or umtprd_gfs.sh to launch it in FunctionFS/GadgetFS mode or use udev to launch the deamon when the usb device port is connected.

## Runtime operations

uMTP-Responder supports dynamic commands to add/mount/umount/remove storages and lock/unlock storages.

Examples:

Unlock all locked storages (set with the 'locked' option in the configuration file) :

```c
umtprd -cmd:unlock
```

Lock all lockable storages (set with the 'locked' option in the configuration file) :

```c
umtprd -cmd:lock
```

"addstorage"/"rmstorage" commands to dynamically add/remove storages :

```c
umtprd '-cmd:addstorage:/tmp Tmp rw'
```

```c
umtprd '-cmd:rmstorage:Tmp'
```

Use double-quotes when arguments have spaces in them:

```c
umtprd '-cmd:addstorage:/path "My Path" rw,removable'

```c
umtprd '-cmd:rmstorage:"My Path"'
```

"mount"/"unmount" commands to dynamically mount/unmount storages.

```c
umtprd '-cmd:mount:"Storage name"'
```

```c
umtprd '-cmd:unmount:"Storage name"'
```

## License

This project is licensed under the GNU General Public License version 3 - see the [LICENSE](LICENSE) file for details

0 comments on commit 9afbc4f

Please sign in to comment.