Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Rfid reader on mobile.


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Last Post: Jun 17, 2016 12:52 AM Last Post By: kyile rey
Stev Warby

Posts: 50
Registered: 10/19/14
Rfid reader on mobile.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 22, 2015 3:21 PM
I need a simple solution on iOS or android ( Bluetooth or built in) that I can read , write and lock rfid tags.

Anyone know of any products that have I can access from Delphi ?

Thanks...
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Rfid reader on mobile.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 24, 2015 12:48 AM   in response to: Stev Warby in response to: Stev Warby
Am 23.01.2015 um 00:21 schrieb Stev Warby:
I need a simple solution on iOS or android ( Bluetooth or built in) that I can read , write and lock rfid tags.

Anyone know of any products that have I can access from Delphi ?

Thanks...

Hello,

1,. this question would belong into one of the platform specific
groups, as it hasn't much to do with FMX.

2. For Android: look for Brian Long's RFID Delpho blog post

3. For iOS: better forget about built in RFID capabilities for now.
Apple narrow mindedly only implemented paying in iPhone 6 so far.

What do you want to do with those RFID tags? Which kinds of tags do you
intend to use?

Greetings

Markus

Ste War

Posts: 31
Registered: 1/9/15
Re: Rfid reader on mobile.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 24, 2015 1:40 AM   in response to: Markus Humm in response to: Markus Humm
Hi Markus,

I presumed (wrongly) that this is for all cross platform.

I have already developed a system for reading RFID tags using application craft ( based on phonegap) The Android device I used allowed me to map a button to read the tag into an edit field. http://www.jmprime.co.uk/product_info.php/android-mobile-device-with-barcode-scanner-for-inventory-stocktaking-asset-tracking-retail-p-200?osCsid=1c1ad82d40a4f8ee06bfeb54661c1747

This meant I didn't have to do any coding to get the data. It also had a long range reader as the tags were fixed onto tyres but no camera (okay for that project).

I now need to be able to also write to the tags for an application to asset tag power tools and equipment.

I have been looking (in vain) to find a device that allows me to connect to it via bluetooth or the audio port and them simply send some commands to read / write / password protect the tags.

I found another Android device that has RFID / camera / sim etc but the software dev kit is in JAVA.

http://www.jmprime.co.uk/product_info.php/2d-rugged-windows-barcode-handheld-terminal-with-printer-3g-wifi-bluetooth-1356mhz-mifare-gps-p-193?osCsid=1c1ad82d40a4f8ee06bfeb54661c1747

SDK.

https://www.dropbox.com/s/629hj2xilcf3jhc/TT35A%20RFID_UHF%20As3992%20SDK%20140613_EN.zip?dl=0

A college of mine converted the java into a pas file but he does not have the time to go any further and it is way above my head. There is also a rf.jar file.

He also said theres a lot of work to understand how to read and write to the tags. If anyone has the time I can pay for to get 3 functions.

1. read tag.
2. write tag.
3. password protect tag.

{*******************************************************}
{ }
{ CodeGear Delphi Runtime Library }
{ Copyright(c) 2014 Embarcadero Technologies, Inc. }
{ }
{*******************************************************}

unit Androidapi.JNI.RFIDLibrary;

interface

uses
Androidapi.JNIBridge,
Androidapi.JNI.JavaTypes;

type
// ===== Forward declarations =====

Jrfidlibrary_BuildConfig = interface;//com.ht.rfidlibrary.BuildConfig
Jrfidlibrary_R = interface;//com.ht.rfidlibrary.R
Jrfidlibrary_R_attr = interface;//com.ht.rfidlibrary.R$attr
Jrfidlibrary_R_drawable = interface;//com.ht.rfidlibrary.R$drawable
Jrfidlibrary_R_string = interface;//com.ht.rfidlibrary.R$string
Jrfidlibrary_R_style = interface;//com.ht.rfidlibrary.R$style
JRFIDClass_native = interface;//rfid_native_package.RFIDClass_native
JRFIDClass_native_Freq_Msg = interface;//rfid_native_package.RFIDClass_native$Freq_Msg
JRFIDClass_native_Tag_Data = interface;//rfid_native_package.RFIDClass_native$Tag_Data
JRFIDClass_native_Tag_Data_Rssi = interface;//rfid_native_package.RFIDClass_native$Tag_Data_Rssi

// ===== Interface declarations =====

Jrfidlibrary_BuildConfigClass = interface(JObjectClass)
['{844FAE9E-8A9C-4499-8980-148EDE0A20CB}']
{class} function _GetDEBUG: Boolean;
{class} function init: Jrfidlibrary_BuildConfig; cdecl;
{class} property DEBUG: Boolean read _GetDEBUG;
end;

[JavaSignature('com/ht/rfidlibrary/BuildConfig')]
Jrfidlibrary_BuildConfig = interface(JObject)
['{13D4782F-A572-465E-A262-6D78C91005B4}']
end;
TJrfidlibrary_BuildConfig = class(TJavaGenericImport<Jrfidlibrary_BuildConfigClass, Jrfidlibrary_BuildConfig>) end;

Jrfidlibrary_RClass = interface(JObjectClass)
['{9CF7EE80-1465-4D1A-9E4C-47629161D695}']
{class} function init: Jrfidlibrary_R; cdecl;
end;

[JavaSignature('com/ht/rfidlibrary/R')]
Jrfidlibrary_R = interface(JObject)
['{4B268151-4C44-4261-B1AC-641D43559862}']
end;
TJrfidlibrary_R = class(TJavaGenericImport<Jrfidlibrary_RClass, Jrfidlibrary_R>) end;

Jrfidlibrary_R_attrClass = interface(JObjectClass)
['{FDDC4797-94F4-433D-AD40-B089D3E274FB}']
{class} function init: Jrfidlibrary_R_attr; cdecl;
end;

[JavaSignature('com/ht/rfidlibrary/R$attr')]
Jrfidlibrary_R_attr = interface(JObject)
['{B5CCDD82-4F0B-49BD-9D4A-37F77388DF49}']
end;
TJrfidlibrary_R_attr = class(TJavaGenericImport<Jrfidlibrary_R_attrClass, Jrfidlibrary_R_attr>) end;

Jrfidlibrary_R_drawableClass = interface(JObjectClass)
['{45F8ED04-167C-41FD-B97D-00CFAB3036BC}']
{class} function _Getic_launcher: Integer;
{class} procedure _Setic_launcher(Value: Integer);
{class} function init: Jrfidlibrary_R_drawable; cdecl;
{class} property ic_launcher: Integer read _Getic_launcher write _Setic_launcher;
end;

[JavaSignature('com/ht/rfidlibrary/R$drawable')]
Jrfidlibrary_R_drawable = interface(JObject)
['{F6DE8E9C-3AF7-47A4-A3C1-A76E87B2A215}']
end;
TJrfidlibrary_R_drawable = class(TJavaGenericImport<Jrfidlibrary_R_drawableClass, Jrfidlibrary_R_drawable>) end;

Jrfidlibrary_R_stringClass = interface(JObjectClass)
['{678265A2-B48B-4D5F-A012-A0BA21B2C027}']
{class} function _Getapp_name: Integer;
{class} procedure _Setapp_name(Value: Integer);
{class} function init: Jrfidlibrary_R_string; cdecl;
{class} property app_name: Integer read _Getapp_name write _Setapp_name;
end;

[JavaSignature('com/ht/rfidlibrary/R$string')]
Jrfidlibrary_R_string = interface(JObject)
['{E0014F76-B473-4C69-BA09-DC5241969A1E}']
end;
TJrfidlibrary_R_string = class(TJavaGenericImport<Jrfidlibrary_R_stringClass, Jrfidlibrary_R_string>) end;

Jrfidlibrary_R_styleClass = interface(JObjectClass)
['{4F0B4CFC-EBE5-4CF5-8937-C32DE3EEDDB4}']
{class} function _GetAppBaseTheme: Integer;
{class} procedure _SetAppBaseTheme(Value: Integer);
{class} function _GetAppTheme: Integer;
{class} procedure _SetAppTheme(Value: Integer);
{class} function init: Jrfidlibrary_R_style; cdecl;
{class} property AppBaseTheme: Integer read _GetAppBaseTheme write _SetAppBaseTheme;
{class} property AppTheme: Integer read _GetAppTheme write _SetAppTheme;
end;

[JavaSignature('com/ht/rfidlibrary/R$style')]
Jrfidlibrary_R_style = interface(JObject)
['{A6ADE942-8680-4A34-AD27-3C6262B39FCE}']
end;
TJrfidlibrary_R_style = class(TJavaGenericImport<Jrfidlibrary_R_styleClass, Jrfidlibrary_R_style>) end;

JRFIDClass_nativeClass = interface(JObjectClass)
['{F4191E3A-FC3F-4F93-9203-174BF814408B}']
{class} function init: JRFIDClass_native; cdecl;
end;

[JavaSignature('rfid_native_package/RFIDClass_native')]
JRFIDClass_native = interface(JObject)
['{3DCABF9B-57F9-4D91-BDE6-41045ACD035B}']
procedure CloseComPort; cdecl;
function OpenComPort(P1: JString): Integer; cdecl;
function get_all_reg: TJavaArray<Byte>; cdecl;
function get_freq: JRFIDClass_native_Freq_Msg; cdecl;
function get_freq_reflect_level(P1: Integer): TJavaArray<Integer>; cdecl;
function get_freq_rssi_level(P1: Integer): TJavaArray<Integer>; cdecl;
function get_gen2(P1: Integer): SmallInt; cdecl;
function get_reg(P1: Integer): TJavaArray<Byte>; cdecl;
function get_version(P1: Integer): TJavaArray<Byte>; cdecl;
function read_area(P1: Integer; P2: Integer; P3: Integer): TJavaArray<Byte>; cdecl;
function read_tag6B(P1: TJavaArray<Byte>; P2: Integer; P3: Integer): TJavaArray<Byte>; cdecl;
procedure read_thread; cdecl;
function search_card: JArrayList; cdecl;
function search_card6B: JArrayList; cdecl;
function search_card6B_helper(P1: TJavaArray<Byte>): TJavaArray<Byte>; cdecl;
function search_card_rssi: JArrayList; cdecl;
function select_card(P1: TJavaArray<Byte>): Integer; cdecl;
function set_alloc_param(P1: Integer; P2: Integer; P3: Integer): Integer; cdecl;
function set_antenna_power(P1: Boolean): Integer; cdecl;
function set_freq(P1: Integer; P2: Integer; P3: Integer; P4: Integer; P5: Integer): Integer; cdecl;
function set_gen2(P1: Integer; P2: Byte): Integer; cdecl;
function set_reg(P1: Integer; P2: TJavaArray<Byte>): Integer; cdecl;
function setkill(P1: TJavaArray<Byte>; P2: Byte): Integer; cdecl;
function setlock(P1: Byte; P2: Byte; P3: TJavaArray<Byte>): Integer; cdecl;
function write_area(P1: Integer; P2: Integer; P3: Integer; P4: TJavaArray<Byte>; P5: TJavaArray<Byte>): Integer; cdecl;
function write_tag6B(P1: TJavaArray<Byte>; P2: Integer; P3: TJavaArray<Byte>): Integer; cdecl;
end;
TJRFIDClass_native = class(TJavaGenericImport<JRFIDClass_nativeClass, JRFIDClass_native>) end;

JRFIDClass_native_Freq_MsgClass = interface(JObjectClass)
['{F374C8DA-5F81-43ED-ABEF-FFFF8A82B630}']
end;

[JavaSignature('rfid_native_package/RFIDClass_native$Freq_Msg')]
JRFIDClass_native_Freq_Msg = interface(JObject)
['{D6FA9E76-9C37-4CD1-93FB-D4A66B580010}']
function _Getallocationtime: Integer;
procedure _Setallocationtime(Value: Integer);
function _Getid: Integer;
procedure _Setid(Value: Integer);
function _Getidletime: Integer;
procedure _Setidletime(Value: Integer);
function _Getinc: Integer;
procedure _Setinc(Value: Integer);
function _Getlistentime: Integer;
procedure _Setlistentime(Value: Integer);
function _Getrssi: Integer;
procedure _Setrssi(Value: Integer);
function _Getstart: Integer;
procedure _Setstart(Value: Integer);
function _Getstop: Integer;
procedure _Setstop(Value: Integer);
property allocationtime: Integer read _Getallocationtime write _Setallocationtime;
property id: Integer read _Getid write _Setid;
property idletime: Integer read _Getidletime write _Setidletime;
property inc: Integer read _Getinc write _Setinc;
property listentime: Integer read _Getlistentime write _Setlistentime;
property rssi: Integer read _Getrssi write _Setrssi;
property start: Integer read _Getstart write _Setstart;
property stop: Integer read _Getstop write _Setstop;
end;
TJRFIDClass_native_Freq_Msg = class(TJavaGenericImport<JRFIDClass_native_Freq_MsgClass, JRFIDClass_native_Freq_Msg>) end;

JRFIDClass_native_Tag_DataClass = interface(JObjectClass)
['{61EB5955-7DE6-4F6A-9D09-65AA3E44055B}']
end;

[JavaSignature('rfid_native_package/RFIDClass_native$Tag_Data')]
JRFIDClass_native_Tag_Data = interface(JObject)
['{96224F64-DEF3-4C01-A34D-4832BBE12543}']
function _Getepc: TJavaArray<Byte>;
procedure _Setepc(Value: TJavaArray<Byte>);
function _Getpc: TJavaArray<Byte>;
procedure _Setpc(Value: TJavaArray<Byte>);
property epc: TJavaArray<Byte> read _Getepc write _Setepc;
property pc: TJavaArray<Byte> read _Getpc write _Setpc;
end;
TJRFIDClass_native_Tag_Data = class(TJavaGenericImport<JRFIDClass_native_Tag_DataClass, JRFIDClass_native_Tag_Data>) end;

JRFIDClass_native_Tag_Data_RssiClass = interface(JObjectClass)
['{B3C84CC5-683A-4AAB-BA77-5DCDCC738163}']
end;

[JavaSignature('rfid_native_package/RFIDClass_native$Tag_Data_Rssi')]
JRFIDClass_native_Tag_Data_Rssi = interface(JObject)
['{C7C0748D-FE3E-4C64-BE3A-CF0B856C0D56}']
function _Getch_i: Integer;
procedure _Setch_i(Value: Integer);
function _Getch_q: Integer;
procedure _Setch_q(Value: Integer);
function _Getfreq: Integer;
procedure _Setfreq(Value: Integer);
function _Gettdata: JRFIDClass_native_Tag_Data;
procedure _Settdata(Value: JRFIDClass_native_Tag_Data);
property ch_i: Integer read _Getch_i write _Setch_i;
property ch_q: Integer read _Getch_q write _Setch_q;
property freq: Integer read _Getfreq write _Setfreq;
property tdata: JRFIDClass_native_Tag_Data read _Gettdata write _Settdata;
end;
TJRFIDClass_native_Tag_Data_Rssi = class(TJavaGenericImport<JRFIDClass_native_Tag_Data_RssiClass, JRFIDClass_native_Tag_Data_Rssi>) end;

implementation

procedure RegisterTypes;
begin
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.Jrfidlibrary_BuildConfig', TypeInfo(Androidapi.JNI.RFIDLibrary.Jrfidlibrary_BuildConfig));
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R', TypeInfo(Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R));
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R_attr', TypeInfo(Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R_attr));
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R_drawable', TypeInfo(Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R_drawable));
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R_string', TypeInfo(Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R_string));
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R_style', TypeInfo(Androidapi.JNI.RFIDLibrary.Jrfidlibrary_R_style));
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.JRFIDClass_native', TypeInfo(Androidapi.JNI.RFIDLibrary.JRFIDClass_native));
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.JRFIDClass_native_Freq_Msg', TypeInfo(Androidapi.JNI.RFIDLibrary.JRFIDClass_native_Freq_Msg));
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.JRFIDClass_native_Tag_Data', TypeInfo(Androidapi.JNI.RFIDLibrary.JRFIDClass_native_Tag_Data));
TRegTypes.RegisterType('Androidapi.JNI.RFIDLibrary.JRFIDClass_native_Tag_Data_Rssi', TypeInfo(Androidapi.JNI.RFIDLibrary.JRFIDClass_native_Tag_Data_Rssi));
end;

initialization
RegisterTypes;
end.

The guys at jmprime were very helpful but there have no delphi knowledge but I would recommend them for a great range of reasonably priced PDA's.

So any thoughts anyone ?

Anyone else need a low cost device for RFID tags we could work together to get it working and share it for the delphi community .

I have a loan device here for testing until the end of the month.

Thanks....
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Rfid reader on mobile.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 24, 2015 3:38 AM   in response to: Ste War in response to: Ste War
Hello,

since you're talking about long range I asume your tags are UHF instead
of HF (HF = ISO14443 opr 15693 or NFC).

Greetings

Markus
Ste War

Posts: 31
Registered: 1/9/15
Re: Rfid reader on mobile.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 24, 2015 7:40 AM   in response to: Markus Humm in response to: Markus Humm
Hi Markus,

yes we are using UHF tags.

The reason is the tyre tags are UHF and we are hoping to do another project with the tyre tags (outside the tyre) so we don't need the long range reader.

So it makes sense to standardise on UHF for the asset management of the tools.

We then have one device that reads UHF / has a camera (read qr codes as well)
kyile rey

Posts: 1
Registered: 7/17/16
Re: Rfid reader on mobile.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 17, 2016 12:52 AM   in response to: Stev Warby in response to: Stev Warby
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02