Manu services: Difference between revisions
No edit summary |
No edit summary |
||
Line 95: | Line 95: | ||
Writes raw data to the device. | Writes raw data to the device. | ||
== Cmd7 == | |||
Takes a type-0x9 input buffer containing a path string. No output. | |||
== Cmd8 == | |||
Takes a type-0x9 input buffer containing a path string. No output. | |||
= Protocol = | |||
== CommandId == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value || Name | |||
|- | |||
|} | |||
== Command == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || Magicnum (0xDEADCAFEDEADCAFE) | |||
|- | |||
| 0x8 || 0x4 || [[#CommandId|CommandId]] | |||
|- | |||
| 0xC || 0x4 || Padding | |||
|- | |||
| 0x10 || 0x8 || Payload size | |||
|} | |||
The payload data with the above size follows. | |||
After [[#WriteFile|WriteFile]] sends the file-data, it reads an additional [[#Response|Response]]. | |||
== Response == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || Ignored by manu. | |||
|- | |||
| 0x8 || 0x4 || Status, non-zero indicates error. | |||
|- | |||
| 0xC || 0x4 || Padding | |||
|- | |||
| 0x10 || 0x8 || Output value if any. May be returned by the service commands. | |||
|} | |||
[[#ReadFile|ReadFile]] additionally returns the requested file-data, followed by another [[#Response|Response]]. | |||
== CommandServerStatus == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || Status, non-zero indicates error. | |||
|} | |||
== CommandServerResponse == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || Status, non-zero indicates error. | |||
|- | |||
| 0x4 || 0x4 || Padding | |||
|- | |||
| 0x8 || 0x4 || Result from handling the [[#CommandId|CommandId]]. | |||
|} | |||
= Notes = | |||
There's a total of 3 threads: 2 for the IPC handler threads (which send commands to the remote device and gets the response). And there's the separate nn::manu::CommandServer::RunThread, which receives commands from the remote device and sends replies. This latter thread runs regardless of any service commands being used. | |||
[[Category:Services]] | [[Category:Services]] |