ACR122 NFC-Reader/-Writer Java Application (Interface implementation) - java

currently I am struggling with an interface between the ACR122 NFC Reader and java. What I am trying to achieve is to read a NFC-Tag and get the read value into a java variable. Sounds simpler than it is (for me).
What I do know by know are the bytes I have to send in order to read and write properly. So what I now need to know is how do I communicate with the device itself so i can send those commands (initialize, read/write, close connection)?
The manufacturer adds a interface written in C (or C++?). Unfortunately I only know Java so I would need a library I could use and some examples (and maybe some explanations). If someone would happen to know how to achieve my goal and going to explain to me how the process generally works, I would be very happy.
Some additional informations:
Operating System the programm should work on (Windows 7 64x)
The most recent JDK
The transfer and the stored data on the NFC-Tag doesn't have to be secure
If any information is needed, please don't hesitate to ask for it. I am glad for every bit that helps.

Related

Max/Msp as Java lib?

I need to read data from the mic input in realtime in my Java program. I experimented with TaroDSP a bit and while it does provide a fairly straightforward API for this, its latency is too high for my purposes.
I was thinking that maybe I can implement this in Max/DSP, write a program that would simply read the mic input levels, export it as a jar and include it in my java program as a library and simply call it from within my java program to query the mic input levels, something like:
ExportedMaxObject o = new ExportedMaxObject();
int currentMicLevel = o.getMicInputLevel();
I know Max/Msp makes somehow possible to use mxj and mxj~ Java objects to access data to and from Max but it is not clear to me how they are used. Do I need to have Max running or installed in my computer in order to use it? I am looking for a solution where I can embed this into my Java program and use my own UI so I can distribute it without any dependencies to Max/Msp.
Thanks in advance for any help.
I would say it is very unlikely that you will find a way to load a Max patch in Java.
The other way around might be possible: building an app in Max that incorporates your Java work, however it's important to note that Java support in Max has not received a lot of attention since Apple dropped it.

External RFID reader on Android with JMRTD

Context
I have a Minix x88i Android computer (not relevant, but it's without internal NFC tech), connected to an external RFID reader (the ACR1252u from ACS). ACS provides an API for Android so I can communicate with my reader through my application. That works.
Goal
My goal is to be able to read ISO 14443 Type A cards ((Dutch) ID-cards and passports (aka ePassports)), and get the result in my application. The key to access these tags is the MRZ (Machine Readable Zone) visible on the ePassports, which can be hard-coded for now.
Problem
I'm a bit stuck on what my next step should be. I found the JMRTD API to help me access the ePassports, but I don't know how to use it after importing it in my application (mostly because I don't have a 'Tag' or 'Card' object or something). Applications I found using this either make use of importing javax.smartcardio.* or android.nfc.*, which both won't work in my Android application for a device without internal NFC.
Do I need to use JMRTD? No, if there are other libraries which do the same that I don't know about, please let me know!
You could help me by guiding me in the right direction on how to use JMRTD (or something else) for an Android application on a device without internal NFC, in combination with the ACR reader. A popular reader from them is the ACR122, if you have experience with that the chance is high that it will also apply for my reader! Or maybe you know of a project that does the same, so I can use that as a code example.
If I need to provide more information, please let me know. Thanks in advance!
Solved by extending the CardService class from SCUBA (dependecy from JMRTD) in my own class. Next I could create a PassportService from JMRTD, open it, select the application, perform authentication and read the data.

Trying to communicate to a USB port/Device in Java on Mac

I have a basic understanding of network programming but i have never had anything to do with USB ports.
This is what i am trying to achieve
I need to write a program in Java, to communicate to a device which is connected to USB port and then later send commands.
I tried terminal as follows earlier but it didn't quite work
ls -l /dev/tty.*
screen /dev/tty.usbserrial-FTYRDSX7 9600
The above didn't work out.
So if someone can just guide with what Java classes i should be looking into and if there are any APIs that should help me get started
Unless you're required to build it from the ground up, use a library such as usb4java (also here). Trying to manage it as a block device and interpreting whatever protocols etc., etc is not worth the effort unless there something very unique to your problem.
So i ended up using jssc which is much easier to use with strait forward syntax and methods

How to get started reading data from magnetic card with a simple bi-direction swipe magnetic card reader?

Let's say I have a USB magnetic card reader
(http://image.ec21.com/image/szttce09/oimg_GC03950917_CA03950946/Triple_Track_USB_Magnetic_Credit_Card_Reader.jpg)
I am running windows 10 on my machine. All I want to do is read data from the magnetic card and use that data in a java Application. How can I do this ? I heard the java communications api is suitable for what I want. How exactly do I use this api or any other api to read data from the card reader and show that data in my java application. Assume I have eclipse opened. Now what? Do I import the communications api ? If yes , what do I do next ? If you can give a simple example of how to do this it would be greatly appreciated.
The first thing to do is search the internet for a Java library, which allows you to communicate with that device. Put in the model and serial number, and see what comes up. If nothing comes up, and that is quite likely to happen, you will need to find the native driver, and wrap it in Java.
This is not normally a straight forward or easy process. When dealing with third party hardware, most vendors don't supply a little Java library that you can use. If you can find the native drivers, you can wrap them from C to Java, but you might not even be able to find the drivers at all.
Start by going to the manufacturer's page, and looking around. If you find the driver, great. If you find documentation for the driver, even better. You will need to read the documentation, and understand how to use the driver from C code, which implicitly requires you to have a basic understanding of C.
Then you will need to link it in to Java, using the Java Native Interface.
In Summary: If it didn't say "For Java developers" in the description when you bought it, you're going to have to do a lot of work just to get it usable in Java.

Programming a GSM phone/modem to make phone calls

I want to use a program written in a high level language like Java or Python to talk to a GSM Modem.
I want to be able to tell the modem what number to call and when to call it. I also want to be able to read and send text messages.
I do NOT need to handle voice transmission in either direction of the call.
I'd appreciate recommendations of any applicable libraries and specific modems that are good to start with? I like Java but am willing to try something else.
Thanks
There are a set of relatively standard "AT" commands that can be used for these types of operations - including placing phone calls and sending text messages. Some details around this are at http://www.smssolutions.net/tutorials/gsm/sendsmsat/ and http://www.dreamfabric.com/sms/ (simply first results of a little online searching).
A little more online searching yielded a Java-specific example at http://www.java-samples.com/showtutorial.php?tutorialid=22 .
I had done a little bit of this in Java a number of years back, using the Java Communications API - available at http://www.oracle.com/technetwork/java/index-jsp-141752.html . (My purpose was for interfacing with the phone book on my phone, but this also should have worked with interfacing with the SMS system.)
Almost all modems and (phones which support tethering to your PC) can do this. All modems are equally good at it.There are no starter's modems. Just go through the AT commands specific to your applications and thats it.

Categories