125KHz Android Phone MicroUSB RFID Reader
125KHz Android Phone MicroUSB RFID Reader
The 125KHz Android Phone MicroUSB RFID Reader is a compact and versatile device designed to read RFID tags at a frequency of 125KHz. This reader connects to an Android phone or tablet via a MicroUSB interface, allowing users to read and interact with RFID tags using their mobile device.
| The 125KHz Android Phone MicroUSB RFID Reader is capable of reading various types of RFID tags operating at 125KHz, including but not limited to |
EM4100
EM4200
TK4100
T5557
Hitag-1
Hitag-2
Hitag-S
| The reader can be used in a variety of applications, such as |
Inventory management and tracking
Access control and authentication
Product identification and authentication
Smart home automation
125KHz
Up to 10cm (depending on the tag type and environment)
MicroUSB
<100mA
-20C to 70C
40mm x 20mm x 10mm
20g
MicroUSB cable
Quick start guide
SDK and API documentation (available for download)
CE
FCC
RoHS
The 125KHz Android Phone MicroUSB RFID Reader comes with a 1-year limited warranty, covering defects in materials and workmanship.
Component Documentation: 125KHz Android Phone MicroUSB RFID ReaderOverviewThe 125KHz Android Phone MicroUSB RFID Reader is a compact and versatile reader designed to connect to Android devices via a MicroUSB interface. This reader is capable of reading 125KHz frequency RFID tags, making it suitable for various applications such as inventory management, access control, and tracking systems.Technical SpecificationsFrequency: 125KHz
Communication Interface: MicroUSB
Operating Voltage: 5V DC
Current Consumption: 50mA
Reading Distance: Up to 5cm
RFID Tag Support: EM4100, EM4001, and other 125KHz compatible tagsGetting StartedTo use the 125KHz Android Phone MicroUSB RFID Reader, you will need:An Android device with a MicroUSB port
The RFID reader module
A compatible RFID tag
A working knowledge of Android development and the Android SDKCode Examples### Example 1: Reading a Tag using Android SDK (Java)This example demonstrates how to use the RFID reader to read a tag using the Android SDK.```java
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbManager;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.widget.Toast;public class RFIDReaderActivity extends Activity {
private UsbManager usbManager;
private RFIDReader reader;@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_rfid_reader);usbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
reader = new RFIDReader(this, usbManager);// Open the USB connection to the RFID reader
if (reader.open()) {
// Read a tag
byte[] tagData = reader.readTag();
if (tagData != null) {
String tagId = bytesToHexString(tagData);
Toast.makeText(this, "Tag ID: " + tagId, Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Failed to read tag", Toast.LENGTH_SHORT).show();
}
// Close the USB connection
reader.close();
}
}private String bytesToHexString(byte[] bytes) {
StringBuilder hexString = new StringBuilder();
for (byte b : bytes) {
String hex = Integer.toHexString(b & 0xFF);
if (hex.length() == 1) {
hexString.append("0");
}
hexString.append(hex);
}
return hexString.toString();
}
}
```### Example 2: Using the RFID Reader with a Third-Party Library (Android Things)This example demonstrates how to use the RFID reader with the Android Things platform and the `usb-serial-for-android` library.```java
import com.hoho.android.usbserial.driver.UsbSerialDriver;
import com.hoho.android.usbserial.driver.UsbSerialPort;
import com.hoho.android.usbserial.util.SerialInputOutputManager;public class RFIDReaderActivity extends Activity {
private UsbSerialDriver usbSerialDriver;
private UsbSerialPort usbSerialPort;
private SerialInputOutputManager serialInputOutputManager;@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_rfid_reader);usbSerialDriver = UsbSerialDriver.create(this);
usbSerialPort = usbSerialDriver.getPorts().get(0);// Open the USB connection to the RFID reader
usbSerialPort.open();// Create a serial input/output manager
serialInputOutputManager = new SerialInputOutputManager(usbSerialPort);// Read a tag
byte[] tagData = new byte[12]; // assuming 12-byte tag ID
serialInputOutputManager.write("r"); // send "r" to the RFID reader to read a tag
serialInputOutputManager.read(tagData);
String tagId = bytesToHexString(tagData);
Log.d("RFIDReader", "Tag ID: " + tagId);// Close the USB connection
usbSerialPort.close();
}private String bytesToHexString(byte[] bytes) {
StringBuilder hexString = new StringBuilder();
for (byte b : bytes) {
String hex = Integer.toHexString(b & 0xFF);
if (hex.length() == 1) {
hexString.append("0");
}
hexString.append(hex);
}
return hexString.toString();
}
}
```Note: These examples are for illustration purposes only and may require modifications to work with your specific use case. Additionally, you may need to add error handling and implement additional logic to suit your application's requirements.