Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umtprd.conf loop_on_disconnect is not triggered #94

Open
chcmq opened this issue Oct 16, 2023 · 0 comments
Open

umtprd.conf loop_on_disconnect is not triggered #94

chcmq opened this issue Oct 16, 2023 · 0 comments

Comments

@chcmq
Copy link

chcmq commented Oct 16, 2023

#
# uMTP Responder config file
# Must be copied to /etc/umtprd/umtprd.conf
#

# Loop / daemon mode
# Set to 1 to don't shutdown uMTPrd when the link is disconnected.

loop_on_disconnect 0

# Force the default UID/GID to use for each storage file operations.
# Note : When no default UID/GID are specified the umtprd process UID/GID 
#        are used instead.

#default_uid 33
#default_gid 33

# Storage command : Create add a storage entry point. Up to 16 entry points supported
# Syntax : storage "PATH" "NAME" "OPTIONS" 
# Possible store options :
#     "rw" = read/write access
#     "ro" = read only
#     "notmounted" = not mounted by default
#     "locked" = lock/unlock feature enabled

storage "/tmp/disk/userdata/storage"      "storage" "rw"

# Add the "locked" option to enable the store lock/unlock feature.
# Execute "umtprd -cmd:unlock" to unlock the locked stores and "umtprd -cmd:lock" to lock them again.

storage "/tmp/disk/userdata/storage"      "lockable storage" "rw,locked"

# A user storage using another UID/GID for file operations.

#storage "/home/user" "user folder" "rw,locked,uid=33,gid=33"

#
# Uncomment the following line if you want to 
# override the system default umask value for 
# the uploaded files.
#

#umask 022

# Set the USB manufacturer string

#manufacturer "Viveris Technologies"

# Set the USB Product string

#product "Viveris Technologies"

# Set the USB Serial number string

#serial "01234567"

# Set the MTP firmware version

firmware_version "Rev A"

# Set the USB interface string. Should be always "MTP"

interface "MTP"

# Set the USB Vendor ID, Product ID and class

#usb_vendor_id  0x1D6B # Linux Foundation
#usb_product_id 0x0100 # PTP Gadget
#usb_class 0x6         # Image
#usb_subclass 0x1      # Still Imaging device
#usb_protocol 0x1      #

# Device version

usb_dev_version 0x3008

# inotify support
# If you want disable the events support (beta), uncomment the following line :

# no_inotify 0x1

#
# Internal buffers size
#

# Internal default usb_max_rd_buffer_size and usb_max_wr_buffer_size value set to 0x10000.
# Internal default read_buffer_cache_size value set to 0x100000.
# Uncomment the following lines to reduce the buffers sizes to fix USB issues on iMX6 based systems.

#usb_max_rd_buffer_size 0x8000      # MAX usb read size. Must be a multiple of 512 and be less than read_buffer_cache_size
#usb_max_wr_buffer_size 0x8000      # MAX usb write size. Must be a multiple of 512.
#read_buffer_cache_size 0x20000     # Read file cache buffer. Must be a 2^x value.

#
# USB gadget device driver path
#

########################################################################
#
# -- Generic FunctionFS Mode --
#
########################################################################

usb_functionfs_mode 0x1

usb_dev_path   "/dev/ffs-mtp/ep0"
usb_epin_path  "/dev/ffs-mtp/ep1"
usb_epout_path "/dev/ffs-mtp/ep2"
usb_epint_path "/dev/ffs-mtp/ep3"

usb_max_packet_size 0x200

########################################################################
#
# -- GadgetFS Mode : Atmel Sama5D2Xplained board --
#
########################################################################

#usb_functionfs_mode 0x0

#usb_dev_path   "/dev/gadget/atmel_usba_udc"
#usb_epin_path  "/dev/gadget/ep1"
#usb_epout_path "/dev/gadget/ep2"
#usb_epint_path "/dev/gadget/ep3"

# Max USB packet size

#usb_max_packet_size 0x200

########################################################################
#
# -- GadgetFS Mode : Raspberry PI Zero / Raspberry PI Zero W Boards --
#
########################################################################

#usb_functionfs_mode 0x0

#usb_dev_path   "/dev/gadget/20980000.usb"
#usb_epin_path  "/dev/gadget/ep1in"
#usb_epout_path "/dev/gadget/ep2out"
#usb_epint_path "/dev/gadget/ep3in"

# Max USB packet size

#usb_max_packet_size 0x200



When I uninstalled the device, it automatically connected again. As a result, I could not uninstall the device normally and could only disconnect my OTG cable.


[uMTPrd - 11:26:18 - Info] uMTP Responder
[uMTPrd - 11:26:18 - Info] Version: v1.6.2 compiled the Oct 14 2023@21:25:51
[uMTPrd - 11:26:18 - Info] (c) 2018 - 2021 Viveris Technologies
[uMTPrd - 11:26:18 - Info] Add storage storage - Root Path: /tmp/disk/userdata/storage - UID: -1 - GID: -1 - Flags: 0x00000000
[uMTPrd - 11:26:18 - Info] Add storage lockable storage - Root Path: /tmp/disk/userdata/storage - UID: -1 - GID: -1 - Flags: 0x00000018
[uMTPrd - 11:26:18 - Info] USB Device path : /dev/ffs-mtp/ep0
[uMTPrd - 11:26:18 - Info] USB In End point path : /dev/ffs-mtp/ep1
[uMTPrd - 11:26:18 - Info] USB Out End point path : /dev/ffs-mtp/ep2
[uMTPrd - 11:26:18 - Info] USB Event End point path : /dev/ffs-mtp/ep3
[uMTPrd - 11:26:18 - Info] USB Max packet size : 0x200 bytes
[uMTPrd - 11:26:18 - Info] USB Max write buffer size : 0x2000 bytes
[uMTPrd - 11:26:18 - Info] USB Max read buffer size : 0x2000 bytes
[uMTPrd - 11:26:18 - Info] Read file buffer size : 0x100000 bytes
[uMTPrd - 11:26:18 - Info] Manufacturer string : Viveris Technologies
[uMTPrd - 11:26:18 - Info] Product string : The Viveris Product !
[uMTPrd - 11:26:18 - Info] Serial string : 01234567
[uMTPrd - 11:26:18 - Info] Firmware Version string : Rev A
[uMTPrd - 11:26:18 - Info] Interface string : MTP
[uMTPrd - 11:26:18 - Info] USB Vendor ID : 0x1D6B
[uMTPrd - 11:26:18 - Info] USB Product ID : 0x0100
[uMTPrd - 11:26:18 - Info] USB class ID : 0x06
[uMTPrd - 11:26:18 - Info] USB subclass ID : 0x01
[uMTPrd - 11:26:18 - Info] USB Protocol ID : 0x01
[uMTPrd - 11:26:18 - Info] USB Device version : 0x3008
[uMTPrd - 11:26:18 - Info] USB FunctionFS Mode
[uMTPrd - 11:26:18 - Info] Wait for connection : 1
[uMTPrd - 11:26:18 - Info] Loop on disconnect : 0
[uMTPrd - 11:26:18 - Info] Show hidden files : 1
[uMTPrd - 11:26:18 - Info] File creation umask : System default umask
[uMTPrd - 11:26:18 - Info] Default UID : 0
[uMTPrd - 11:26:18 - Info] Default GID : 0
[uMTPrd - 11:26:18 - Info] inotify : yes
[uMTPrd - 11:26:44 - Error] incoming_packet : Read Error (-1)!
[uMTPrd - 11:27:24 - Error] incoming_packet : Read Error (-1)!
[uMTPrd - 11:28:31 - Error] incoming_packet : Read Error (-1)!
[uMTPrd - 11:28:41 - Error] incoming_packet : Read Error (-1)!

When I unmount the USB device, [uMTPrd - 11:28:41 - Error] incoming_packet: Read Error (-1)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant