Difference between revisions of "Capmtp services"
Jump to navigation
Jump to search
(→Notes) |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | This implements the MTP PTP | + | This implements the MTP PTP [https://www.usb.org/document-library/media-transfer-protocol-v11-spec-and-mtp-v11-adopters-agreement protocol]. This was added with [[11.0.0]]. |
= capmtp = | = capmtp = | ||
Line 19: | Line 19: | ||
! Cmd || Name || Notes | ! Cmd || Name || Notes | ||
|- | |- | ||
− | | 0 || || Takes a u32 max folder count, a u32 max image count, a u32 max video count, a transfer memory handle + u32 size and a type-0x5 buffer translated "Other" string. | + | | 0 || || Takes a u32 max folder count, a u32 max image count, a u32 max video count, a transfer memory handle + u32 size and a type-0x5 buffer translated "Other" utf-16 string. |
|- | |- | ||
| 1 || || No input or output. Unmaps transfer memory from Cmd0, stops "nn.capmtp.CapmtpCommandLoop". | | 1 || || No input or output. Unmaps transfer memory from Cmd0, stops "nn.capmtp.CapmtpCommandLoop". | ||
Line 29: | Line 29: | ||
| 4 || || No input. Returns true if "nn.capmtp.CapmtpCommandLoop" is running. | | 4 || || No input. Returns true if "nn.capmtp.CapmtpCommandLoop" is running. | ||
|- | |- | ||
− | | 5 || || No input. Returns readable event handle. | + | | 5 || || No input. Returns readable event handle. Signaled when the USB connection status changes. |
|- | |- | ||
− | | 6 || || No input. Returns a | + | | 6 || || No input. Returns true if a USB connection is established. |
|- | |- | ||
− | | 7 || || No input. Returns readable event handle. | + | | 7 || || No input. Returns readable event handle. Signaled when an error occurred during album scan. |
|- | |- | ||
− | | 8 || || No input or output. | + | | 8 || || No input or output. Returns the album scan Result. |
|- | |- | ||
|} | |} | ||
== Notes == | == Notes == | ||
− | Only | + | Only PTP operations 0x1001-0x100A are available. |
+ | |||
+ | * OpenSession/CloseSession only allow a maximum of 1 session to be opened. | ||
+ | * DeviceInfo: Serial Number is set to the output from [[Settings_services#GetSerialNumber|GetSerialNumber]]. Device Version is set to the [[System_Version_Title|SystemVersion]] DisplayVersion. | ||
While this has access to [[Filesystem_services#fsp-srv|fsp-srv]] it remains unused. | While this has access to [[Filesystem_services#fsp-srv|fsp-srv]] it remains unused. |
Latest revision as of 18:46, 7 December 2020
This implements the MTP PTP protocol. This was added with 11.0.0.
capmtp
This is "nn::capmtp::ICapmtpRootSession".
Cmd | Name | Notes |
---|---|---|
0 | No input. Returns a session of #ICapmtpInterface |
ICapmtpInterface
This is "nn::capmtp::ICapmtpInterface".
Cmd | Name | Notes |
---|---|---|
0 | Takes a u32 max folder count, a u32 max image count, a u32 max video count, a transfer memory handle + u32 size and a type-0x5 buffer translated "Other" utf-16 string. | |
1 | No input or output. Unmaps transfer memory from Cmd0, stops "nn.capmtp.CapmtpCommandLoop". | |
2 | No input or output. Starts MTP command handler thread "nn.capmtp.CapmtpCommandLoop". | |
3 | No input or output. Stops "nn.capmtp.CapmtpCommandLoop". | |
4 | No input. Returns true if "nn.capmtp.CapmtpCommandLoop" is running. | |
5 | No input. Returns readable event handle. Signaled when the USB connection status changes. | |
6 | No input. Returns true if a USB connection is established. | |
7 | No input. Returns readable event handle. Signaled when an error occurred during album scan. | |
8 | No input or output. Returns the album scan Result. |
Notes
Only PTP operations 0x1001-0x100A are available.
- OpenSession/CloseSession only allow a maximum of 1 session to be opened.
- DeviceInfo: Serial Number is set to the output from GetSerialNumber. Device Version is set to the SystemVersion DisplayVersion.
While this has access to fsp-srv it remains unused. Images and Videos are loaded with caps:a.
Program names are loaded with ns using the transfer memory from Cmd0.