Difference between revisions of "NIM Services"

From 3dbrew
Jump to navigation Jump to search
Line 100: Line 100:
 
=New3DS=
 
=New3DS=
 
NIM module only uses [[PTMSYSM:CheckNew3DS|CheckNew3DS]] for determining what heap sizes to use, in two functions. One is for the size of the 0x08000000 vmem heap, the other is probably for some buffer allocated on that heap. The New3DS version of these sizes are 0x1C000-bytes larger than the Old3DS sizes here.
 
NIM module only uses [[PTMSYSM:CheckNew3DS|CheckNew3DS]] for determining what heap sizes to use, in two functions. One is for the size of the 0x08000000 vmem heap, the other is probably for some buffer allocated on that heap. The New3DS version of these sizes are 0x1C000-bytes larger than the Old3DS sizes here.
 +
 +
=HTTPS requests=
 +
 +
==Trusted RootCAs==
 +
During startup NIM-module creates two RootCertChains with [[HTTP_Services|HTTPC]]. Both of these only contain the same [[HTTPC:RootCertChainAddDefaultCert|default]] cert with ID 0x3. The first RootCertChain is used with NetUpdateSOAP. Requests such as the "notifications.json" page don't use these RootCertChains(in this case just [[HTTPC:AddDefaultCert|default]] certID 0xB is used).

Revision as of 03:25, 22 February 2016

NIM user service "nim:u"

Command Header Description
0x00010000 Related to starting a sysupdate?
0x00020000 GetUpdateDownloadProgress
0x0003.... ?
0x00040000 FinishTitlesInstall
0x00050000 This obtains an event handle. Home Menu will check whether a system update is available when this event is triggered.
0x0006.... ?
0x0007.... ?
0x0008.... ?
0x00090000 CheckSysupdateAvailable
0x000A0000 GetState
0x000B.... GetSystemTitleHash (unique hash for each sysupdate titlelist)

NIM server service "nim:s"

Command Header Description
0x00060080 The input at cmdreq[1-2] is an u64 titleID. This writes an u8 to cmdreply[2]. It's unknown what exactly the eShop application uses this for, it only uses this command for apps which are installed(checked via AM probably). In those cases, it seems the outval for this command(with result-code=0) is normally 0?
0x000A0000 CheckSysupdateAvailableSOAP
0x0016020A ListTitles
0x002D0042 DownloadTickets
0x00420240 StartDownload

NIM server service "nim:aoc"

Command Header Description
0x00030042 SetApplicationId
0x00040042 SetTin
0x000902D0 ListContentSetsEx
0x00180000 GetBalance
0x001D0000 GetCustomerSupportCode
0x00210000 Initialize
0x00240282 CalculateContentsRequiredSize
0x00250000 RefreshServerTime

NIM service "nim:ndm"

kagiya server

The nim system module communicates with a server called kagiya (kagiya-ctr.cdn.nintendo.net or kagiya-dev-ctr.cdn.nintendo.net for development units). It provides the 9.6 crypto seed in binary form for any given title ID under (HTTPS) kagiya-ctr.cdn.nintendo.net/title/0x%16llx/ext_key?country=%s, where %16llx is the title ID and %s is a country code as used in the eShop.

New3DS

NIM module only uses CheckNew3DS for determining what heap sizes to use, in two functions. One is for the size of the 0x08000000 vmem heap, the other is probably for some buffer allocated on that heap. The New3DS version of these sizes are 0x1C000-bytes larger than the Old3DS sizes here.

HTTPS requests

Trusted RootCAs

During startup NIM-module creates two RootCertChains with HTTPC. Both of these only contain the same default cert with ID 0x3. The first RootCertChain is used with NetUpdateSOAP. Requests such as the "notifications.json" page don't use these RootCertChains(in this case just default certID 0xB is used).