What do you need to program a NXP SmartMX contactless MCU? - nfc

I'm developing an authentication system with NFC technology with strong cryptographic functions.
There are two solutions from NXP: Mifare DESFire EV1, which is a chip with memory areas and 3DES and AES128 crypt functions, and SmartMX2,which is a complete MCU that needs an OS and software to run.
To choose between the two, I have to know how to program those tags. For what I've understood, the DESFire needs a USB reader/writer and the interface software, like this --> http://www.mpsys.de/chipmanrfid_en.html
What equipment is needed to install the OS on a SmartMX card, and then debug? Is it possible to do it only via NFC interface?
Thanks for your attention,
gfunky

SmartMX cards always come with the Card OS installed. The Card OS is actually fixed in the ROM mask of the chip. An example of such a Card OS is NXP JCOP; an implementation of JavaCard.
Developing JavaCard applets for JCOP is usually done in Eclipse. NXP offers JCOP development tools to customers that consist of a plug-in for Eclipse. Debugging is not possible on the card itself (also for security reasons), but is done in a simulator that runs on the PC.
DESFire is a chip with fixed functionality. It has its own command set to do things like creating files, reading and writing data and performing authentication. In principle, this can be done using any software that allows sending commands through a contactless card reader. But specialized software that has built-in support for DESFire will be very convenient and likely speed up your development a lot.

Related

How do I go about writing a driver using IOKit/DriverKit for MT6320 on an Azure Sphere Kit from MSFT?

Where are the step-by-step instructions to write a generic driver to a USB-connected developer board for MacOS using IOKit/DriverKit (publicly shown in WWDC 2019) in Xcode?
The only documentation I'm aware of is:
DriverKit reference
WWDC 2019 Session 702
The DriverKit version of IOKit is intended to have a similar API to the in-kernel IOKit, so I guess they expect you to be familiar with that.
Note that in many cases when writing drivers for USB devices, you don't need to use either DriverKit or a kext, and instead can use the userspace IOUSB libraries directly. You only really need to use DriverKit or a kext if the kernel is the consumer of your driver. You haven't said what your driver will do, so I can't say which is best in your case. DriverKit is still extremely limited, so unless you want to write a HID or serial port driver, there are few reasons to choose it at the moment.

Android Things and NFC

I'm running Android Things on a Raspberry Pi 3 Model B. I want to read NFC Tags, is it possible to do this? I've got like zero hardware knowledge about this stuff. All I know is how to write the necessary code.
A Raspberry Pi (or the other Dev kit) does not have NFC hardware. If you want to read NFC tags you need to get some hardware.
In addition to that, there is not user space driver for NFC, so you'd need to read it using a driver.
I only know of 2 chips that are sort of supported, both drivers are very limited. In fact, the simplest way to get them to work is to plug then into an Arduino and then communicate with the Arduino either using UART or I2C.
The best supported chip is RC-522. It reads mifare, but not sure how many other formats. You have a driver ported from arduino here: http://github.com/Galarzaa90/android-things-rc522
One of the important limitations is that it does not support card emulation.
I've had success with the ACR122U running over USB. It supports Mifare.

What is Mifare native mode?

What is Mifare native mode? And what is the difference in interaction with card between native mode commands and APDU commands from ISO/IEC 7816-4 (or ISO 14443-4)?
The answer is almost contained in the second part of your question: Mifare native mode uses lower level commands than ISO 14443-4, so there are no APDUs to send. To access Mifare native mode, you will need hardware and software made or licensed by Mifare's owning company NXP.
For example, only mobile phones using NXP chips can use Mifare native mode to interact for example with Mifare Classic cards.

How to Develop iPhone/iPad Accessories

I want to create hardware accessory for iPhone and iPad but there is very less resources out there. I am not a programmer or engineer. My concept is very simple building a number pad connected through lightning cable. It will have 6x4 keys layout, in this 4 keys can be customize as per need means key a will work as copy(command+c)key b will work as paste(command+v) this keys can be customised in diffrent kind of shortcuts. I dont want a blueetoth connectivity.
Do I need a arduino or raspberry pi kind of device to program and test run a functional prototype?
What kind of cable do I need to sue to communicate with the device?
What kind of programming langauge do i need to learn?
Do I need to first register for Mfi program or I can do it after I develop the product?
As far as I'm aware, you'll need to join MFI for developing Lightning accessories.
However, you don't need Apple's permission for designing and building your own Bluetooth LE (Bluetooth 4.0) accessories. You should be able to do what you want by programming a Bluetooth LE capable microcontroller to act as a HID device that sends the key events you want. I've not done this specific type of project myself and I'm far from an expert on embedded stuff, but Adafruit have a bunch of resources and development boards on Bluetooth LE using Arduinos and other dev boards. I believe they even have something that already acts as a HID device. I'd start researching in that direction.
Another option is to program a microcontroller to act as a standard USB HID keyboard device, and plug that into the iDevice using the Lightning to USB Camera adapter. iPads recognise standard USB keyboards without needing MFI approval, but you do need to use Apple's adapter. Note that the adapter allows the USB device to draw very little power (50mA I think) so it will not work with any device that requires more. The USB3 version of the adapter has an extra power input and so allows you to attach a USB device that draws more than that.

Functionatlity of Open NFC Framework

I have fundamental question about what Open NFC framework is for. I want to write a program that will run on a PC to communicate with a NFC card reader connected to the PC through USB. The program will write to and read from NFC tags by commanding the NFC card reader.
Is Open NFC framework suited for this purpose? Or is it for developing programs that will run on NFC tags?
Aritra
OpenNFC is a software stack implementing NFC functionalities.
It is hardware independent, so in theory you could use it with an USB connected reader. The problem is, the only available HALs (Hardware Abstraction Layers) for OpenNFC are for an NFC simulator and Inside Secure hardware. Until we get some HALs for most common hardware, I'd say you should take look at http://www.libnfc.org/documentation/introduction
There are many NFC readers on the market, that are being sold with their own SDKs. With such SDKs you are 100% sure the code is compatible with the particular NFC reader.
BR
STeN

Resources