viveris / uMTP-Responder

Lightweight USB Media Transfer Protocol (MTP) responder daemon for GNU/Linux
GNU General Public License v3.0
184 stars 49 forks source link

[BBB.IO] new to MTP, File (Create/Save) access issues? #66

Open RobertCNelson opened 2 years ago

RobertCNelson commented 2 years ago

Thanks for this wonderful project, i just discovered it today while trying to solve one of our age old, "out of box" configuration problems we have at BeagleBoard.org..

I've got things mostly working, just really a quick question on MTP or maybe my config is messed up.. With a Windows 10 host, we can correctly create Folders, Drag Drop Files and Rename Files..

But i can't seem to "create" a new file (or open, edit and "save" as the same file name), is this normal in MTP or did i mess things up?

My Default config for uMTP is:

https://github.com/rcn-ee/repos/blob/master/bb-usb-gadgets/suite/bullseye/debian/bbb-umtprd.conf

Our gadget "mess" is this script for reference:

https://github.com/rcn-ee/repos/blob/master/bb-usb-gadgets/suite/bullseye/debian/bb-start-acm-ncm-rndis-old-gadget

Using:

[uMTPrd - 21:44:14 - Info] Version: v1.4.3 compiled the Oct 8 2021@18:04:33

and daily builds for BeagleBone Users:

https://rcn-ee.net/rootfs/debian-armhf/ (any date on or after: 21-10-08/ has MTP enabled by default..)

I'm working on polishing our Bullseye release..

Thanks!

Run log:

Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] uMTP Responder
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Version: v1.4.3 compiled the Oct  8 2021@18:04:33
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] (c) 2018 - 2020 Viveris Technologies
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Add storage /boot/ (RW) - Root Path: /boot - Flags: 0x00000000
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Add storage WiFi Credentials (RW) - Root Path: /etc/wpa_supplicant/ - Flags: 0x00000000
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Add storage Network Configuration (RW) - Root Path: /etc/systemd/network/ - Flags: 0x00000000
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Add storage /opt/mtp/ Examples (RW) - Root Path: /opt/mtp - Flags: 0x00000000
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Device path : /dev/ffs-mtp/ep0
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB In End point path : /dev/ffs-mtp/ep1
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Out End point path : /dev/ffs-mtp/ep2
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Event End point path : /dev/ffs-mtp/ep3
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Max packet size : 0x200 bytes
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Max write buffer size : 0x200 bytes
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Max read buffer size : 0x200 bytes
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Read file buffer size : 0x4000 bytes
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Manufacturer string : BeagleBoard.org
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Product string : BeagleBoard.org
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Serial string : 01234567
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Firmware Version string : Rev A
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Interface string : MTP
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Vendor ID : 0x1D6B
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Product ID : 0x0100
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB class ID : 0x06
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB subclass ID : 0x01
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Protocol ID : 0x01
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB Device version : 0x3008
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] USB FunctionFS Mode
Oct 08 22:12:39 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Wait for connection : 0
Oct 08 22:12:38 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Loop on disconnect : 1
Oct 08 22:12:38 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] Show hidden files : 1
Oct 08 22:12:38 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] File creation umask : 022
Oct 08 22:12:38 BeagleBone bb-start-usb-gadgets[344]: [uMTPrd - 22:12:39 - Info] inotify : yes
jfdelnero commented 2 years ago

File creation should work. Please enable the debug mode at the compilation (CFLAGS="-DDEBUG") and share the logs with one file creation attempt.

RobertCNelson commented 2 years ago

I'll also try on Linux, as Windows just doesn't show the option

image ' (Windows and Linux logs..) https://gist.github.com/RobertCNelson/531867bdd0ad4650803583d0abb9322e

Very strange, so in Linux, NEMO allowed me to write the drive.. Should we be using a third part application in Windows 10 maybe? My laptop is running Windows 10 Enterprise, 20H2.. (corporate laptop..)

jfdelnero commented 2 years ago

According to the windows logs it appears that the file is correctly created. am i missing something ? Are you trying to save something to this file ?

RobertCNelson commented 2 years ago

So "Original.txt" was "drag" n "dropped" via Windows.. I guess i'm expecting the ability to Right click and "add new File" or even "open" and then save in the same directory??

(picture attached..)

image

jfdelnero commented 2 years ago

Can you try the same operation with an android smartphone ?