views:

74

answers:

1

Hello,

Is it possible to write data to a specific RFID tag (to its user memory actually) by using Motorola's EMDK for .NET / the Symbol.rfid2.device dll ? Imagine you have 2 tags in front of you and you want to write data only to one of them.

The WriteTag method doesn't seem to support this.

Thanks.

A: 

I believe there is a new EMDK with Symbol.RFID3.device that allows you to perform tag specific operations.

Check CS_RFID3Sample3

    // Summary:
    //     This method is used to write data to the memory bank of a specific tag.
    //
    // Parameters:
    //   tagID:
    //     EPC-ID of the Tag on which the Write operation is to be performed.
    //
    //   writeAccessParams:
    //     Parameters required for the Write operation.
    //
    //   antennaInfo:
    //     Antennas on which the current operation is to be performed. If this is null,
    //     operation will be performed on all Antennas.
    public void WriteWait(string tagID, TagAccess.WriteAccessParams writeAccessParams, AntennaInfo antennaInfo);



public RFIDResults WriteTag(string tagId, string writeData, MEMORY_BANK mb, Int32 offset)
    {
        byte[] writeUserData = null;
        writeUserData = new byte[writeData.Length / 2];

        ConvertStringToByteArray(writeData, ref writeUserData);

        TagAccess.WriteAccessParams writeParams = new TagAccess.WriteAccessParams();
        writeParams.AccessPassword = 0;
        writeParams.WriteData = writeUserData;
        writeParams.WriteDataLength = (uint)writeUserData.Length;
        writeParams.MemoryBank = mb;
        writeParams.ByteOffset = (uint)offset;
        try
        {
            m_RfidReader.Actions.TagAccess.WriteWait(tagId, writeParams, null);
            return RFIDResults.RFID_API_SUCCESS;
        }
        catch (OperationFailureException e)
        {
            return e.Result;
        }
    }
TEEKAY