Android UHF Interface User Manual
Android UHF Interface User Manual
User Manual
www.seuic.com
Hardware platform
Without further limits definition in functional interface instruction, it’s using range shall be
redeemed as applicable to all.
Software platform
SDK is based on Android 4.4, and it supports the eclipse development tool and Android studio.
Object oriented
It’s designed for the developers who would like to use UHF module besides the Android standard
functions.
Quote method
1. Take Eclipse for example, right click Program, then Properties, Java Build Path, Libraries, Add
External JARs, select uhf.jar.
UHF Interface
Package name com.seuic.uhf
Package file uhf.jar
System package Yes
Class UHFService
Function Provide the control interface related to UHF
UHFService class
Using method
import com.seuic.uhf.UHFService;
UHFService mDevice = UHFService.getInstance();
If you want the system UHFDemo service to exit, use the getInstance interface with parameters.
UHFService mDevice = UHFService.getInstance(Context context);
Note: The UHF module will be powered off when the system sleeps, so you need to call the close
interface before the system sleeps, and call the open interface to reopen the module after the
system wakes up.
Function interface
Function Specification
open Switch UHF on
close Switch UHF off
isOpen Whether UHF is turned on
getFirmwareVersion Get the firmware version number
getTemperature Get the temperature
getPower Get the power
setPower Set the power
getRegion Get field
setRegion Set field
1. Switch UHF on
boolean open ()
Parameters
non
Return value
boolean; true for success and false for failure
8. Get field
String getRegion ()
Parameters
non
Return value
String; non blank for success and null for failure
Range value including:”FCC” , ”ETSI”, ”China1” , ”China2”
/**
* String to hexadecimal array
*/
public static byte[] getHexByteArray(String hexString) {
byte[] buffer = new byte[hexString.length() / 2];
if (hexString == null || hexString.equals("")) {
return null;
}
hexString = hexString.toUpperCase();
int length = hexString.length() / 2;
char[] hexChars = hexString.toCharArray();
for (int i = 0; i < length; i++) {
int pos = i * 2;
buffer[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));
}
return buffer;
}
byte[] id;
int len;
int rssi;
int count;
Using method
import com.seuic.uhf.EPC;
EPC epc = new EPC();
Function interface