Difference between revisions of "BCAT services"

From Nintendo Switch Brew
Jump to navigation Jump to search
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
BCAT (Background Content Asymmetric synchronized delivery and Transmission) encompasses a set of content download/upload related services.
 
BCAT (Background Content Asymmetric synchronized delivery and Transmission) encompasses a set of content download/upload related services.
  
= BCAT services =
+
= bcat:a, bcat:m, bcat:u, bcat:s =
 +
These are "nn::bcat::detail::ipc::IServiceCreator".
 +
 
 +
These were added with [2.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || CreateBcatService || Takes an input u64 ProcessId, returns an [[#IBcatService]]
 +
|-
 +
| 1 || CreateDeliveryCacheStorageService || Takes an input u64 ProcessId, returns an [[#IDeliveryCacheStorageService]]
 +
|-
 +
| 2 || CreateDeliveryCacheStorageServiceWithApplicationId || Takes an input u64 TitleId, returns an [[#IDeliveryCacheStorageService]]
 +
|-
 +
| [2.0.0-2.3.0] 3 || CreateDeliveryCacheProgressService || Takes an input u64 ProcessId, returns an [[#IDeliveryCacheProgressService]]
 +
|-
 +
| [2.0.0-2.3.0] 4 || CreateDeliveryCacheProgressServiceWithApplicationId || Takes an input u64 TitleId, returns an [[#IDeliveryCacheProgressService]]
 +
|}
 +
 
 
Equivalent to 3DS BOSS(SpotPass). See [[BCAT_Content_Container|here]] for BCAT-content-container.
 
Equivalent to 3DS BOSS(SpotPass). See [[BCAT_Content_Container|here]] for BCAT-content-container.
  
== bcat:u ==
+
== IBcatService ==
 +
This is "nn::bcat::detail::ipc::IBcatService".
  
== bcat:s ==
+
This was added with [2.0.0+].
  
== bcat:m ==
+
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 10100 || [[#RequestSyncDeliveryCache]]
 +
|-
 +
| 10101 || [5.0.0+] RequestSyncDeliveryCacheWithDirectoryName
 +
|-
 +
| 10200 || [5.0.0+] CancelSyncDeliveryCacheRequest
 +
|-
 +
| 20100 || [[#RequestSyncDeliveryCacheWithApplicationId]]
 +
|-
 +
| 20101 || [5.0.0+] RequestSyncDeliveryCacheWithApplicationIdAndDirectoryName
 +
|-
 +
| 20300 || [8.0.0+] [[#GetDeliveryCacheStorageUpdateNotifier]]
 +
|-
 +
| 20301 || [8.0.0+] [[#RequestSuspendDeliveryTask]]
 +
|-
 +
| 30100 || SetPassphrase
 +
|-
 +
| [2.0.0-2.3.0] 30101 ||
 +
|-
 +
| [2.0.0-2.3.0] 30102 ||
 +
|-
 +
| 30200 || [3.0.0+] RegisterDeliveryTask
 +
|-
 +
| 30201 || [3.0.0+] UnregisterDeliveryTask
 +
|-
 +
| 30202 || [3.0.0+] BlockDeliveryTask
 +
|-
 +
| 30203 || [3.0.0+] UnblockDeliveryTask
 +
|-
 +
| 30300 || [8.0.0+] RegisterSystemApplicationDeliveryTasks
 +
|-
 +
| 90100 || GetDeliveryTaskList
 +
|-
 +
| 90200 || [[#GetDeliveryList]]
 +
|-
 +
| 90201 || [3.0.0+] ClearDeliveryCacheStorage
 +
|-
 +
| 90202 || [8.0.0+] ClearDeliveryTaskSubscriptionStatus
 +
|-
 +
| 90300 || [3.0.0+] GetPushNotificationLog
 +
|}
 +
 
 +
=== RequestSyncDeliveryCache ===
 +
No input/output.
 +
 
 +
[3.0.0+] Now returns an [[#IDeliveryCacheProgressService]].
  
== bcat:a ==
+
=== RequestSyncDeliveryCacheWithApplicationId ===
 +
Takes a total of 8-bytes of input, no output.
  
= News services =
+
[3.0.0+] Now takes an additional 8-bytes of input, and returns an [[#IDeliveryCacheProgressService]].
  
== <nowiki>news:p</nowiki> ==
+
=== GetDeliveryCacheStorageUpdateNotifier ===
 +
Takes a total of 8-bytes of input, returns an [[#INotifierService]].
  
== <nowiki>news:v</nowiki> ==
+
=== RequestSuspendDeliveryTask ===
 +
Takes a total of 8-bytes of input, returns an [[#IDeliveryTaskSuspensionService]].
  
== <nowiki>news:m</nowiki> ==
+
=== GetDeliveryList ===
 +
Takes a type-0x6 output buffer, returns a total of 4-bytes of output.
  
== <nowiki>news:c</nowiki> ==
+
[3.0.0+] Now takes a total of 8-bytes of input, and returns an additional 4-bytes of output.
  
== <nowiki>news:a</nowiki> ==
+
=== IDeliveryCacheProgressService ===
 +
This is "nn::bcat::detail::ipc::IDeliveryCacheProgressService".
  
 +
This was added with [2.0.0+].
  
= Play Report services =
+
{| class="wikitable" border="1"
The "Play Report" (prepo) service uploads system and user information to a cloud server.
+
|-
This includes the following fields:
+
! Cmd || Name
sys_info
+
|-
data
+
| 0 || GetEvent
application_id
+
|-
event_id
+
| 1 || GetImpl
operation_mode
+
|}
lc_recorded_at (followed by a timestamp)
+
 
nc_recorded_at (followed by a timestamp)
+
== IDeliveryCacheStorageService ==
nsa_id
+
This is "nn::bcat::detail::ipc::IDeliveryCacheStorageService".
os_version
+
 
 +
This was added with [2.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || CreateFileService
 +
|-
 +
| 1 || CreateDirectoryService
 +
|-
 +
| 10 || EnumerateDeliveryCacheDirectory
 +
|}
 +
 
 +
=== IDeliveryCacheFileService ===
 +
This is "nn::bcat::detail::ipc::IDeliveryCacheFileService".
 +
 
 +
This was added with [2.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || Open
 +
|-
 +
| 1 || Read
 +
|-
 +
| 2 || GetSize
 +
|-
 +
| 3 || GetDigest
 +
|}
 +
 
 +
=== IDeliveryCacheDirectoryService ===
 +
This is "nn::bcat::detail::ipc::IDeliveryCacheDirectoryService".
 +
 
 +
This was added with [2.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || Open
 +
|-
 +
| 1 || Read
 +
|-
 +
| 2 || GetCount
 +
|}
 +
 
 +
=== INotifierService ===
 +
This is "nn::bcat::detail::ipc::INotifierService".
 +
 
 +
Added with [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || GetEvent ||
 +
|}
 +
 
 +
=== IDeliveryTaskSuspensionService ===
 +
This is "nn::bcat::detail::ipc::IDeliveryTaskSuspensionService".
 +
 
 +
Added with [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || GetEvent ||
 +
|}
 +
 
 +
= <nowiki>news:a, news:c, news:m, news:p, news:v</nowiki> =
 +
These are <nowiki>"nn::news::detail::ipc::IServiceCreator"</nowiki>.
 +
 
 +
On [1.0.0] these are <nowiki>"nn::news::detail::ipc::INewsService"</nowiki>, see [[#INewsService]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name || Notes
 +
|-
 +
| 0 || || No input, returns an [[#INewsService]].
 +
|-
 +
| 1 || || No input, returns an [[#INewlyArrivedEventHolder]].
 +
|-
 +
| 2 || || No input, returns an [[#INewsDataService]].
 +
|-
 +
| 3 || || No input, returns an [[#INewsDatabaseService]].
 +
|-
 +
| 4 || || No input, returns an [[#IOverwriteEventHolder]].
 +
|}
 +
 
 +
== INewsService ==
 +
This is <nowiki>"nn::news::detail::ipc::INewsService"</nowiki>.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 10100 ||
 +
|-
 +
| 20100 ||
 +
|-
 +
| 30100 ||
 +
|-
 +
| 30101 || [3.0.0+]
 +
|-
 +
| 30110 || [6.0.0+]
 +
|-
 +
| 30200 ||
 +
|-
 +
| 30201 || [8.0.0+]
 +
|-
 +
| 30300 ||
 +
|-
 +
| 30400 || [3.0.0+]
 +
|-
 +
| 30500 || [8.0.0+] ? (Takes a total of 8-bytes of input, a handle, and a type-0x9 input buffer, returns an [[#IUnknown2]])
 +
|-
 +
| [1.0.0] 30900 || (No input, returns an [[#INewlyArrivedEventHolder]])
 +
|-
 +
| [1.0.0] 30901 || (No input, returns an [[#INewsDataService]])
 +
|-
 +
| [1.0.0] 30902 || (No input, returns an [[#INewsDatabaseService]])
 +
|-
 +
| 40100 ||
 +
|-
 +
| 40101 || [3.0.0+]
 +
|-
 +
| 40200 ||
 +
|-
 +
| 40201 ||
 +
|-
 +
| 90100 ||
 +
|}
 +
 
 +
== INewlyArrivedEventHolder ==
 +
This is <nowiki>"nn::news::detail::ipc::INewlyArrivedEventHolder"</nowiki>.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 ||
 +
|}
 +
 
 +
== INewsDataService ==
 +
This is <nowiki>"nn::news::detail::ipc::INewsDataService"</nowiki>.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 ||
 +
|-
 +
| 1 ||
 +
|-
 +
| 2 ||
 +
|-
 +
| 3 ||
 +
|-
 +
| 1001 || [6.0.0+]
 +
|}
 +
 
 +
== INewsDatabaseService ==
 +
This is <nowiki>"nn::news::detail::ipc::INewsDatabaseService"</nowiki>.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 ||
 +
|-
 +
| 1 ||
 +
|-
 +
| 2 ||
 +
|-
 +
| 3 ||
 +
|-
 +
| 4 ||
 +
|-
 +
| 5 ||
 +
|-
 +
| 1000 || [6.0.0+]
 +
|}
 +
 
 +
== IOverwriteEventHolder ==
 +
This is <nowiki>"nn::news::detail::ipc::IOverwriteEventHolder"</nowiki>.
  
And the contents of the following file:
+
{| class="wikitable" border="1"
is_user_agreement_check_enabled.bin
+
|-
 +
! Cmd || Name
 +
|-
 +
| 0 ||
 +
|}
  
All the information is periodically uploaded to the following URL:<br>
+
== IUnknown2 ==
* <nowiki>https://receive-%.dg.srv.nintendo.net/post</nowiki>
+
This was added with [8.0.0+].
  
It also checks the validity of the device's authentication token using the following URL:<br>
+
{| class="wikitable" border="1"
* <nowiki>https://dauth-%.ndas.srv.nintendo.net/v1/device_auth_token</nowiki>
+
|-
 +
! Cmd || Name
 +
|-
 +
| 0 ||
 +
|-
 +
| 1 ||
 +
|-
 +
| 2 ||
 +
|-
 +
| 3 ||
 +
|}
  
== prepo:u ==
+
= prepo:a, prepo:a2, prepo:m, prepo:u, prepo:s =
 +
These are "nn::prepo::detail::ipc::IPrepoService".
  
== prepo:s ==
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 10100 ||
+
| 10100 || SaveReportOld ([1.0.0-5.1.0] SaveReport)
 +
|-
 +
| 10101 || SaveReportWithUserOld ([1.0.0-5.1.0] SaveReportWithUser)
 +
|-
 +
| 10102 || [6.0.0+] SaveReport
 +
|-
 +
| 10103 || [6.0.0+] SaveReportWithUser
 +
|-
 +
| 10200 || RequestImmediateTransmission
 +
|-
 +
| 10300 || GetTransmissionStatus
 +
|-
 +
| 20100 || SaveSystemReport
 +
|-
 +
| 20101 || SaveSystemReportWithUser
 +
|-
 +
| 20200 || [4.0.0+] SetOperationMode
 +
|-
 +
| 30100 || ClearStorage
 +
|-
 +
| 30200 || [6.0.0+] ClearStatistics
 +
|-
 +
| 30300 || [6.0.0+] GetStorageUsage
 +
|-
 +
| 30400 || [6.0.0+] GetStatistics
 +
|-
 +
| 30401 || [6.0.0+] GetThroughputHistory
 
|-
 
|-
| 10101 ||
+
| 30500 || [6.0.0+] GetLastUploadError
 
|-
 
|-
| 10200 ||
+
| 40100 || [2.0.0+] IsUserAgreementCheckEnabled
 
|-
 
|-
| 10300 ||
+
| 40101 || [2.0.0+] SetUserAgreementCheckEnabled
 
|-
 
|-
| 20100 ||
+
| 90100 || [6.0.0+] ReadAllReportFiles ([1.0.0-5.1.0] GetStorageUsage)
 
|-
 
|-
| 20101 ||
+
| [1.0.0] 90101 ||  
 
|-
 
|-
| 30100 ||
+
| [1.0.0] 90102 ||  
 
|-
 
|-
| 40100 ||
+
| [5.0.0-5.1.0] 90200 || GetStatistics
 
|-
 
|-
| 40101 ||
+
| [5.0.0-5.1.0] 90201 || GetThroughputHistory
 
|-
 
|-
| 90100 ||
+
| [5.0.0-5.1.0] 90300 || GetLastUploadError
 
|}
 
|}
  
== prepo:m ==
+
== Data reporting ==
 +
The "Play Report" (prepo) service uploads system and user information to a cloud server.
 +
This includes the following fields:
 +
sys_info
 +
data
 +
application_id
 +
event_id
 +
operation_mode
 +
lc_recorded_at (followed by a timestamp)
 +
nc_recorded_at (followed by a timestamp)
 +
nsa_id
 +
os_version
  
== prepo:a ==
+
And the contents of the following file:
 +
is_user_agreement_check_enabled.bin
 +
 
 +
All the information is periodically uploaded to the following URL:<br>
 +
* <nowiki>https://receive-%.dg.srv.nintendo.net/post</nowiki>
 +
 
 +
It also checks the validity of the device's authentication token using the following URL:<br>
 +
* <nowiki>https://dauth-%.ndas.srv.nintendo.net/v1/device_auth_token</nowiki>
  
 
[[Category:Services]]
 
[[Category:Services]]

Revision as of 23:23, 25 June 2019

BCAT (Background Content Asymmetric synchronized delivery and Transmission) encompasses a set of content download/upload related services.

bcat:a, bcat:m, bcat:u, bcat:s

These are "nn::bcat::detail::ipc::IServiceCreator".

These were added with [2.0.0+].

Cmd Name Notes
0 CreateBcatService Takes an input u64 ProcessId, returns an #IBcatService
1 CreateDeliveryCacheStorageService Takes an input u64 ProcessId, returns an #IDeliveryCacheStorageService
2 CreateDeliveryCacheStorageServiceWithApplicationId Takes an input u64 TitleId, returns an #IDeliveryCacheStorageService
[2.0.0-2.3.0] 3 CreateDeliveryCacheProgressService Takes an input u64 ProcessId, returns an #IDeliveryCacheProgressService
[2.0.0-2.3.0] 4 CreateDeliveryCacheProgressServiceWithApplicationId Takes an input u64 TitleId, returns an #IDeliveryCacheProgressService

Equivalent to 3DS BOSS(SpotPass). See here for BCAT-content-container.

IBcatService

This is "nn::bcat::detail::ipc::IBcatService".

This was added with [2.0.0+].

Cmd Name
10100 #RequestSyncDeliveryCache
10101 [5.0.0+] RequestSyncDeliveryCacheWithDirectoryName
10200 [5.0.0+] CancelSyncDeliveryCacheRequest
20100 #RequestSyncDeliveryCacheWithApplicationId
20101 [5.0.0+] RequestSyncDeliveryCacheWithApplicationIdAndDirectoryName
20300 [8.0.0+] #GetDeliveryCacheStorageUpdateNotifier
20301 [8.0.0+] #RequestSuspendDeliveryTask
30100 SetPassphrase
[2.0.0-2.3.0] 30101
[2.0.0-2.3.0] 30102
30200 [3.0.0+] RegisterDeliveryTask
30201 [3.0.0+] UnregisterDeliveryTask
30202 [3.0.0+] BlockDeliveryTask
30203 [3.0.0+] UnblockDeliveryTask
30300 [8.0.0+] RegisterSystemApplicationDeliveryTasks
90100 GetDeliveryTaskList
90200 #GetDeliveryList
90201 [3.0.0+] ClearDeliveryCacheStorage
90202 [8.0.0+] ClearDeliveryTaskSubscriptionStatus
90300 [3.0.0+] GetPushNotificationLog

RequestSyncDeliveryCache

No input/output.

[3.0.0+] Now returns an #IDeliveryCacheProgressService.

RequestSyncDeliveryCacheWithApplicationId

Takes a total of 8-bytes of input, no output.

[3.0.0+] Now takes an additional 8-bytes of input, and returns an #IDeliveryCacheProgressService.

GetDeliveryCacheStorageUpdateNotifier

Takes a total of 8-bytes of input, returns an #INotifierService.

RequestSuspendDeliveryTask

Takes a total of 8-bytes of input, returns an #IDeliveryTaskSuspensionService.

GetDeliveryList

Takes a type-0x6 output buffer, returns a total of 4-bytes of output.

[3.0.0+] Now takes a total of 8-bytes of input, and returns an additional 4-bytes of output.

IDeliveryCacheProgressService

This is "nn::bcat::detail::ipc::IDeliveryCacheProgressService".

This was added with [2.0.0+].

Cmd Name
0 GetEvent
1 GetImpl

IDeliveryCacheStorageService

This is "nn::bcat::detail::ipc::IDeliveryCacheStorageService".

This was added with [2.0.0+].

Cmd Name
0 CreateFileService
1 CreateDirectoryService
10 EnumerateDeliveryCacheDirectory

IDeliveryCacheFileService

This is "nn::bcat::detail::ipc::IDeliveryCacheFileService".

This was added with [2.0.0+].

Cmd Name
0 Open
1 Read
2 GetSize
3 GetDigest

IDeliveryCacheDirectoryService

This is "nn::bcat::detail::ipc::IDeliveryCacheDirectoryService".

This was added with [2.0.0+].

Cmd Name
0 Open
1 Read
2 GetCount

INotifierService

This is "nn::bcat::detail::ipc::INotifierService".

Added with [8.0.0+].

Cmd Name Notes
0 GetEvent

IDeliveryTaskSuspensionService

This is "nn::bcat::detail::ipc::IDeliveryTaskSuspensionService".

Added with [8.0.0+].

Cmd Name Notes
0 GetEvent

news:a, news:c, news:m, news:p, news:v

These are "nn::news::detail::ipc::IServiceCreator".

On [1.0.0] these are "nn::news::detail::ipc::INewsService", see #INewsService.

Cmd Name Notes
0 No input, returns an #INewsService.
1 No input, returns an #INewlyArrivedEventHolder.
2 No input, returns an #INewsDataService.
3 No input, returns an #INewsDatabaseService.
4 No input, returns an #IOverwriteEventHolder.

INewsService

This is "nn::news::detail::ipc::INewsService".

Cmd Name
10100
20100
30100
30101 [3.0.0+]
30110 [6.0.0+]
30200
30201 [8.0.0+]
30300
30400 [3.0.0+]
30500 [8.0.0+] ? (Takes a total of 8-bytes of input, a handle, and a type-0x9 input buffer, returns an #IUnknown2)
[1.0.0] 30900 (No input, returns an #INewlyArrivedEventHolder)
[1.0.0] 30901 (No input, returns an #INewsDataService)
[1.0.0] 30902 (No input, returns an #INewsDatabaseService)
40100
40101 [3.0.0+]
40200
40201
90100

INewlyArrivedEventHolder

This is "nn::news::detail::ipc::INewlyArrivedEventHolder".

Cmd Name
0

INewsDataService

This is "nn::news::detail::ipc::INewsDataService".

Cmd Name
0
1
2
3
1001 [6.0.0+]

INewsDatabaseService

This is "nn::news::detail::ipc::INewsDatabaseService".

Cmd Name
0
1
2
3
4
5
1000 [6.0.0+]

IOverwriteEventHolder

This is "nn::news::detail::ipc::IOverwriteEventHolder".

Cmd Name
0

IUnknown2

This was added with [8.0.0+].

Cmd Name
0
1
2
3

prepo:a, prepo:a2, prepo:m, prepo:u, prepo:s

These are "nn::prepo::detail::ipc::IPrepoService".

Cmd Name
10100 SaveReportOld ([1.0.0-5.1.0] SaveReport)
10101 SaveReportWithUserOld ([1.0.0-5.1.0] SaveReportWithUser)
10102 [6.0.0+] SaveReport
10103 [6.0.0+] SaveReportWithUser
10200 RequestImmediateTransmission
10300 GetTransmissionStatus
20100 SaveSystemReport
20101 SaveSystemReportWithUser
20200 [4.0.0+] SetOperationMode
30100 ClearStorage
30200 [6.0.0+] ClearStatistics
30300 [6.0.0+] GetStorageUsage
30400 [6.0.0+] GetStatistics
30401 [6.0.0+] GetThroughputHistory
30500 [6.0.0+] GetLastUploadError
40100 [2.0.0+] IsUserAgreementCheckEnabled
40101 [2.0.0+] SetUserAgreementCheckEnabled
90100 [6.0.0+] ReadAllReportFiles ([1.0.0-5.1.0] GetStorageUsage)
[1.0.0] 90101
[1.0.0] 90102
[5.0.0-5.1.0] 90200 GetStatistics
[5.0.0-5.1.0] 90201 GetThroughputHistory
[5.0.0-5.1.0] 90300 GetLastUploadError

Data reporting

The "Play Report" (prepo) service uploads system and user information to a cloud server. This includes the following fields:

sys_info
data
application_id
event_id
operation_mode
lc_recorded_at (followed by a timestamp)
nc_recorded_at (followed by a timestamp)
nsa_id
os_version

And the contents of the following file:

is_user_agreement_check_enabled.bin

All the information is periodically uploaded to the following URL:

  • https://receive-%.dg.srv.nintendo.net/post

It also checks the validity of the device's authentication token using the following URL:

  • https://dauth-%.ndas.srv.nintendo.net/v1/device_auth_token