Isn't it possible to write Sitag S tags?

Technical Discussion on the PhidgetRFID
Newbie
Fresh meat
Posts: 2
Joined: Wed Mar 27, 2013 1:51 am
Contact:

Isn't it possible to write Sitag S tags?

Postby Newbie » Tue Aug 13, 2013 2:10 am

Hi all.

I have a Box full with empty Sitag S Cards (around 1000pcs.).

I'm trying to write with this example code:

Code: Select all

/*
 * Copyright 2007 Phidgets Inc.  All rights reserved.
 */

import com.phidgets.*;
import com.phidgets.event.*;

public class WriteACard
{
   public static final void main(String args[]) throws Exception {
      RFIDPhidget rfid;

      System.out.println(Phidget.getLibraryVersion());

      rfid = new RFIDPhidget();
      rfid.addAttachListener(new AttachListener() {
         public void attached(AttachEvent ae)
         {
            try
            {
               ((RFIDPhidget)ae.getSource()).setAntennaOn(true);
               ((RFIDPhidget)ae.getSource()).setLEDOn(true);
            }
            catch (PhidgetException ex) { }
            System.out.println("attachment of " + ae);
         }
      });
      rfid.addDetachListener(new DetachListener() {
         public void detached(DetachEvent ae) {
            System.out.println("detachment of " + ae);
         }
      });
      rfid.addErrorListener(new ErrorListener() {
         public void error(ErrorEvent ee) {
            System.out.println("error event for " + ee);
         }
      });
      rfid.addTagGainListener(new TagGainListener()
      {
         public void tagGained(TagGainEvent oe)
         {
            System.out.println("Tag Gained: " +oe.getValue() + " (Proto:"+ oe.getProtocol()+")");
            
         }
      });
      rfid.addTagLossListener(new TagLossListener()
      {
         public void tagLost(TagLossEvent oe)
         {
            System.out.println(oe);
            System.out.println(oe.getValue());
         }
      });
      rfid.addOutputChangeListener(new OutputChangeListener()
      {
         public void outputChanged(OutputChangeEvent oe)
         {
            System.out.println(oe);
         }
      });

      rfid.open(331514);
      System.out.println("waiting for RFID attachment...");
      rfid.waitForAttachment(1000);

      System.out.println("Serial: " + rfid.getSerialNumber());
      System.out.println("Outputs: " + rfid.getOutputCount());
      //System.out.println("Letzter Tag war: " + rfid.getLastTag());
      //How to write a tag:
      rfid.write("123456789a", RFIDPhidget.PHIDGET_RFID_PROTOCOL_EM4100, false);

      System.out.println("Outputting events.  Input to stop.");
      System.in.read();
      System.out.print("closing...");
      rfid.close();
      rfid = null;
      System.out.println(" ok");
      if (false) {
         System.out.println("wait for finalization...");
         System.gc();
      }
   }
}


but i'm getting this error:

Exception in thread "main" PhidgetException 13 (Given timeout has been exceeded.)
at com.phidgets.RFIDPhidget.write(Native Method)
at WriteACard.main(WriteACard.java:71)

I'm using Phidget21 - Version 2.1.8 - Built Aug 2 2013 09:32:33

looks like there's something wrong with this:
rfid.write("123456789a", RFIDPhidget.PHIDGET_RFID_PROTOCOL_EM4100, false);

But I don't find out what it is...

Even when I try to write with the Full example, I receive an error:

http://www.descom.ch/images/rfid


Does anyone know how to solve this?

User avatar
mparadis
Site Admin
Posts: 656
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Isn't it possible to write Sitag S tags?

Postby mparadis » Tue Aug 13, 2013 7:41 am

The error you're getting using the control panel example (Invalid argument passed to function) occurs when there's something wrong with the tag string for the given protocol you're using. In the screenshot, you're trying to write using the EM4100 protocol with a five-digit tag string. The tag string needs to be a 10-digit hexadecimal number. As a side note, I think Hitag S usually uses ISO11785, so you should select that instead of EM4100. ISO11785 requires a 15-digit decimal number and has other restrictions that you can read about in the user guide for the RFID reader.

The other error you're getting occurs when the 1024 is unable to write to the tag.
- Make sure the tag is within range and held parallel to the reader.
- Be sure you're using the correct protocol.

User avatar
Patrick
Lead Developer
Posts: 3099
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Isn't it possible to write Sitag S tags?

Postby Patrick » Tue Aug 13, 2013 8:53 am

The 1024 only supports writing to T5577 tags. We don't support writing to any type of Hitag tags.

-Patrick


Return to “RFID”

Who is online

Users browsing this forum: No registered users and 1 guest