Difference between revisions of "NFC:SendTagCommand"

From 3dbrew
Jump to navigation Jump to search
(Created page with "=Request= {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code [0x00200102]}} {{IPC/RequestEntry|u32 inputsize}} {{IPC/RequestEntry|u32 outputsize}} {{IP...")
 
Line 5: Line 5:
 
{{IPC/RequestEntry|u32 inputsize}}
 
{{IPC/RequestEntry|u32 inputsize}}
 
{{IPC/RequestEntry|u32 outputsize}}
 
{{IPC/RequestEntry|u32 outputsize}}
{{IPC/RequestEntryRange|2|Timing related maybe?}}
+
{{IPC/RequestEntryRange|2|u64 microseconds value, timing related. The value passed to the internal send-cmd func is basically: "in64 / 1000000".}}
 
{{IPC/TranslateStaticBuffer|<nowiki>Input buffer address with static_buf_id=0</nowiki>|0}}
 
{{IPC/TranslateStaticBuffer|<nowiki>Input buffer address with static_buf_id=0</nowiki>|0}}
 
{{IPC/RequestEnd}}
 
{{IPC/RequestEnd}}

Revision as of 03:04, 15 February 2017

Request

Index Word Description
0 Header code [0x00200102]
1 u32 inputsize
2 u32 outputsize
3-4 u64 microseconds value, timing related. The value passed to the internal send-cmd func is basically: "in64 / 1000000".
5 Descriptor for static buffer (id 0)
6 Input buffer address with static_buf_id=0

The handler for this IPC command expects the following 0x100-bytes after the beginning of the above command buffer:

Index Word Description
0 Descriptor for static buffer (id 0)
1 Output buffer address

Response

Index Word Description
0 Header code
1 Result code
2 u32 actual_output_size
3 Descriptor for static buffer (id 0)
4 Output data pointer with static_buf_id=0

Description

This sends a raw NFC command to the tag. First byte in the inbuf is the command, followed by any parameters for the command if required. The outbuf contains the command response.

outputsize value 0x800 will be used when it's >=0x800. An error will be returned if actual_output_size is larger than outputsize. This can only be used when the TagState is 3.