Home Contents | # v4kf:chipWrite | V4kf | Core4 Lua Event System

## SYNOPSIS

rdrhandle:chipWrite(address, data [, i [, j]])

## DESCRIPTION

Write data to the chip card. The optional parameters i and j select the substring data[i], data[i+1], ···, data[j]. The default value for i is 1, the default for j is the length of data.

The chip card must have been enabled by calling v4kf:chipEnable before it can be written. In addition, some chips allow writing only if a read command has been issued beforehand to avoid accidental writes.

This command can only be used if the reader is in the Locked state, which ensures that the chip contact is engaged and stays so for the whole operation.

While this state processes, the reader is in the Processing state and v4kf:isProcessing() returns true. The reader returns to the Locked state on completion.

The command returns immediately. Actual execution of any reader operation is done within the event loop.

The processing result is provided with the v4kf.processingComplete() callback.

## RETURN VALUE

Returns true if the command was accepted, false if not.

## SEE ALSO

v4kf:chipDisable, v4kf:chipEnable, v4kf:chipRead, v4kf:chipActivate, v4kf:state