Difference between revisions of "Services API"

From Nintendo Switch Brew
Jump to navigation Jump to search
Line 143: Line 143:
 
|
 
|
 
|-
 
|-
| fsp-srv
+
| fsp-srv, fsp-ldr, fsp-pr
 
| [[Filesystem services]]
 
| [[Filesystem services]]
 
|
 
|
 +
|-
 +
| gpio
 +
| GPIO services
 +
|
 +
|-
 +
| i2c
 +
| I2C services
 +
|
 
|-
 
|-
 
| irs
 
| irs
| ?
+
| IR Sensor services?
 
|  
 
|  
 
|-
 
|-
Line 222: Line 230:
 
| Overlay Notification services
 
| Overlay Notification services
 
|
 
|
 +
|-
 +
| pcie
 +
| PCIe services
 +
|
 
|-
 
|-
 
| pctl, pctl:a, pctl:s, pctl:r
 
| pctl, pctl:a, pctl:s, pctl:r
Line 246: Line 258:
 
| [[Play Report services]]
 
| [[Play Report services]]
 
|
 
|
 +
|-
 +
| psm
 +
| ?
 +
|
 +
|-
 +
| pwm
 +
| ?
 +
|
 
|-
 
|-
 
| set, set:sys
 
| set, set:sys
Line 254: Line 274:
 
| DNS resolver services
 
| DNS resolver services
 
|
 
|
 +
|-
 +
| spsm
 +
| ?
 +
|
 
|-
 
|-
 
| ssl
 
| ssl
Line 269: Line 293:
 
| ts
 
| ts
 
| ?
 
| ?
 +
|
 +
|-
 +
| uart
 +
| UART services
 
|  
 
|  
 
|-
 
|-

Revision as of 18:49, 6 June 2017

Services are system processes running in the background which wait for incoming requests. When a process wants to communicate with a service, it first needs to get a handle to the named service, and then it can communicate with the service via inter-process communication (each service has a name up to 8 characters).

Handles for services are retrieved from the service manager port, "sm:". Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a SVC.

sm:

Cmd Name
0 #Initialize
1 #GetService
2 #RegisterService
3

Initialize

Word Value
0 0x00000004
1 0x8000000A
2 0x00000001
0-1 Pid
0 "SFCI"
1 0x00000000
2 Always 0.

GetService

Word Value
0 0x00000004
1 0x0000000A
0 "SFCI"
1 0x00000001
2 Service name, zero padded and casted to u64.

RegisterService

Word Value
0 0x00000004
1 0x0000000C
0 "SFCI"
1 0x00000002
2 Service name, zero padded and casted to u64.
3 Max sessions? 32-bit integer.
4 Unknown bool

Service List

Service names Description Notes
acc:u1, acc:su Account services u1: User, su: Admin
appletAE Applet services
apm ?
aoc:u AddOn Content services
arp:r, arp:w Activity Report services? r: Reader, w: Writer
audin:u, audout:u, audren:u Audio services
bgtc:t, bgtc:sc Task services
bpc ?
bsd:u, bsd:s Sockets services
btm ?
caps:a, caps:c, caps:ss Capture services a: Album, ss: Screenshot
es ETicket services?
fan ?
fatal:u Fatal Error services
fgm ?
friend:u, friend:v, friend:m, friend:s, friend:a Friend services
fsp-srv, fsp-ldr, fsp-pr Filesystem services
gpio GPIO services
i2c I2C services
irs IR Sensor services?
hid, hid:dbg, hid:sys HID services
lbl ?
ldn:m Local Network Monitor services
ldr:ro, ldr:shel Loader services
lm Log services
lr ?
erpt:c Error Report services
mii:u, mii:e Mii services
ncm Content Manager services
nifm:u, nifm:a, nifm:s Network Interface services
nim, nim:shp NIM services shp: eShop
npns:u, npns:s ?
ns:am, ns:su, ns:dev NS Services am: Application Manager, su: System Update
nsd:u, nsd:a NSD services
ntc ?
nvdrv:a, nvmemp, mm:u NV services
omm ?
ovln:rcv, ovln:snd Overlay Notification services
pcie PCIe services
pctl, pctl:a, pctl:s, pctl:r Parental Control services
pcv ?
pdm:ntfy, pdm:qry Play Log services
pl:u Shared Font services
pm:bm, pm:shell Process Manager services
prepo:u, prepo:s, prepo:m, prepo:a Play Report services
psm ?
pwm ?
set, set:sys Settings services sys: System Settings
sfdnsres DNS resolver services
spsm ?
ssl SSL services
tc ?
time:u, time:a, time:s Time services
ts ?
uart UART services
vi:m, vi:s, vi:u Display services