Using DLLs in Java code

A customer of mine bought an RFID card reader I have to read from: the card reader will be connected through the USB port to the PC running the Ignition Client.
The card reader manufacturer SDK consists of two DLLs (binaries only, no source code). As I can see in the supplied C# example project, dll A must be imported, whereas dll B is used internally by dll A to access the USB port.
Following next blog
http://blog.mwrobel.eu/how-to-call-dll-methods-from-java/
I’m planning to program a Java library of my own which uses the DLL through the sun.jna library.
Before starting I ask you: is that really feasible? My biggest concern regards the fact that the java code in my library will be called in the client context, i.e. also the DLLs will have to be downloaded by the client and I don’t know if that will be done.

Thanks in advance, regards

P.S.: If you have any experience with RFID card reader (desktop models, Europe area) with Java SDK, that will also be appreciated, just in case my customer will accept to change product.

Is it not possible to build an RFID Gateway on a Linux box like Rpi/ Beaglebone/ Alpine etc and PubSub the RFID profile as JSON payload through MQTT?.

Many thanks for your suggestion, it’s a very nice solution, but I’m too short of time to go that way.

The built in bar code reader module in Ignition can read packets from any device I guess:

https://docs.inductiveautomation.com/display/DOC79/UDP+and+TCP+Driver

Unfortunately the Ignition module you point to is intended for connections over Ethernet and my customer’s device will be connected to the USB port. Moreover the device manufacturer says nothing about communication protocol specs for his device.

there are USB to Ethernet converted devices available that can be use as interface I guess.

Since you are coding in Java, check out if you can update the RFID data to a database like MySQL via JDBC/ ODBC?. If so, you can easily consume it through query tags. This is the quickest path to setup a demo for the client, IMO.

You can test your card with Python also, if you like. I found these 2 links interesting.

RFID Read/Write Module - USB Python Script

USB RFID + Python + Pub-Sub (MQTT)

Thanks Alamsha. I think that the python script you point to will work only with their boards (Parallax).

If you can provide your board details, i can also do some research from my side.

My customer bought this one:
https://www.omnitekstore.it/scrittori-di-card/1453-lettore-scrittore-di-tessere-rfid-mifare-1k-con-software-8053670670549.html

You can put the DLLs inside the JAR files. The client will download the JARs automatically and then you can go and extract and load the DLLs.

Needs some patience to dig in. This experience will make you an expert on RFID.

  1. This card comes under ISO 14443 standard. So, irrespective of the manufacturer, any code which works for ISO 14443 standard shall work for this card also.
    Differences in A & B for ISO 14443

  2. This link is very popular with RFID developers. RFIDIOt is a collection of routines designed to abstract the hardware from the function, so that a single program can provide the same functionality regardless of what reader type is plugged in.

A collection of tools and libraries for exploring RFID technology, written
in python.

http://www.rfidiot.org/documentation.html