DLP-RFID1 library for Linux
- July 18th, 2010
I bought a DLP-RFID1 USB RFID tag reader/writer from Digikey (Cat # 813-1013-ND). However, I was unable to locate sufficient libraries to develop software that uses it under Linux. So I have written a C++ library to do this. Read on for more information and to download it.
The DLP-RFID1 comprises an FTDI USB-Serial IC connected to a microcontroller. Therefore the library I have developed is based on libftdi. Currently, it is very basic and supports only polling for tags (not reading and writing tags). As I currently have no need for reading and writing tags I don’t plan to add this functionality unless someone asks for it.
The library can be downloaded from http://www.electricrock.co.nz/files/rfid1/librfid1-0.1.0.tar.bz2. Documentation is provided in the package.
This is my first time making a library package for Linux, so if you find any problems or have any suggestions please leave a comment and let me know.
DLP RFID1 Protocol
As previously mentioned, the RFID1 communicates with the host computer as a virtual serial port over USB using a FTDI chip. The VID:PID of the RFID1 are 0×0403:0xfbfc, the USB description is DLP-RFID1. It uses a baudrate of 115200.
Initialisation
The sequence of steps used by my librfid1 to connect to the device are as follows:
- Open the usb device/serial port
- Reset the RFID1 by writing a logic 1 to DTR, then release by writing logic 0. Not sure how long the pulse has to be but I have 20ms high, then waiting 110 ms after releasing reset.
- Purge the usb buffer
- Set baudrate.
- Wait for 10 ms
- Ping the device to check it is present (send a ping packet and check for echo).
Packet Transmission
The process for sending packets is:
- Write the packet string (see below)
- Read echo back from the RFID1. The echo will be terminated by carriage return and line-feed, so skip over them.
- Read response payload from RFID1 (if applicable).
Packets
Take the following information with a grain of salt. It has been a while since I wrote the code and I am just writing the following information based on my memory of what the packets did (or at least what I inferred the packets did from looking at the sample code.) These are the packets currently being used by librfid1, for more information on how to use them look at the source code:
| Ping | 0108000304FF0000 |
| AGC Toggle | 0109000304F0000000 |
| AM/PM Toggle | 0109000304F1FF0000 |
| Generate Pass Beep | 010900030419F00000 |
| Generate Fail Beep | 010900030420F00000 |
| IEEE15693 Inventory Request | 010B000304140601000000 |
| TI SID Poll | 010B000304340050000000 |
| Read Memory Mode | 010C00030410002101000000 |
| Read UID Mode | 010C00030410002101020000 |
| Read TagIt Mode | 010C00030410002101130000 |
Looking at those packets they suggest the following structure, but this is purely conjecture:
- First byte is ’01′, the start of packet character, I assume.
- This is followed a two digits, giving an ASCII encoded byte which is the length of the packet in bytes.
- The next four characters are ’0003′; not sure what this means, but it is in all the packets.
- Next ’04′ appears in all packets. I think this is an instruction to perform a write.
- I am guessing the next ASCII encoded byte is the address in memory to write to.
- Followed by (len – 7) bytes of data.
- And finally, ’0000′ to signal end of packet.
When reading packets back from the RFID1, the character ‘>’ appears to denote the point at which to stop reading (ie the end of the packet being read).
Polling for IEEE5693 Tags
To check for any IEEE15693 tags in range of the reader, send the following sequence of packets:
- Enter Read UID mode, by sending the Read UID Mode packet.
- Send the AGC Toggle packet.
- Send the AM/PM Toggle packet.
- Send the IEEE15693 Inventory Request packet, the tags will be listed in the response.
If anyone does any further work on this or has more information, please leave a comment/email me with corrections and/or more information.

There doesn’t seem to be a ‘configure’ file in here, as your documentation indicates. Did you forget to tar it up?
This looks like it will be very helpful to me – thanks a lot!
Hi Bryan,
The configure script is auto-generated by autoreconf. You need to run autoreconf in the source directory (you will need to have the appropriate build dependencies, e.g. libtool, automake, autoconf, gcc, etc.). The README has more info on this.
Hope it works for you. Let me know if you have any further questions.
~ Matt
Hi, I’m working with labview to the read the tag, but I like to know where is DTR o what is this, because, I can’t find it, and so far it’s not working without that configuration.
I wrote the packest in the write buffer, but only this packet 010B000304140601000000 (IEEE15693 Inventory Request), whit this I obtained something like this 010B000304140601000000
ISO 15693 Inventory request.
[,40]
[,40]
<Ed: snip>
But I’m not able to poll the tag in anyway.
Thanks.
The RFID1 comprises an FT232 USB to serial converter connected to a microcontroller. DTR is one of the serial port control lines, which is connected to the microcontroller’s reset. You can toggle this line using the FTDI control library. I think the best thing to do is to check out the source code for the initiation and polling routines. I’m not sure why you are having trouble polling. What sort of tags are you using?
I can’t download the archive because I’m working under windows, that is the problem.
Can you send me only the txt?
Could you tell which is the message that you write in the buffer to obatin the tag??? thanks.
And in what order?
I’ve updated the text above to outline how I do polling. Let me know how it goes for you. Also, you should be able to open the archive using e.g. 7-zip which is freely downloadable here.
I stumbled across this pdf from TI which gives more commands to use.
http://focus.ti.com.cn/cn/general/docs/lit/getliterature.tsp?literatureNumber=sloa141&fileType=pdf
It seems the commands sent are part of the ISO15693 protocol.
Btw, I’m writing a simple test program for Mac OS X for this device. You don’t the FTDI lib to talk to the DLP-RFID1. You do need the FTDI driver but the its just to opening the device using normal BSD file i/o.
This article help me alot to get started! Thanks!